TestFit
The TestFit class can be used for comparing two vectors on the basis of QoF. The degrees of freedom (dfr) 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
Members list
Value members
Concrete methods
Inherited methods
Make the PREDICTION INTERVAL (PI) lower and upper bound vectors from the point predictions and the interval half widths.
Make the PREDICTION INTERVAL (PI) lower and upper bound vectors from the point predictions and the interval half widths.
Value parameters
- ihw
-
the vector of interval half widths (one for each prediction)
- yp
-
the vector of point predictions (y-hat)
Attributes
- Inherited from:
- Fit
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_raw
-
the actual response/output vector to use (test/full)
- yp_raw
-
the predicted response/output vector (test/full)
Attributes
- See also
-
Regression_WLS - Definition Classes
- Inherited from:
- Fit
Diagnose the health of the model by computing the Quality of Fit (QoF) metrics/measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted. This method also includes PREDICTION INTERVAL (PI) metrics/measures.
Diagnose the health of the model by computing the Quality of Fit (QoF) metrics/measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted. This method also includes PREDICTION INTERVAL (PI) metrics/measures.
Value parameters
- low_up
-
the predicted (lower, upper) bounds vectors
- w
-
the weights on the instances (defaults to null)
- y
-
the actual response/output vector to use (test/full)
- yp
-
the point prediction mean/median
- α
-
the significance/nominal level of uncertainty (α) (defaults to 0.1, 10%)
Attributes
- See also
-
otexts.com/fpp2/prediction-intervals.html Note:
wisshould be computed separately as the bounds are matrices. - Inherited from:
- Fit
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the predicted & actual matrix responses (output variable per column). For some models the instances may be weighted.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the predicted & actual matrix responses (output variable per column). For some models the instances may be weighted.
Value parameters
- w
-
the weights on the instances (defaults to null)
- yy
-
the actual response/output matrix to use (test/full)
- yyp
-
the predicted response/output matrix (test/full)
Attributes
- See also
-
Regression_WLS - Inherited from:
- Fit
Diagnose the health of the model by computing the Quality of Fit (QoF) measures for both POINT PREDICTIONS and PREDICTION INTERVALS.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures for both POINT PREDICTIONS and PREDICTION INTERVALS.
Value parameters
- iα
-
the index for the main significance level out of the vector α
- low_up
-
the predicted (lower, upper) bounds matrices for various α levels (column for each α level)
- y
-
the given time-series (must be aligned with the interval forecast)
- yp
-
the point prediction mean/median
- α
-
the vector of significance levels (defaults to the K = 11 prediction intervals used by the CDC Forecast Hub)
Attributes
- Inherited from:
- Fit
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, specifically for the weighted interval score that allows using custom α levels.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, specifically for the weighted interval score that allows using custom α levels.
Value parameters
- low_up
-
the predicted (lower, upper) bounds matrices for various α levels (column for each α level)
- y
-
the given time-series (must be aligned with the interval forecast)
- yp
-
the point prediction mean/median
- α
-
the vector of significance levels (defaults to the K = 11 prediction intervals used by the CDC Forecast Hub)
Attributes
- Inherited from:
- Fit
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
- Definition Classes
- Inherited from:
- Fit
Return the y-transformation.
Return the help string that describes the Quality of Fit (QoF) measures provided by the Fit trait. Override to correspond to fitLabel.
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
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
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat).
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat).
Value parameters
- df_
-
the error/residual degrees of freedom
- x_
-
the testing/full data/input matrix
- α
-
the significance level α = .1 for TWO TAILS: left tail .05 | 1 - α = .90 | .05 right tail e.g., for AutoMPG, t_crit (385, 0.90) = 1.6488210657096942 t_crit (385, 0.95) = 1.966
Attributes
- See also
-
predictCIntinPredictorstats.stackexchange.com/questions/585660/what-is-the-formula-for-prediction-interval-in-multivariate-case
- Inherited from:
- Fit
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat) and each significance level.
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat) and each significance level.
Value parameters
- df_
-
the error/residual degrees of freedom
- x_
-
the testing/full data/input matrix
- α
-
the significance levels to be used (defaults to
Fit.α_)
Attributes
- Inherited from:
- Fit
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
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 (regression/model, error)
Attributes
- Inherited from:
- Fit
Show the QoF metrics/measures in vector qof.
Show the QoF metrics/measures in vector qof.
Value parameters
- qof
-
the QoF metrics (e.g., for point and interval predictions/forecasts)
Attributes
- Inherited from:
- Fit
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
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
- Definition Classes
- Inherited from:
- Fit