Packages

class NLS_ODE extends Predictor with Error

Given an Ordinary Differential Equation 'ODE' parameterized using the vector 'b' with Initial Value 'IV' 'y0', estimate the parameter values 'b' for the ODE using weighted Non-linear Least Squares 'NLS'.

ODE: dy/dt = f(t, y) IV: y(t0) = y0

Times series data: z(t0), z(t1), ... z(tn)

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

Instance Constructors

  1. new NLS_ODE(z: VectorD, ts: VectorD, b_init: VectorD, w: VectorD = null)

    z

    the observed values

    ts

    the time points of the observations

    b_init

    the initial guess for the parameter values 'b'

    w

    the optional weights

Value Members

  1. def analyze(x_tr: MatriD, y_tr: VectoD, x_te: MatriD, y_te: VectoD): NLS_ODE

    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.

    Definition Classes
    NLS_ODEPredictor
  2. 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
  3. def eval(yy: VectoD): NLS_ODE

    Compute the error and useful diagnostics.

    Compute the error and useful diagnostics.

    yy

    the test response/output vector

  4. def eval(xx: MatriD, yy: VectoD): NLS_ODE

    Compute the error and useful diagnostics.

    Compute the error and useful diagnostics.

    xx

    the test data/input matrix

    yy

    the test response/output vector

    Definition Classes
    NLS_ODEModel
  5. def fit: VectorD

    Return the quality of fit.

  6. def fitLabel: Seq[String]

    Return the labels for the fit.

  7. def fitMap: Map[String, String]

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

    Build a map of quality of fit measures (use of LinedHashMap makes it ordered). Override to add more quality of fit measures.

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

    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
    NLS_ODEPredictor
    See also

    Fit for index of QoF measures.

  10. 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
    NLS_ODEPredictor
  11. 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
    NLS_ODEPredictor
  12. def hparameter: HyperParameter

    Return the hyper-parameters.

    Return the hyper-parameters.

    Definition Classes
    NLS_ODEModel
  13. def init(_objectiveF: FunctionV_2S, _y0: Double): Unit

    Initialize NLS-ODE with the objective function and initial value/condition.

    Initialize NLS-ODE with the objective function and initial value/condition.

    _objectiveF

    the objective function indicating departure from observation

  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
    NLS_ODEModel
  17. def predict(zz: VectoD): Double

    Predict the value of 'y = f(zz)'.

    Predict the value of 'y = f(zz)'.

    zz

    the new vector to predict

    Definition Classes
    NLS_ODEPredictor
  18. def predict(z: MatriD): 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 (impl. classes should default z to x)

    Definition Classes
    NLS_ODEPredictor
  19. 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
  20. def report: String

    Return a basic report on the trained model.

    Return a basic report on the trained model.

    Definition Classes
    NLS_ODEModel
    See also

    'summary' method for more details

  21. def residual: VectoD

    Return the vector of residuals/errors.

    Return the vector of residuals/errors.

    Definition Classes
    NLS_ODEPredictor
  22. 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
  23. def train(): NLS_ODE

    Train the predictor by fitting the parameter vector (b-vector) using a non-linear least squares method.

  24. def train(xx: MatriD, yy: VectoD): NLS_ODE

    Train the predictor by fitting the parameter vector (b-vector) using a non-linear least squares method.

    Train the predictor by fitting the parameter vector (b-vector) using a non-linear least squares method.

    xx

    the data/input matrix

    yy

    the response/output vector

    Definition Classes
    NLS_ODEModel
  25. def wsseF(dy_dt: Derivative): Double

    Function to compute the Weighted Sum of Squares Error 'SSE' for given values for parameter vector 'b'.