Skip to contents

A data stream generator class that interfaces data generators found in package mlbench.

Usage

DSD_mlbenchGenerator(method, ...)

Arguments

method

The name of the mlbench data generator. If missing then a list of all available generators is shown and returned.

...

Parameters for the mlbench data generator.

Value

Returns a DSD_mlbenchGenerator object (subclass of DSD_R, DSD)

Details

The DSD_mlbenchGenerator class is designed to be a wrapper class for data created by data generators in the mlbench library.

Call DSD_mlbenchGenerator with missing method to get a list of available methods.

Author

John Forrest

Examples

DSD_mlbenchGenerator()
#> Available generators are:
#>  [1] "2dnormals" "cassini"   "circle"    "cuboids"   "friedman1" "friedman2"
#>  [7] "friedman3" "hypercube" "peak"      "ringnorm"  "shapes"    "simplex"  
#> [13] "smiley"    "spirals"   "threenorm" "twonorm"   "waveform"  "xor"      

stream <- DSD_mlbenchGenerator(method = "cassini")
stream
#> mlbench: cassini 
#> Class: DSD_mlbenchGenerator, DSD_R, DSD 

get_points(stream, n = 5)
#>           X1          X2 .class
#> 1 -0.4337012 -1.61497441      1
#> 2 -0.1881505  1.02670452      2
#> 3 -1.3104811  0.86853841      2
#> 4 -0.1213894 -1.17513021      1
#> 5  0.1050002 -0.07997583      3

plot(stream, n = 500)