public class BinaryLinearModel extends BinaryModel
bias| Constructor and Description |
|---|
BinaryLinearModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExample(float weight,
Example example)
Adds an example to the model with a given weight.
|
Vector |
getHyperplane() |
String |
getRepresentation() |
float |
getSquaredNorm()
Computes the squared norm of the hyperplane this model is based on
|
float |
getSquaredNorm(Example example)
Computes the squared norm of a given example according to the space in which the model
is operating
|
void |
reset()
Resets the model parameters to the default state.
|
void |
setHyperplane(Vector hyperplane) |
void |
setRepresentation(String representation) |
getBias, setBiaspublic Vector getHyperplane()
public void setHyperplane(Vector hyperplane)
hyperplane - the hyperplane to setpublic String getRepresentation()
public void setRepresentation(String representation)
representation - the identifier of the representation to set. The model operates
on that representationpublic void reset()
Modelpublic void addExample(float weight,
Example example)
BinaryModeladdExample in class BinaryModelweight - the weight of the new example to addexample - the example to addpublic float getSquaredNorm(Example example)
BinaryModelgetSquaredNorm in class BinaryModelexample - the example whose squared norm is requiredpublic float getSquaredNorm()
BinaryModelgetSquaredNorm in class BinaryModelCopyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.