The RNN
class implements Recurrent Neural Network (RNN) via Back Propagation Through Time (BPTT). At each time point x_t, there is a vector representing several variables or the encoding of a word. Intended to work for guessing the next work in a sentence or for multi-horizon forecasting. Time series: (x_t: t = 0, 1, ..., n_seq-1) where n_seq is the number of time points/words
Value parameters
- fname
-
the feature/variable names
- n_mem
-
the size for hidden state (h) (dimensionality of memory)
- x
-
the input sequence/time series
- y
-
the output sequence/time series
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Backward propagate to calculate gradients using chain rules in O(n_seq) time. FIX - add option of using sse loss function and fix affected partial derivatives
Backward propagate to calculate gradients using chain rules in O(n_seq) time. FIX - add option of using sse loss function and fix affected partial derivatives
Attributes
Forward propagate calculates yp, loss and intermediate variables for each step.
Forward propagate calculates yp, loss and intermediate variables for each step.
Attributes
Test the RNN predictions.
Test the RNN predictions.
Attributes
Train the RNN using batch gradient descent. IN PROGRESS
Train the RNN using batch gradient descent. IN PROGRESS
Attributes
Based on the calculated partial derivatives, update the parameters (weights and biases). ^ @pram batch_size ^ @pram leaky
Based on the calculated partial derivatives, update the parameters (weights and biases). ^ @pram batch_size ^ @pram leaky
Attributes
Inherited methods
Diagnose and return the health of the model by computing the Quality of Fit (QoF) metrics/measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted.
Diagnose and return the health of the model by computing the Quality of Fit (QoF) metrics/measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted.
Value parameters
- w
-
the weights on the instances (defaults to null)
- y
-
the actual response/output vector to use (test/full)
- yp
-
the predicted response/output vector (test/full)
Attributes
- See also
-
Regression_WLS
Override to add more metrics. - Inherited from:
- FitM
Return the Quality of Fit (QoF) measures corresponding to the labels given. 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.
Return the Quality of Fit (QoF) measures corresponding to the labels given. 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.
Attributes
- Inherited from:
- FitM
Return the help string that describes the Quality of Fit (QoF) metrics/measures.
Return the help string that describes the Quality of Fit (QoF) metrics/measures.
Attributes
- See also
-
Fit
for an implementation. Override to correspond to fitLabel. - Inherited from:
- FitM
Return the coefficient of determination (R^2). Must call diagnose first.
Return the coefficient of determination (R^2). Must call diagnose first.
Attributes
- Inherited from:
- FitM
Return the symmetric Mean Absolute Percentage Error (sMAPE) score. Caveat: y_i = yp_i = 0 => no error => no percentage error
Return the symmetric Mean Absolute Percentage Error (sMAPE) score. Caveat: y_i = yp_i = 0 => no error => no percentage error
Value parameters
- e_
-
the error/residual vector (if null, recompute)
- y
-
the given time-series (must be aligned with the forecast)
- yp
-
the forecasted time-series
Attributes
- Inherited from:
- FitM
Return the sum of the squares for error (sse). Must call diagnose first.
Return the sum of the squares for error (sse). Must call diagnose first.
Attributes
- Inherited from:
- FitM
Produce a QoF summary for a model with diagnostics for each predictor 'x_j' and the overall Quality of Fit (QoF).
Produce a QoF summary for a model with diagnostics for each predictor 'x_j' and the overall Quality of Fit (QoF).
Value parameters
- b
-
the parameters/coefficients for the model
- fname
-
the array of feature/variable names
- vifs
-
the Variance Inflation Factors (VIFs)
- x_
-
the testing/full data/input matrix
Attributes
- Inherited from:
- FitM