TestFit

scalation.modeling.TestFit
class TestFit(m: Int) extends Fit

The TestFit class can be used for comparing two vectors on the basis of QoF. The degrees of freedom (dfm) for the "model" is assumed to be 1. Can be used when the degrees of freedom are not known.

Value parameters

m

the size of vectors to compare

Attributes

Graph
Supertypes
trait Fit
trait FitM
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

override def diagnose(y: VectorD, yp: VectorD, w: VectorD): VectorD

Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted.

Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted.

Value parameters

w

the weights on the instances (defaults to null)

y

the actual response/output vector to use (test/full)

yp

the predicted response/output vector (test/full)

Attributes

See also

Regression_WLS

Definition Classes
Fit -> FitM
Inherited from:
Fit
def fit: VectorD

Return the Quality of Fit (QoF) measures corresponding to the labels given. 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). Override to add more quality of fit measures.

Return the Quality of Fit (QoF) measures corresponding to the labels given. 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). Override to add more quality of fit measures.

Attributes

Inherited from:
Fit
def help: String

Return the help string that describes the Quality of Fit (QoF) measures provided by the Fit trait. Override to correspond to fitLabel.

Return the help string that describes the Quality of Fit (QoF) measures provided by the Fit trait. Override to correspond to fitLabel.

Attributes

Inherited from:
Fit
def ll(ms: Double, s2: Double, m2: Int): Double

The log-likelihood function times -2. Override as needed.

The log-likelihood function times -2. Override as needed.

Value parameters

ms

raw Mean Squared Error

s2

MLE estimate of the population variance of the residuals

Attributes

See also
Inherited from:
Fit
def mse_: Double

Return the mean of the squares for error (sse / df). Must call diagnose first.

Return the mean of the squares for error (sse / df). Must call diagnose first.

Attributes

Inherited from:
Fit
def rSq0_: Double

Attributes

Inherited from:
FitM
def rSq_: Double

Return the coefficient of determination (R^2). Must call diagnose first.

Return the coefficient of determination (R^2). Must call diagnose first.

Attributes

Inherited from:
FitM
def resetDF(df_update: (Double, Double)): Unit

Reset the degrees of freedom to the new updated values. For some models, the degrees of freedom is not known until after the model is built.

Reset the degrees of freedom to the new updated values. For some models, the degrees of freedom is not known until after the model is built.

Value parameters

df_update

the updated degrees of freedom (model, error)

Attributes

Inherited from:
Fit
def sse_: Double

Return the sum of the squares for error (sse). Must call diagnose first.

Return the sum of the squares for error (sse). Must call diagnose first.

Attributes

Inherited from:
FitM
def summary(x_: MatrixD, fname: Array[String], b: VectorD, vifs: VectorD): String

Produce a QoF summary for a model with diagnostics for each predictor x_j and the overall Quality of Fit (QoF). Note: `Fac_Cholesky is used to compute the inverse of xtx.

Produce a QoF summary for a model with diagnostics for each predictor x_j and the overall Quality of Fit (QoF). Note: `Fac_Cholesky is used to compute the inverse of xtx.

Value parameters

b

the parameters/coefficients for the model

fname

the array of feature/variable names

vifs

the Variance Inflation Factors (VIFs)

x_

the testing/full data/input matrix

Attributes

Inherited from:
Fit