public abstract class BinaryModel extends Object implements Model
| Modifier and Type | Field and Description |
|---|---|
protected float |
bias |
| Constructor and Description |
|---|
BinaryModel() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addExample(float weight,
Example example)
Adds an example to the model with a given weight.
|
float |
getBias() |
abstract float |
getSquaredNorm()
Computes the squared norm of the hyperplane this model is based on
|
abstract float |
getSquaredNorm(Example example)
Computes the squared norm of a given example according to the space in which the model
is operating
|
void |
setBias(float bias) |
public float getBias()
public void setBias(float bias)
bias - the bias (i.e. the constant term of the hyperplane) to setpublic abstract void addExample(float weight,
Example example)
weight - the weight of the new example to addexample - the example to addpublic abstract float getSquaredNorm(Example example)
example - the example whose squared norm is requiredpublic abstract float getSquaredNorm()
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.