@@ -15,8 +15,8 @@ status](https://www.r-pkg.org/badges/version/mlr3forecast)](https://CRAN.R-proje
1515[ ![ Mattermost] ( https://img.shields.io/badge/chat-mattermost-orange.svg )] ( https://lmmisld-lmu-stats-slds.srv.mwn.de/mlr_invite/ )
1616<!-- badges: end -->
1717
18- > \ [ !IMPORTANT\] This package is in an early stage of development and
19- > should be considered experimental.
18+ > [ !IMPORTANT]
19+ > This package is in an early stage of development and should be considered experimental.
2020
2121## Installation
2222
@@ -44,32 +44,32 @@ prediction = ff$predict_newdata(newdata, task)
4444prediction
4545# > <PredictionRegr> for 3 observations:
4646# > row_ids truth response
47- # > 1 NA 444.1509
48- # > 2 NA 473.6015
49- # > 3 NA 483.2165
47+ # > 1 NA 444.7671
48+ # > 2 NA 473.9790
49+ # > 3 NA 480.9669
5050prediction = ff $ predict(task , 142 : 144 )
5151prediction
5252# > <PredictionRegr> for 3 observations:
5353# > row_ids truth response
54- # > 1 461 456.5106
55- # > 2 390 408.6549
56- # > 3 432 395.3594
54+ # > 1 461 462.5280
55+ # > 2 390 410.8195
56+ # > 3 432 388.3864
5757prediction $ score(measure )
5858# > regr.rmse
59- # > 23.87951
59+ # > 27.91612
6060
6161ff = Forecaster $ new(lrn(" regr.ranger" ), 1 : 3 )
6262resampling = rsmp(" forecast_holdout" , ratio = 0.8 )
6363rr = resample(task , ff , resampling )
6464rr $ aggregate(measure )
6565# > regr.rmse
66- # > 97.71474
66+ # > 115.1751
6767
6868resampling = rsmp(" forecast_cv" )
6969rr = resample(task , ff , resampling )
7070rr $ aggregate(measure )
7171# > regr.rmse
72- # > 51.24863
72+ # > 51.15563
7373```
7474
7575### Multivariate
@@ -88,39 +88,39 @@ prediction = ff$predict(new_task, 142:144)
8888ff $ predict(new_task , 142 : 144 )
8989# > <PredictionRegr> for 3 observations:
9090# > row_ids truth response
91- # > 1 461 448.8459
92- # > 2 390 410.8536
93- # > 3 432 406.0194
91+ # > 1 461 450.8882
92+ # > 2 390 405.8591
93+ # > 3 432 405.1108
9494prediction $ score(measure )
9595# > regr.rmse
96- # > 20.47428
96+ # > 18.94544
9797
9898row_ids = new_task $ nrow - 0 : 2
9999ff $ predict_newdata(new_task $ data(rows = row_ids ), new_task )
100100# > <PredictionRegr> for 3 observations:
101101# > row_ids truth response
102- # > 1 432 408.5416
103- # > 2 390 389.6410
104- # > 3 461 394.0066
102+ # > 1 432 407.3052
103+ # > 2 390 386.6901
104+ # > 3 461 390.5332
105105newdata = new_task $ data(rows = row_ids , cols = new_task $ feature_names )
106106ff $ predict_newdata(newdata , new_task )
107107# > <PredictionRegr> for 3 observations:
108108# > row_ids truth response
109- # > 1 NA 408.5416
110- # > 2 NA 389.6410
111- # > 3 NA 394.0066
109+ # > 1 NA 407.3052
110+ # > 2 NA 386.6901
111+ # > 3 NA 390.5332
112112
113113resampling = rsmp(" forecast_holdout" , ratio = 0.8 )
114114rr = resample(new_task , ff , resampling )
115115rr $ aggregate(measure )
116116# > regr.rmse
117- # > 83.38583
117+ # > 80.58328
118118
119119resampling = rsmp(" forecast_cv" )
120120rr = resample(new_task , ff , resampling )
121121rr $ aggregate(measure )
122122# > regr.rmse
123- # > 43.98399
123+ # > 44.15569
124124```
125125
126126### mlr3pipelines integration
@@ -130,5 +130,5 @@ glrn = as_learner(pop %>>% ff)$train(task)
130130prediction = glrn $ predict(task , 142 : 144 )
131131prediction $ score(measure )
132132# > regr.rmse
133- # > 19.01081
133+ # > 19.22717
134134```
0 commit comments