Building the Model

In regression tasks, learn to create, tune, plot, save, and make predictions from the machine learning model.

Creating the model

We can now train the Gradient Boosting Regressor using the create_model() function, which uses kk-fold cross-validation to evaluate model accuracy.

Press + to interact
# Create the model
model = create_model('gbr', fold = 10)

Create model


MAE

MSE

RMSE

R2

RMSLE

MAPE

0

2324.8131

24607040.5795

4960.5484

0.8393

0.3810

0.1751

1

2571.2202

29114809.8137

5395.8141

0.7413

0.4376

0.2551

2

2483.0865

21498482.3051

4636.6456

0.8585

0.4261

0.2000

3

2545.2911

25489822.2086

5048.7446

0.8158

0.3937

0.1765

4

2218.7259

19926308.9440

4463.8894

0.8240

0.4237

0.2161

5

1991.9530

17546103.1066

4188.8069

0.9050

0.2883

0.1446

6

2557.6356

30138770.5115

5489.8789

0.8316

0.4120

0.1911

7

1904.3245

16102540.3261

4012.7971

0.8950

0.3101

0.1860

8

1789.5416

17459155.1593

4178.4154

0.8269

0.3299

0.1574

9

2368.0500

26271250.1647

5125.5488

0.8125

0.4560

0.1721

Mean

2275.4641

22815428.3119

4750.1089

0.8350

0.3858

0.1874

SD

274.1307

4766740.8468

501.8900

0.0435

0.0546

0.0297

The dataset is partitioned into kk subsamples, with one of them being retained for validation, while the rest are used to train the model. This process is repeated kk ...