public class StochasticLinearRankerWithPrior extends StochasticLinearRanker
Modifier and Type | Class and Description |
---|---|
static class |
StochasticLinearRankerWithPrior.Model |
VAR_NUM
Constructor and Description |
---|
StochasticLinearRankerWithPrior() |
Modifier and Type | Method and Description |
---|---|
StochasticLinearRankerWithPrior.Model |
getModel() |
boolean |
loadModel(StochasticLinearRankerWithPrior.Model m) |
void |
print(StochasticLinearRankerWithPrior.Model m) |
float |
priorScoreSample(String[] keys,
float[] values) |
void |
resetRanker()
Reset the ranker
|
float |
scoreSample(String[] keys,
float[] values)
Get the rank score of the sample, a sample is a list of key, value pairs.
|
boolean |
setModelParameter(String key,
String value) |
boolean |
setModelPriorWeights(HashMap<String,Float> pw) |
boolean |
updateClassifier(String[] keys_positive,
float[] values_positive,
String[] keys_negative,
float[] values_negative)
Train the ranker with a pair of samples.
|
finalize, getUModel, loadModel, print, setModelWeights
public void resetRanker()
StochasticLinearRanker
resetRanker
in class StochasticLinearRanker
public float scoreSample(String[] keys, float[] values)
StochasticLinearRanker
scoreSample
in class StochasticLinearRanker
public float priorScoreSample(String[] keys, float[] values)
public boolean updateClassifier(String[] keys_positive, float[] values_positive, String[] keys_negative, float[] values_negative)
StochasticLinearRanker
updateClassifier
in class StochasticLinearRanker
public StochasticLinearRankerWithPrior.Model getModel()
public boolean loadModel(StochasticLinearRankerWithPrior.Model m)
public boolean setModelParameter(String key, String value)
setModelParameter
in class StochasticLinearRanker
public void print(StochasticLinearRankerWithPrior.Model m)