trait Predictor extends AnyRef
The Predictor
trait provides a common framework for several predictors.
A predictor is for potentially unbounded responses (real or integer).
When the number of distinct responses is bounded by some relatively small
integer 'k', a classifier is likdely more appropriate.
Note, the 'train' method must be called first followed by 'eval'.
- Alphabetic
- By Inheritance
- Predictor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
eval(): Unit
Compute the error and useful diagnostics for the entire dataset.
-
abstract
def
predict(z: VectoD): Double
Given a new continuous data vector z, predict the y-value of f(z).
Given a new continuous data vector z, predict the y-value of f(z).
- z
the vector to use for prediction
-
abstract
def
train(yy: VectoD): Predictor
Given a set of data vectors 'x's and their corresponding responses 'yy's, train the prediction function 'yy = f(x)' by fitting its parameters.
Given a set of data vectors 'x's and their corresponding responses 'yy's, train the prediction function 'yy = f(x)' by fitting its parameters. The 'x' values must be provided by the implementing class.
- yy
the response vector
Concrete Value Members
-
def
coefficient: VectoD
Return the vector of coefficient/parameter values.
-
def
eval(xx: MatriD, yy: VectoD): Unit
Compute the error and useful diagnostics for the test dataset.
Compute the error and useful diagnostics for the test dataset.
- xx
the test data matrix
- yy
the test response vector FIX - implement in classes
-
def
predict(z: VectoI): Double
Given a new discrete data vector z, predict the y-value of f(z).
Given a new discrete data vector z, predict the y-value of f(z).
- z
the vector to use for prediction
-
def
residual: VectoD
Return the vector of residuals/errors.