modelGradient {tigre}R Documentation

Model log-likelihood/objective error function and its gradient.

Description

modeGradient gives the gradient of the objective function for a model. By default the objective function (modelObjective) is a negative log likelihood (modelLogLikelihood).

Usage

  modelObjective(params, model, ...)
  modelLogLikelihood(model)
  modelGradient(params, model, ...)

Arguments

params

parameter vector to evaluate at.

model

model structure.

...

optional additional arguments.

Value

g

the gradient of the error function to be minimised.

v

the objective function value (lower is better).

ll

the log-likelihood value.

See Also

modelOptimise.

Examples

  # Load a mmgmos preprocessed fragment of the Drosophila developmental
  # time series
  data(drosophila_gpsim_fragment)

  # The probe identifier for TF 'twi'
  twi <- "143396_at"
  # The probe identifier for the target gene
  targetProbe <- "152715_at"

  # Create the model but do not optimise
  model <- GPLearn(drosophila_gpsim_fragment,
                   TF=twi, targets=targetProbe,
                   useGpdisim=TRUE, quiet=TRUE,
                   dontOptimise=TRUE)
  params <- modelExtractParam(model, only.values=FALSE)
  ll <- modelLogLikelihood(model)
  paramValues <- modelExtractParam(model, only.values=TRUE)
  modelGradient(paramValues, model)

[Package tigre version 1.47.1 Index]