public class BiconvexDataGenerator extends Object implements MatrixDataGenerator<gov.sandia.cognition.math.matrix.Matrix>
Constructor and Description |
---|
BiconvexDataGenerator()
Generates a biconvex data generator.
|
BiconvexDataGenerator(int nusers,
int nfeatures,
int ntasks,
double sparcity,
double xsparcity,
boolean indw,
boolean indu,
int seed,
double noise) |
Modifier and Type | Method and Description |
---|---|
Pair<gov.sandia.cognition.math.matrix.Matrix> |
generate() |
gov.sandia.cognition.math.matrix.Matrix |
getU() |
gov.sandia.cognition.math.matrix.Matrix |
getW() |
public BiconvexDataGenerator()
public BiconvexDataGenerator(int nusers, int nfeatures, int ntasks, double sparcity, double xsparcity, boolean indw, boolean indu, int seed, double noise)
nusers
- The number of users (U is users x tasks, X is features x
users)nfeatures
- The number of features (W is features x tasks)ntasks
- The number of tasks (Y is 1 x tasks)sparcity
- The chance that a row of U or W is zerosxsparcity
- The chance that a column of U or W is zerosindw
- If true, there is a column of W per taskindu
- If true, there is a column of U per taskseed
- If greater than or equal to zero, the rng backing this
generator is seedednoise
- The random noise added to Y has random values for each Y
ranging from -noise to noisepublic Pair<gov.sandia.cognition.math.matrix.Matrix> generate()
generate
in interface DataGenerator<gov.sandia.cognition.math.matrix.Matrix,gov.sandia.cognition.math.matrix.Matrix>
generate
in interface MatrixDataGenerator<gov.sandia.cognition.math.matrix.Matrix>
public gov.sandia.cognition.math.matrix.Matrix getU()
public gov.sandia.cognition.math.matrix.Matrix getW()