Packages

c

scalation.analytics.fda

Regression_F2S

class Regression_F2S extends Predictor

The Regression_F2S class performs functional linear regression with scaler response and functional covariates.

y = a + <b(t),x(t)> + ε

where <b, x> denotes the inner product of b and x.

Linear Supertypes
Predictor, Model, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Regression_F2S
  2. Predictor
  3. Model
  4. Error
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Regression_F2S(x: MatriD, y: VectoD, t: VectoD, bf: DBasisFunction, technique: RegTechnique.RegTechnique = Cholesky, lambda: Double = 1E-4)

    x

    the covariate matrix - treated as functional

    y

    the response vector

    t

    the time vector

    bf

    the basis function object with derivatives support

Value Members

  1. val _1: VectorD
  2. def analyze(x_r: MatriD = x, y_r: VectoD = y, x_e: MatriD = x, y_e: VectoD = y): Regression_F2S

    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_r

    the data/input matrix (training/full)

    y_r

    the response/output vector (training/full)

    x_e

    the data/input matrix (testing/full)

    y_e

    the response/output vector (testing/full)

    Definition Classes
    Regression_F2SPredictor
  3. 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
  4. def crossValidate(k: Int): Double

    Test the accuracy of the predicted results by cross-validation, returning the sse.

    Test the accuracy of the predicted results by cross-validation, returning the sse.

    k

    number of crosses and cross-validations (defaults to 10x).

  5. val e: VectorD
  6. def eval(yy: VectoD): Regression_F2S

    Compute the error and useful diagnostics for the entire dataset.

    Compute the error and useful diagnostics for the entire dataset.

    yy

    the test response/output vector

  7. def eval(xx: MatriD = x, yy: VectoD = y): Regression_F2S

    Compute the error and useful diagnostics for the entire dataset.

    Compute the error and useful diagnostics for the entire dataset.

    xx

    the test data/input matrix

    yy

    the test response/output vector

    Definition Classes
    Regression_F2SModel
  8. def fitMap: Map[String, String]

    Return the quality of fit map.

  9. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  10. def forwardSel(cols: Set[Int], index_q: Int = index_rSqBar): (Int, Regression_F2S)

    Perform forward selection to find the most predictive variable to add the existing model, returning the variable to add and the new model.

    Perform forward selection to find the most predictive variable to add the existing model, returning the variable to add and the new model. May be called repeatedly.

    cols

    the columns of matrix x currently included in the existing model

    index_q

    index of Quality of Fit (QoF) to use for comparing quality

    Definition Classes
    Regression_F2SPredictor
    See also

    Fit for index of QoF measures.

  11. def getX: MatriD

    Return the 'used' data matrix 'x'.

    Return the 'used' data matrix 'x'. Mainly for derived classes where 'x' is expanded from the given columns in 'x_', e.g., QuadRegression add squared columns.

    Definition Classes
    Regression_F2SPredictor
  12. def getY: VectoD

    Return the 'used' response vector 'y'.

    Return the 'used' response vector 'y'. Mainly for derived classes where 'y' is transformed, e.g., TranRegression, Regression4TS.

    Definition Classes
    Regression_F2SPredictor
  13. def hparameter: HyperParameter

    Return the hyper-parameters.

    Return the hyper-parameters.

    Definition Classes
    Regression_F2SModel
  14. val modelConcept: URI

    An optional reference to an ontological concept

    An optional reference to an ontological concept

    Definition Classes
    Model
  15. def modelName: String

    An optional name for the model (or modeling technique)

    An optional name for the model (or modeling technique)

    Definition Classes
    Model
  16. def parameter: VectoD

    Return the vector of parameter/coefficient values.

    Return the vector of parameter/coefficient values.

    Definition Classes
    Regression_F2SModel
  17. def predict(z: MatriD = x): 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

    Definition Classes
    Regression_F2SPredictor
  18. def predict(z: VectoD): 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

    Definition Classes
    Regression_F2SPredictor
  19. def predict(xf: FunctionS2S): Double

    Predict the y-value at time point 'tt'.

    Predict the y-value at time point 'tt'.

    xf

    the given function of time

  20. 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
  21. def report: String

    Return a basic report on the trained model.

    Return a basic report on the trained model.

    Definition Classes
    Regression_F2SModel
    See also

    'summary' method for more details

  22. def residual: VectoD

    Return the vector of residuals/errors.

    Return the vector of residuals/errors.

    Definition Classes
    Regression_F2SPredictor
  23. val t0: Double
  24. def test(itest: VectoI): Unit

    Test the model on the testing set for cross-validation purposes

    Test the model on the testing set for cross-validation purposes

    itest

    indicies of the testing set

  25. 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
  26. val tn: Double
  27. def train(itest: IndexedSeq[Int]): Regression_F2S

    Train the model on the training set for cross-validation purposes

    Train the model on the training set for cross-validation purposes

    itest

    indicies of the testing set, to be excluded for training

  28. def train(xx: MatriD = x, yy: VectoD = y): Regression_F2S

    Train the model using the smoothed data to find the regression coefficients 'b'.

    Train the model using the smoothed data to find the regression coefficients 'b'.

    xx

    the data/input matrix

    yy

    the response.output vector

    Definition Classes
    Regression_F2SModel
  29. def x_i(i: Int): VectorD

    The inner product of phi and a smoothed function

    The inner product of phi and a smoothed function

    i

    the i-th smoothed function function

  30. val xmoo: IndexedSeq[Smoothing_F]
  31. val z: MatrixD