public class StandardNormalizer extends Normalizer
Example configuration:
"norm" : { "class" : "org.apache.solr.ltr.norm.StandardNormalizer", "params" : { "avg":"42", "std":"6" } }
Example normalizations:
Constructor and Description |
---|
StandardNormalizer() |
Modifier and Type | Method and Description |
---|---|
float |
getAvg() |
float |
getStd() |
float |
normalize(float value) |
LinkedHashMap<String,Object> |
paramsToMap() |
void |
setAvg(float avg) |
void |
setAvg(String avg) |
void |
setStd(float std) |
void |
setStd(String std) |
String |
toString() |
protected void |
validate()
As part of creation of a normalizer instance, this function confirms
that the normalizer parameters are valid.
|
explain, getInstance
public float getAvg()
public void setAvg(float avg)
public float getStd()
public void setStd(float std)
public void setAvg(String avg)
public void setStd(String std)
public float normalize(float value)
normalize
in class Normalizer
protected void validate() throws NormalizerException
Normalizer
validate
in class Normalizer
NormalizerException
- Normalizer Exceptionpublic LinkedHashMap<String,Object> paramsToMap()
paramsToMap
in class Normalizer
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.