- Home
- Assessment

49 / 49

**Task 1:** Extract the relevant data from test_set and store it in X_test

```
X_test = test_set.loc[:,['xformHr', 'temp','weekday']]
```

**Task 2:** Extract the relevant data from test_set and store it in y_test

```
y_test = test_set.loc[:,'cnt']
```

**Task 3:** Calculate the predicted values from the model and store it in 'predictedCounts_test'

```
test_set.loc[:,'predictedCounts_test'] = final_model.predict(X_test)
```

**Task 4:** Calculate the mean squared error using mean_squared_error function.

```
final_mse = mean_squared_error(y_test, test_set.loc[:,'predictedCounts_test'])
```

XP

Checking Please wait.

Success

Error