Learn R Programming

DChaos (version 0.1-7)

jacobian.net: Computes the partial derivatives from the best-fitted neural net model

Description

This function computes analytically the partial derivatives from the best-fitted neural net model.

Usage

jacobian.net(
  model,
  data,
  m = 1:4,
  lag = 1:1,
  timelapse = c("FIXED", "VARIABLE"),
  h = 2:10,
  w0maxit = 100,
  wtsmaxit = 1e+06,
  pre.white = TRUE,
  trace = 1,
  seed.t = TRUE,
  seed = 56666459
)

Value

This function returns several objects considering the parameter set selected by the user. Partial derivatives are calculated analytically from the best-fitted neural net model. It also contains some useful information about the best-fitted feed-forward single hidden layer neural net model saved, the best set of weights found, the fitted values, the residuals obtained or the best embedding parameters set chosen. This function allows the R user uses the data previously obtained from the best-fitted neural network estimated by the netfit function if model is not empty. Otherwise data has to be specified.

Arguments

model

a neural network model fitted using the netfit function.

data

a vector, a time-series object ts or xts, a data.frame, a data.table or a matrix depending on the method selected in timelapse.

m

a non-negative integer denoting a lower and upper bound for the embedding dimension (Default 1:4).

lag

a non-negative integer denoting a lower and upper bound for the the reconstruction delay (Default 1:1).

timelapse

a character denoting if the time-series data are sampled at uniform time-frequency e.g., 1-month, 1-day, 1-hour, 30-min, 5-min, 1-min and so on FIXED or non-uniform time-frequency which are not equally spaced in time VARIABLE (Default FIXED).

h

a non-negative integer denoting a lower and upper bound for the number of neurones (or nodes) in the single hidden layer (Default 2:10).

w0maxit

a non-negative integer denoting the maximum iterations to estimate the initial parameter vector of the neural net models (Default 100).

wtsmaxit

a non-negative integer denoting the maximum iterations to estimate the weights parameter vector of the neural net models (Default 1e6).

pre.white

a logical value denoting if the user wants to use as points to evaluate the partial derivatives the delayed vectors filtered by the neural net model chosen TRUE or not FALSE (Default TRUE).

trace

a binary value denoting if the user wants to print the output on the console 1 or not 0 (Default 1).

seed.t

a logical value denoting if the user wants to fix the seed TRUE or not FALSE (Default TRUE).

seed

a non-negative integer denoting the value of the seed selected if seed.t = TRUE (Default 56666459).

Author

Julio E. Sandubete, Lorenzo Escot

References

Eckmann, J.P., Ruelle, D. 1985 Ergodic theory of chaos and strange attractors. Rev Mod Phys 57:617–656.

Gencay, R., Dechert, W.D. 1992 An algorithm for the n lyapunov exponents of an n-dimensional unknown dynamical system. Physica D 59(1):142–157.

Shintani, M., Linton, O. 2004 Nonparametric neural network estimation of Lyapunov exponents and a direct test for chaos. Journal of Econometrics 120(1):1-33.

Examples

Run this code
## set.seed(34)
## Simulates time-series data from the Logistic map with chaos
## ts        <- DChaos::logistic.sim(n=1000, a=4)
## show(head(ts, 5))

## Computes analytically the partial derivatives from the best-fitted neural net model
## showed in the netfit example
## model    <- DChaos::netfit(ts, m=1:4, lag=1:3, timelapse="FIXED", h=2:10)
## jacobian <- DChaos::jacobian.net(model=model)
## summary(jacobian)

## Partial derivatives are calculated analytically without setting previously any neural net model
## jacobian <- DChaos::jacobian.net(data=ts, m=3:3, lag=1:1, timelapse="FIXED", h=2:10)
## summary(jacobian)

Run the code above in your browser using DataLab