-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coeffs [null,null,null,null,null] #9
Comments
I have the same problem but I get coifs as [NAN,NAN,NAN...] |
Seems that in my case #2 has the solution - my dataset is not large enough |
@ujjwalgarg1995 @Laurix1983 you can experiment with a smaller degree, as well as use ARLeastSquare instead of ARMaxEntropy, which uses the method of Least Squares to extract the coefficients. Code sample as follows:
I've also found that in order to make the forecast meaningful using real-world data, It's better to use a subset of the data that's closer to the estimated value, as mentioned in #10:
Keeping in mind that the way the coefficients are used to construct the forecast differs between ARMaxEntropy and ARLeastSquares. You can check the source code for this on line 801 of timeseries-analysis.js. |
Initialized t as var t = new timeseries.main(data); console.log(t)
Result is : {
"options": {},
"data": [
[
"2017-08-01T00:00:00.000Z",
"38.62"
],
[
"2017-07-01T00:00:00.000Z",
"38.96"
],
[
"2017-06-01T00:00:00.000Z",
"21.64"
],
[
"2017-05-01T00:00:00.000Z",
"22.96"
],
[
"2017-04-01T00:00:00.000Z",
"24.60"
],
[
"2017-03-01T00:00:00.000Z",
"25.87"
],
[
"2017-02-01T00:00:00.000Z",
"24.02"
],
[
"2017-01-01T00:00:00.000Z",
"22.47"
],
[
"2016-12-01T00:00:00.000Z",
"20.32"
],
[
"2016-11-01T00:00:00.000Z",
"18.26"
],
[
"2016-10-01T00:00:00.000Z",
"28.92"
],
[
"2016-09-01T00:00:00.000Z",
"28.19"
],
[
"2016-08-01T00:00:00.000Z",
"27.64"
],
[
"2016-07-01T00:00:00.000Z",
"26.99"
],
[
"2016-06-01T00:00:00.000Z",
"27.90"
],
[
"2016-05-01T00:00:00.000Z",
"31.42"
],
[
"2016-04-01T00:00:00.000Z",
"34.21"
],
[
"2016-03-01T00:00:00.000Z",
"34.73"
],
[
"2016-02-01T00:00:00.000Z",
"36.54"
],
[
"2016-01-01T00:00:00.000Z",
"38.06"
],
[
"2015-12-01T00:00:00.000Z",
"40.19"
],
[
"2015-11-01T00:00:00.000Z",
"38.33"
],
[
"2015-10-01T00:00:00.000Z",
"38.43"
],
[
"2015-09-01T00:00:00.000Z",
"36.88"
]
],
"original": [
[
"2017-08-01T00:00:00.000Z",
"38.62"
],
[
"2017-07-01T00:00:00.000Z",
"38.96"
],
[
"2017-06-01T00:00:00.000Z",
"21.64"
],
[
"2017-05-01T00:00:00.000Z",
"22.96"
],
[
"2017-04-01T00:00:00.000Z",
"24.60"
],
[
"2017-03-01T00:00:00.000Z",
"25.87"
],
[
"2017-02-01T00:00:00.000Z",
"24.02"
],
[
"2017-01-01T00:00:00.000Z",
"22.47"
],
[
"2016-12-01T00:00:00.000Z",
"20.32"
],
[
"2016-11-01T00:00:00.000Z",
"18.26"
],
[
"2016-10-01T00:00:00.000Z",
"28.92"
],
[
"2016-09-01T00:00:00.000Z",
"28.19"
],
[
"2016-08-01T00:00:00.000Z",
"27.64"
],
[
"2016-07-01T00:00:00.000Z",
"26.99"
],
[
"2016-06-01T00:00:00.000Z",
"27.90"
],
[
"2016-05-01T00:00:00.000Z",
"31.42"
],
[
"2016-04-01T00:00:00.000Z",
"34.21"
],
[
"2016-03-01T00:00:00.000Z",
"34.73"
],
[
"2016-02-01T00:00:00.000Z",
"36.54"
],
[
"2016-01-01T00:00:00.000Z",
"38.06"
],
[
"2015-12-01T00:00:00.000Z",
"40.19"
],
[
"2015-11-01T00:00:00.000Z",
"38.33"
],
[
"2015-10-01T00:00:00.000Z",
"38.43"
],
[
"2015-09-01T00:00:00.000Z",
"36.88"
]
],
"buffer": [],
"saved": []
}
Then declare coeffs as var coeffs = t.ARMaxEntropy({data: t.data}); and var coeffs = t.ARMaxEntropy();
In both cases coeffs is logged as [null,null,null,null,null]
The text was updated successfully, but these errors were encountered: