CSS 300 Module 5 Activity Worksheet
Use this worksheet to finish your lab exercise. Submit it to the relevant task
submission folder when full.
Deliverable:
– A phrase doc answering the next questions
Utilizing the Climate.csv dataset from Module four
Half 1: Metrics for Analysis
1. Calculate the next metrics: imply absolute error, imply squared error, root imply
squared error, and the R2 rating. Use the next code samples:
print(‘Imply Absolute Error:’, metrics.mean_absolute_error(y_test,
y_pred))
print(‘Imply Squared Error:’, metrics.mean_squared_error(y_test,
y_pred))
print(‘Root Imply Squared Error:’,
np.sqrt(metrics.mean_squared_error(y_test, y_pred)))
print(‘R-squared Rating:’, regressor.rating(X, y))
Half 2: Mannequin Refinement
1. Rerun the linear regression mannequin from Module four, however change the share of information
which can be used for testing. Strive utilizing zero.25 and zero.three.
2. Calculate the identical metrics from above.
three. Use a scatter plot to visualise all three fashions.
four. Consider the three fashions. Are any of them underfit or overfit? Which % of testing knowledge
carried out finest?

Activity Worksheet for CSS 300 Module 5
To complete your lab exercise, use this worksheet. Please submit it to the suitable task.

When completed, place it within the submission folder.

Deliverable:

– A phrase doc by which you reply the next questions

Utilizing Module four’s Climate.csv dataset

Half 1: Analysis Metrics

1. Decide the imply absolute error, imply squared error, and root imply squared error.

squared error, in addition to the R2 rating Make use of the next code examples:

metrics.imply absolute error(y check, print(‘Imply Absolute Error:’, metrics.imply absolute error(y check,

y pred))

metrics.imply squared error(y check, print(‘Imply Squared Error:’, metrics.imply squared error(y check,

y pred))

print(‘Root Imply Squared Error:’, ‘

np.sqrt(metrics.imply squared error(y pred, y check))

regressor.rating(X, y) print(‘R-squared Rating:’)

Mannequin Refinement (Half 2)

1. Rerun Module four’s linear regression mannequin, however modify the share of information.

which can be put to the check Experiment with zero.25 and zero.three.

2. Compute the identical metrics as in the 1st step.

three

Published by
Medical
View all posts