1
$\begingroup$

I have browsed a lot of topics here, but the ones I see were all about forecasting a single variable, depending on its historical values. Whereas I want to predict a variable, by estimating a relationship between multiple predictor variables as well.

So I'm trying to find a function $f(x_1,x_2, ... , x_p) = y$

-How- Can I apply a neural network approach for such a task?

If not, what alternatives can I use for this?

Edit :

I am trying to implement this in MATLAB, so I would really appreciate some MATLAB implementation of such methods.

$\endgroup$
1
$\begingroup$

you should consider a matrix of samples $X\in \mathbb R^{n\times p}$ where each column is a different variable and each rows is a different samples that is a discrete representation of your time series. After that you can train a neural network with input $X$ and output $y$ as if it is a simple polynomial interpolation.

The problem is actually more complex but this could probably be a starting point

$\endgroup$
  • $\begingroup$ Thanks, so what will y be? just an empty matrix of size n x p ? $\endgroup$ – jeff Aug 29 '14 at 21:32
  • $\begingroup$ no $y$ is your output vector. When you do polynomial interpolation you have an input $X$ and an output $y$. In this case it is the same. Usually $y\in \mathbb{R}^n$ $\endgroup$ – Donbeo Aug 29 '14 at 21:33
  • $\begingroup$ Oh, so it is what I want. Great, thanks. Can you please provide some MATLAB implementation ? $\endgroup$ – jeff Aug 29 '14 at 23:01
  • 1
    $\begingroup$ In matlab run nftool this will provide a GUI that and instructions to create your model $\endgroup$ – Donbeo Aug 30 '14 at 3:50
1
$\begingroup$

In the feedforward case, the function form is given by the following equation. $$f(a_{t-1}, a_{t-2}, .., a_{t-n}, b_{t-1}, b_{t-2},..b_{t-b}) = y_t$$

The design matrix in the space of an observations by features matrix is the column-wise concatenation of the individual autoregressive design matrices. In R, this is cbind. In Python, this is hstack. In Octave, this is horzcat.

$\endgroup$
1
$\begingroup$

this is textbook.

Here is narxnet from MathWorks. http://www.mathworks.com/help/nnet/ref/narxnet.html

narxnet is nonlinear autoregressive with exogenous (extra) variables. Each of the inputs is a time series.

Here are more links:

Best of luck.

$\endgroup$
1
$\begingroup$

You can use univariate (or multivariate) time series regressions or neural network. Neural networks are more powerful, especially the dynamic NN which have memory and they can be trained to learn sequential or time-varying patterns. In contrast to regression models, you can train your neural network model by setting different parameters (and the training algorithm to use) and then check its quality on a test set (or on the actual set of points you are trying to predict if you have it!). A crucial step is the setting of the n. of delay and the n. of the hidden neurons of the NN. An increase of them would reduce the Mean Squared Error but it would increase the computational time of the algorithm. So, it is necessary to find a right trade-off between them.

Furthermore, to start and get used to training NN, check out this applet:

https://nl.mathworks.com/help/nnet/gs/neural-network-time-series-prediction-and-modeling.html

or otherwise open the Neural Network Start GUI with this command:

nnstart

It is an easy way to train your NN and it gives you the scripts at the end!

Let me know about that!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.