|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.classifier.bayes.datastore.InMemoryBayesDatastore
public class InMemoryBayesDatastore
Class implementing the Datastore for Algorithms to read In-Memory model
Constructor Summary | |
---|---|
InMemoryBayesDatastore(Parameters params)
|
Method Summary | |
---|---|
java.util.Collection<java.lang.String> |
getKeys(java.lang.String name)
get the keySet of a given Matrix/Vector as given by name |
double |
getWeight(java.lang.String vectorName,
java.lang.String index)
Gets a double value from the Vector pointed to by the vectorName from its cell pointed to by
the index |
double |
getWeight(java.lang.String matrixName,
java.lang.String row,
java.lang.String column)
Gets a double value from the Matrix pointed to by the matrixName from its cell pointed to by
the row and column string |
void |
initialize()
Initializes the and loads the model into memory/cache if necessary |
void |
loadFeatureWeight(java.lang.String feature,
java.lang.String label,
double weight)
|
void |
setSigmaJSigmaK(double weight)
|
void |
setSumFeatureWeight(java.lang.String feature,
double weight)
|
void |
setSumLabelWeight(java.lang.String label,
double weight)
|
void |
setThetaNormalizer(java.lang.String label,
double weight)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InMemoryBayesDatastore(Parameters params)
Method Detail |
---|
public void initialize() throws InvalidDatastoreException
Datastore
initialize
in interface Datastore
InvalidDatastoreException
public java.util.Collection<java.lang.String> getKeys(java.lang.String name) throws InvalidDatastoreException
Datastore
name
getKeys
in interface Datastore
InvalidDatastoreException
public double getWeight(java.lang.String matrixName, java.lang.String row, java.lang.String column) throws InvalidDatastoreException
Datastore
matrixName
from its cell pointed to by
the row
and column
string
getWeight
in interface Datastore
InvalidDatastoreException
public double getWeight(java.lang.String vectorName, java.lang.String index) throws InvalidDatastoreException
Datastore
vectorName
from its cell pointed to by
the index
getWeight
in interface Datastore
InvalidDatastoreException
public void loadFeatureWeight(java.lang.String feature, java.lang.String label, double weight)
public void setSumFeatureWeight(java.lang.String feature, double weight)
public void setSumLabelWeight(java.lang.String label, double weight)
public void setThetaNormalizer(java.lang.String label, double weight)
public void setSigmaJSigmaK(double weight)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |