public class MultiClassGaussianGenerator
extends java.lang.Object
Class for generating toys subject to multi-class classification tasks, using Gaussian distributions.
Toys are sampled from as many Gaussian distributions as the number of
classes, in a space with the dimension of the number of classes. Each
Gaussian has a mean of 1 on the component of the class and 0 otherwise. Thee
spacing p and the standard deviation of the Gaussian can be adjusted.
Generated lists are shuffled.
Constructor and Description |
---|
MultiClassGaussianGenerator()
Default constructor, with p=2, sigma = 1, nbclasses = 5;
|
MultiClassGaussianGenerator(int nbclasses)
Constructor specifying the number of classes
|
Modifier and Type | Method and Description |
---|---|
java.util.List<TrainingSample<double[]>> |
generateList(int samplesPerClass)
Generates a list of Toys with specified number of samples per class
|
int |
getNbclasses()
Tells the number of classes
|
float |
getP()
Tells the distance between classes
|
double |
getSigma()
Tells the standard deviation
|
void |
setNbclasses(int nbclasses)
Sets the number of classes
|
void |
setP(float p)
Sets the distance between classes
|
void |
setSigma(double sigma)
Sets the standard deviation
|
public MultiClassGaussianGenerator()
public MultiClassGaussianGenerator(int nbclasses)
nbclasses
- the number of classespublic java.util.List<TrainingSample<double[]>> generateList(int samplesPerClass)
samplesPerClass
- the number of samples for each classpublic float getP()
public void setP(float p)
p
- the p to setpublic double getSigma()
public void setSigma(double sigma)
sigma
- the sigma to setpublic int getNbclasses()
public void setNbclasses(int nbclasses)
nbclasses
- the nbclasses to set