public abstract class ClusteringDataGenerator extends Object
Also has a dataset generator which returns a dataset sampled from a mixture of 2 dimensional gaussians.
Constructor and Description |
---|
ClusteringDataGenerator() |
Modifier and Type | Method and Description |
---|---|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> |
denseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> |
denseTrainTest(double negate)
Generates a train/test dataset pair which is dense in the features,
each example has 4 features,{A,B,C,D}, and there are 4 clusters,
{0,1,2,3}.
|
static Example<ClusterID> |
emptyExample()
Generates an example with no features.
|
static Dataset<ClusterID> |
gaussianClusters(long size,
long seed)
Generates a dataset drawn from a mixture of 5 2d gaussians.
|
static Example<ClusterID> |
invalidSparseExample()
Generates an example with the feature ids 1,5,8, which does not intersect with the
ids used elsewhere in this class.
|
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> |
sparseTrainTest() |
static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> |
sparseTrainTest(double negate)
Generates a pair of datasets, where the features are sparse,
and unknown features appear in the test data.
|
public static Dataset<ClusterID> gaussianClusters(long size, long seed)
size
- The number of points to sample for the dataset.seed
- The RNG seed.public static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> denseTrainTest()
public static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> denseTrainTest(double negate)
negate
- Supply -1.0 to negate some feature values.public static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> sparseTrainTest()
public static com.oracle.labs.mlrg.olcut.util.Pair<Dataset<ClusterID>,Dataset<ClusterID>> sparseTrainTest(double negate)
negate
- Supply -1.0 to negate some feature values.public static Example<ClusterID> invalidSparseExample()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.