Skip to content
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

Single Exponential Smoothning #1279

Closed
wants to merge 1 commit into from
Closed

Conversation

dfrusdn
Copy link

@dfrusdn dfrusdn commented Dec 30, 2013

Since I somehow accidentally deleted the last file in #1274 but still have the code
I decided to start from scratch and make the code in Pep8 style and focus on each individual Exponential smoothing (single double and triple) separately.
This will address #512 and pandas-dev/pandas#2143

This code works good and can forecast for x amount of periods ahead using a bootstrapping method.

Improvements that are needed: .
*An solver for the alpha value using mean square error something likesum(y-wdata)/len(y)

*the Summary part needs RMS, Sum of squares residuals, AIC/AICc/BIC, Log-Likelihood, Swartz Criterion, average mean square error, Hanna-Quinn.

Here is what Eviews uses
http://www.eviews.com/EViews8/ev8ecets_n.html

Here is a set of test data to try

############Test######################
y = [47, 36, 12, 4, 84, 26, 37, 40, 72, 22]
print 'Exp=', ExpSmoothing(y, .5)

###forcasting
print 'forcast 10=', ExpSmoothing(y, .5, forecast = 10)

There is also working code in the answers to test against (without forcasting) here:
http://stackoverflow.com/questions/12726432/using-python-for-time-series-analysis-and-forecasting

Since I somehow accidentally deleted the last file in statsmodels#1274 but still have the code 
I decided to start from scratch and make the code in Pep8 style and focus on each individual Exponential smoothing (single double and triple) separately.
This will address statsmodels#512 and  pandas-dev/pandas#2143


This code works good and can forecast for x amount of periods ahead using a bootstrapping method.

Improvements that are needed: .
*An solver for the alpha value using mean square error something like`sum(y-wdata)/len(y)`


*the Summary part needs RMS, Sum of squares residuals, AIC/AICc/BIC, Log-Likelihood, Swartz Criterion, average mean square error, Hanna-Quinn.

Here is what Eviews uses
http://www.eviews.com/EViews8/ev8ecets_n.html

Here is a set of test data to try
```
############Test######################
y = [47, 36, 12, 4, 84, 26, 37, 40, 72, 22]
print 'Exp=', ExpSmoothing(y, .5)

###forcasting
print 'forcast 10=', ExpSmoothing(y, .5, forecast = 10)
```

There is also working code in the answers to test against (without forcasting) here:
http://stackoverflow.com/questions/12726432/using-python-for-time-series-analysis-and-forecasting
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 19ce6c7 on dfrusdn:patch-3 into 946021a on statsmodels:master.

@ccsv
Copy link

ccsv commented Jan 4, 2014

Updated your previous file #1287

@josef-pkt josef-pkt added the PR label Feb 19, 2014
@jseabold
Copy link
Member

Is this superseded by #1287? If so, I'd like to close this.

If not, is this still being worked on? If so, it will need some tests and examples. At least a MWE vs. R or Stata or something else.

I'm going to close it soon, if there's not any movement.

@jseabold jseabold closed this Apr 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants