Constructor and Description |
---|
IncrementalBilinearSparseOnlineLearner()
Instantiates with the default params
|
IncrementalBilinearSparseOnlineLearner(BilinearLearnerParameters params) |
Modifier and Type | Method and Description |
---|---|
Pair<gov.sandia.cognition.math.matrix.Matrix> |
asMatrixPair(IndependentPair<Map<String,Map<String,Double>>,Map<String,Double>> in) |
Pair<gov.sandia.cognition.math.matrix.Matrix> |
asMatrixPair(IndependentPair<Map<String,Map<String,Double>>,Map<String,Double>> xy,
int nfeatures,
int nusers,
int ntasks)
Given a sparse pair of user/words and value construct a pair of matricies
using the current mappings of words and users to matrix rows.
|
Pair<gov.sandia.cognition.math.matrix.Matrix> |
asMatrixPair(Map<String,Map<String,Double>> x,
Map<String,Double> y) |
BilinearSparseOnlineLearner |
getBilinearLearner() |
BilinearSparseOnlineLearner |
getBilinearLearner(int nusers,
int nwords)
Construct a learner with the desired number of users and words.
|
com.google.common.collect.BiMap<String,Integer> |
getDependantValues() |
BilinearLearnerParameters |
getParams() |
com.google.common.collect.BiMap<String,Integer> |
getUsers() |
com.google.common.collect.BiMap<String,Integer> |
getVocabulary() |
Map<String,Double> |
predict(Map<String,Map<String,Double>> x) |
void |
process(Map<String,Map<String,Double>> x,
Map<String,Double> y) |
void |
reinitParams() |
void |
updateUserValues(Map<String,Map<String,Double>> x,
Map<String,Double> y)
Update the incremental learner and underlying weight matricies to reflect
potentially novel users, words and values to learn against
|
public IncrementalBilinearSparseOnlineLearner()
public IncrementalBilinearSparseOnlineLearner(BilinearLearnerParameters params)
params
- public void reinitParams()
public BilinearLearnerParameters getParams()
public void updateUserValues(Map<String,Map<String,Double>> x, Map<String,Double> y)
x
- y
- public BilinearSparseOnlineLearner getBilinearLearner(int nusers, int nwords)
nusers
- nwords
- BilinearSparseOnlineLearner
public BilinearSparseOnlineLearner getBilinearLearner()
BilinearSparseOnlineLearner
with the
current number of users and wordspublic Pair<gov.sandia.cognition.math.matrix.Matrix> asMatrixPair(IndependentPair<Map<String,Map<String,Double>>,Map<String,Double>> xy, int nfeatures, int nusers, int ntasks)
xy
- nfeatures
- the number of words total in the returned X matrixnusers
- the number of users total in the returned X matrixntasks
- the number of tasks in the returned Y matrixpublic com.google.common.collect.BiMap<String,Integer> getVocabulary()
public Pair<gov.sandia.cognition.math.matrix.Matrix> asMatrixPair(IndependentPair<Map<String,Map<String,Double>>,Map<String,Double>> in)
in
- asMatrixPair(IndependentPair, int, int, int)
with
the current number of words, users and valuepublic Pair<gov.sandia.cognition.math.matrix.Matrix> asMatrixPair(Map<String,Map<String,Double>> x, Map<String,Double> y)
x
- y
- asMatrixPair(IndependentPair, int, int, int)
with
the current number of words, users and valuepublic com.google.common.collect.BiMap<String,Integer> getDependantValues()