public static class FeatureInfo.Builder extends Object implements org.apache.commons.lang3.builder.Builder<FeatureInfo>
Helper class to build feature info.
Constructor and Description |
---|
Builder(int f)
Construct a new builder.
|
Modifier and Type | Method and Description |
---|---|
FeatureInfo.Builder |
addTrainingRound(double err)
Add the error for a training round.
|
FeatureInfo |
build() |
int |
getFeature()
Get the feature’s number.
|
double |
getItemAverage() |
double |
getSingularValue() |
double |
getUserAverage() |
FeatureInfo.Builder |
setItemAverage(double itemAverage) |
FeatureInfo.Builder |
setSingularValue(double singularValue)
Set the singular value for this feature.
|
FeatureInfo.Builder |
setUserAverage(double userAverage) |
public Builder(int f)
Construct a new builder.
f
- The feature number.public int getFeature()
Get the feature’s number.
public FeatureInfo build()
build
in interface org.apache.commons.lang3.builder.Builder<FeatureInfo>
public double getUserAverage()
public FeatureInfo.Builder setUserAverage(double userAverage)
public double getItemAverage()
public FeatureInfo.Builder setItemAverage(double itemAverage)
public double getSingularValue()
public FeatureInfo.Builder setSingularValue(double singularValue)
Set the singular value for this feature.
singularValue
- The feature’s singular value.public FeatureInfo.Builder addTrainingRound(double err)
Add the error for a training round.
err
- The error for the training round.