Packages

class NullModel extends Fit with Predictor with NoFeatureSelection

The NullModel class implements the simplest type of predictive modeling technique that just predicts the response 'y' to be the mean. Fit the parameter vector 'b' in the null regression equation

y = b dot x + e = b0 + e

where 'e' represents the residual/error vector (the part not explained by the model).

Linear Supertypes
NoFeatureSelection, Predictor, Model, Fit, Error, QoF, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NullModel
  2. NoFeatureSelection
  3. Predictor
  4. Model
  5. Fit
  6. Error
  7. QoF
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new NullModel(y: VectoD)

    y

    the response/output vector

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def analyze(x_: MatriD = null, y_: VectoD = y, x_e: MatriD = null, y_e: VectoD = y): NullModel

    Analyze a dataset using this model using ordinary training with the 'train' method.

    Analyze a dataset using this model using ordinary training with the 'train' method.

    x_

    the data/input matrix (ignored by NullModel)

    y_

    the response/output vector (training/full)

    x_e

    the data/input matrix (ignored by NullModel)

    y_e

    the response/output vector (testing/full)

    Definition Classes
    NullModelPredictor
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def corrMatrix(xx: MatriD): MatriD

    Return the correlation matrix for the columns in data matrix 'xx'.

    Return the correlation matrix for the columns in data matrix 'xx'.

    xx

    the data matrix shose correlation matrix is sought

    Definition Classes
    Predictor
  8. def diagnose(e: VectoD, yy: VectoD, yp: VectoD, w: VectoD = null, ym_: Double = noDouble): Unit

    Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the error/residual vector and the predicted & actual responses.

    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.

    e

    the m-dimensional error/residual vector (yy - yp)

    yy

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

    yp

    the predicted response/output vector (test/full)

    w

    the weights on the instances (defaults to null)

    ym_

    the mean of the actual response/output vector to use (training/full)

    Definition Classes
    FitQoF
    See also

    Regression_WLS

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def eval(x_null: MatriD, y_e: VectoD): NullModel

    Compute the error vector 'e' (difference between actual and predicted) and useful diagnostics.

    Compute the error vector 'e' (difference between actual and predicted) and useful diagnostics.

    x_null

    the test/full data/input matrix (ignored by NullModel)

    y_e

    the test/full response/output vector

    Definition Classes
    NullModelModel
  12. def f_(z: Double): String

    Format a double value.

    Format a double value.

    z

    the double value to format

    Definition Classes
    QoF
  13. def fit: VectoD

    Return the Quality of Fit (QoF) measures corresponding to the labels given above in the 'fitLabel' method.

    Return the Quality of Fit (QoF) measures corresponding to the labels given above in the 'fitLabel' method. 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.

    Definition Classes
    FitQoF
  14. def fitLabel: Seq[String]

    Return the labels for the Quality of Fit (QoF) measures.

    Return the labels for the Quality of Fit (QoF) measures. Override to add additional QoF measures.

    Definition Classes
    FitQoF
  15. def fitMap: Map[String, String]

    Build a map of quality of fit measures (use of LinkedHashMap makes it ordered).

    Build a map of quality of fit measures (use of LinkedHashMap makes it ordered).

    Definition Classes
    QoF
  16. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  17. def forwardSel(cols: Set[Int], index_q: Int): (Int, Predictor)
    Definition Classes
    NoFeatureSelection
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def getX: MatriD

    Return the 'used' data matrix 'x' (for this model it's null).

    Return the 'used' data matrix 'x' (for this model it's null).

    Definition Classes
    NullModelPredictor
  20. def getY: VectoD

    Return the 'used' response vector 'y'.

    Return the 'used' response vector 'y'.

    Definition Classes
    NullModelPredictor
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def help: String

    Return the help string that describes the Quality of Fit (QoF) measures provided by the Fit class.

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

    Definition Classes
    FitQoF
  23. def hparameter: HyperParameter

    Return the hyper-parameters (the NullModel has none).

    Return the hyper-parameters (the NullModel has none).

    Definition Classes
    NullModelModel
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def ll(ms: Double = mse0, s2: Double = sig2e, m2: Int = m): Double

    The log-likelihood function times -2.

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

    ms

    raw Mean Squared Error

    s2

    MLE estimate of the population variance of the residuals

    Definition Classes
    Fit
    See also

    www.stat.cmu.edu/~cshalizi/mreg/15/lectures/06/lecture-06.pdf

    www.wiley.com/en-us/Introduction+to+Linear+Regression+Analysis%2C+5th+Edition-p-9780470542811 Section 2.11

  26. val modelConcept: URI

    An optional reference to an ontological concept

    An optional reference to an ontological concept

    Definition Classes
    Model
  27. def modelName: String

    An optional name for the model (or modeling technique)

    An optional name for the model (or modeling technique)

    Definition Classes
    Model
  28. def mse_: Double

    Return the mean of squares for error (sse / df._2).

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

    Definition Classes
    Fit
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. def parameter: VectoD

    Return the vector of parameter/coefficient values.

    Return the vector of parameter/coefficient values.

    Definition Classes
    NullModelModel
  33. def predict(z: MatriD = null): VectoD

    Predict the value of 'y = f(z)' by evaluating the formula 'y = b dot z', for each row of matrix 'z'.

    Predict the value of 'y = f(z)' by evaluating the formula 'y = b dot z', for each row of matrix 'z'.

    z

    the new matrix to predict (only used for dimension)

    Definition Classes
    NullModelPredictor
  34. def predict(z: VectoD): Double

    Predict the value of 'y = f(z)' by evaluating the formula 'y = b dot z', i.e., '[b0] dot [z0]'.

    Predict the value of 'y = f(z)' by evaluating the formula 'y = b dot z', i.e., '[b0] dot [z0]'.

    z

    the new vector to predict

    Definition Classes
    NullModelPredictor
  35. def predict(z: VectoI): Double

    Given a new discrete data/input vector 'z', predict the 'y'-value of 'f(z)'.

    Given a new discrete data/input vector 'z', predict the 'y'-value of 'f(z)'.

    z

    the vector to use for prediction

    Definition Classes
    Predictor
  36. def report: String

    Return a basic report on the trained model.

    Return a basic report on the trained model.

    Definition Classes
    NullModelModel
    See also

    'summary' method for more details

  37. def resetDF(df_update: PairD): Unit

    Reset the degrees of freedom to the new updated values.

    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.

    df_update

    the updated degrees of freedom (model, error)

    Definition Classes
    Fit
  38. def residual: VectoD

    Return the vector of residuals/errors.

    Return the vector of residuals/errors.

    Definition Classes
    NullModelPredictor
  39. var sig2e: Double
    Attributes
    protected
    Definition Classes
    Fit
  40. def summary(b: VectoD, stdErr: VectoD, vf: VectoD, show: Boolean = false): String

    Produce a summary report with diagnostics for each predictor 'x_j' and the overall quality of fit.

    Produce a summary report with diagnostics for each predictor 'x_j' and the overall quality of fit.

    b

    the parameters/coefficients for the model

    vf

    the Variance Inflation Factors (VIFs)

    show

    flag indicating whether to print the summary

    Definition Classes
    Fit
  41. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  42. def test(modelName: String, doPlot: Boolean = true): Unit

    Test the model on the full dataset (i.e., train and evaluate on full dataset).

    Test the model on the full dataset (i.e., train and evaluate on full dataset).

    modelName

    the name of the model being tested

    doPlot

    whether to plot the actual vs. predicted response

    Definition Classes
    Predictor
  43. def toString(): String
    Definition Classes
    AnyRef → Any
  44. def train(x_null: MatriD, y_: VectoD): NullModel

    Train the predictor by fitting the parameter vector (b-vector) in the null regression equation.

    Train the predictor by fitting the parameter vector (b-vector) in the null regression equation.

    x_null

    the training/full data/input matrix (ignored by NullModel)

    y_

    the training/full response/output vector

    Definition Classes
    NullModelModel
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from NoFeatureSelection

Inherited from Predictor

Inherited from Model

Inherited from Fit

Inherited from Error

Inherited from QoF

Inherited from AnyRef

Inherited from Any

Ungrouped