trait Forecaster extends AnyRef
The Forecaster
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
- Forecaster
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
eval(yy: VectoD): Unit
Compute the error and useful diagnostics for the entire dataset.
Compute the error and useful diagnostics for the entire dataset.
- yy
the response vector
-
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): Forecaster
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
diagnose(yy: VectoD, ee: VectoD): Unit
Compute diagostics for the predictor.
Compute diagostics for the predictor. Override to add more diagostics. Note, for 'mse' and 'rmse', 'sse' is divided by the number of instances 'm' rather than the degrees of freedom.
- yy
the response vector
- ee
the error/residual vector
- Attributes
- protected
- See also
en.wikipedia.org/wiki/Mean_squared_error
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fit: VectoD
Return the quality of fit including 'sst', 'sse', 'mae', rmse' and 'rSq'.
Return the quality of fit including 'sst', 'sse', 'mae', rmse' and 'rSq'. Note, if 'sse > sst', the model introduces errors and the 'rSq' may be negative, otherwise, R^2 ('rSq') ranges from 0 (weak) to 1 (strong). Note that 'rSq' is the last or number 5 measure. Override to add more quality of fit measures.
-
def
fitLabels: Seq[String]
Return the labels for the fit.
Return the labels for the fit. Override when necessary.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val index_rSq: Int
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
mae: Double
- Attributes
- protected
-
def
metrics: Map[String, Any]
Build a map of selected quality of fit measures/metrics.
-
val
mse: Double
- Attributes
- protected
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
-
val
rSq: Double
- Attributes
- protected
-
val
rmse: Double
- Attributes
- protected
-
val
sse: Double
- Attributes
- protected
-
val
ssr: Double
- Attributes
- protected
-
val
sst: Double
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )