ellisp / forecastxgb-r-package

An R package for time series models and forecasts with xgboost compatible with {forecast} S3 classes
GNU General Public License v3.0
140 stars 42 forks source link

Training period #41

Open MRibeiro2107 opened 6 years ago

MRibeiro2107 commented 6 years ago

Hi. I'd like know if is possible change the training period in function xgbar.

NahuelGrasso commented 6 years ago

you can subset the y using the function subset(y,start=11,end=19).

xgbar(subset(y,start=11,end=19))

MRibeiro2107 commented 6 years ago

Thanks a lot

Prof. Me. Matheus Henrique Dal Molin Ribeiro Vice-Coordenador do Curso de Licenciatura em Matemática Departamento de Matemática UTFPR - Pato Branco

2018-02-15 15:34 GMT-02:00 Nahuel Grasso notifications@github.com:

you can subset the y using the function subset(y,start=11,end=19).

xgbar(subset(y,start=11,end=19))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ellisp/forecastxgb-r-package/issues/41#issuecomment-366003003, or mute the thread https://github.com/notifications/unsubscribe-auth/Agp6XZdwipcsx9OzMcLr2VVsWb01YXGMks5tVGqmgaJpZM4Q4JfM .

MRibeiro2107 commented 6 years ago

Hi.

I got it change the training period using the maxlag function. Using your sugestion, not was possible.

Prof. Me. Matheus Henrique Dal Molin Ribeiro Vice-Coordenador do Curso de Licenciatura em Matemática Departamento de Matemática UTFPR - Pato Branco

2018-02-15 15:48 GMT-02:00 Matheus Henrique Dal Molin Ribeiro < matheus.dalmolinribeiro@gmail.com>:

Thanks a lot

Prof. Me. Matheus Henrique Dal Molin Ribeiro Vice-Coordenador do Curso de Licenciatura em Matemática Departamento de Matemática UTFPR - Pato Branco

2018-02-15 15:34 GMT-02:00 Nahuel Grasso notifications@github.com:

you can subset the y using the function subset(y,start=11,end=19).

xgbar(subset(y,start=11,end=19))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ellisp/forecastxgb-r-package/issues/41#issuecomment-366003003, or mute the thread https://github.com/notifications/unsubscribe-auth/Agp6XZdwipcsx9OzMcLr2VVsWb01YXGMks5tVGqmgaJpZM4Q4JfM .

NahuelGrasso commented 6 years ago

I think the maxlag is used for other purpose. I think that, if the y is your training data (and is a ts object) and you want to shrink it, it may work with subset. Let's say you have monthly data (12 rows per year) from january 2014 to december 2017 and you want to train on data ranged from june 2014 to december 2016. your code would look like: xgbar(subset(y,start=6,end=36)) Thats my understanding.

MRibeiro2107 commented 6 years ago

Ok.

I understood.

I'll try do this.

Prof. Me. Matheus Henrique Dal Molin Ribeiro Vice-Coordenador do Curso de Licenciatura em Matemática Departamento de Matemática UTFPR - Pato Branco

2018-02-15 16:45 GMT-02:00 Nahuel Grasso notifications@github.com:

I think the maxlag is used for other purpose. I think that, if the y is your training data (and is a ts object) and you want to shrink it, it may work with subset. Let's say you have monthly data (12 rows per year) from january 2014 to december 2017 and you want to train on data ranged from june 2014 to december 2016. your code would look like: xgbar(subset(y,start=6,end=36)) Thats my understanding.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ellisp/forecastxgb-r-package/issues/41#issuecomment-366023102, or mute the thread https://github.com/notifications/unsubscribe-auth/Agp6XXIUCx5YdRJUnSocE6JJCaTmidU5ks5tVHtGgaJpZM4Q4JfM .

NahuelGrasso commented 6 years ago

Let me know if it doesnt work and we will find a solution! ;)