CSS 300 Module 5 Activity Worksheet
Use this worksheet to complete your lab activity. Submit it to the applicable assignment
submission folder when complete.
Deliverable:
– A word document answering the following questions
Using the Weather.csv dataset from Module 4
Part 1: Metrics for Assessment
1. Calculate the following metrics: mean absolute error, mean squared error, root mean
squared error, and the R2 score. Use the following code samples:
print(‘Mean Absolute Error:’, metrics.mean_absolute_error(y_test,
y_pred))
print(‘Mean Squared Error:’, metrics.mean_squared_error(y_test,
y_pred))
print(‘Root Mean Squared Error:’,
np.sqrt(metrics.mean_squared_error(y_test, y_pred)))
print(β€˜R-squared Score:’, regressor.score(X, y))
Part 2: Model Refinement
1. Rerun the linear regression model from Module 4, but change the percentage of records
that are used for testing. Try using 0.25 and 0.3.
2. Calculate the same metrics from above.
3. Use a scatter plot to visualize all three models.
4. Evaluate the three models. Are any of them underfit or overfit? Which % of testing data
performed best?

—

Activity Worksheet for CSS 300 Module 5
To finish your lab activity, use this worksheet. Please submit it to the appropriate assignment.

When finished, place it in the submission folder.

Deliverable:

– A word document in which you answer the following questions

📝 Need Help With This Topic?

Get a custom-written paper by an expert in this subject. Plagiarism-free, on time, any citation style.

  • ✓ PhD & Masters qualified writers
  • ✓ Turnitin-safe β€” 0% similarity
  • ✓ Free revisions + money-back guarantee
Get My Paper Now

From $11/page · All academic levels

Using Module 4’s Weather.csv dataset

Part 1: Assessment Metrics

1. Determine the mean absolute error, mean squared error, and root mean squared error.

squared error, as well as the R2 score Make use of the following code examples:

metrics.mean absolute error(y test, print(‘Mean Absolute Error:’, metrics.mean absolute error(y test,

🌟 Writers Who Have Helped Students Like You

Our expert writers specialise in this subject and deliver original, well-researched papers.

S
Dr. Sarah M.★★★★★ 4.97 Β· 1,240 orders
Nursing & Healthcare Β· PhD Edinburgh
J
Prof. James K.★★★★★ 4.95 Β· 980 orders
Business & Law Β· MBA London

y pred))

metrics.mean squared error(y test, print(‘Mean Squared Error:’, metrics.mean squared error(y test,

y pred))

print(‘Root Mean Squared Error:’, ‘

np.sqrt(metrics.mean squared error(y pred, y test))

regressor.score(X, y) print(‘R-squared Score:’)

🎉 100% Satisfaction Guaranteed β€” or Your Money Back

Join 12,400+ students who trust us with their academic success. Every order includes: free revisions within 30 days, plagiarism report, on-time delivery guarantee, and full confidentiality.

★★★★★

4.9/5 from 12,400+ reviews

Order & Get 25% Off

Model Refinement (Part 2)

1. Rerun Module 4’s linear regression model, but modify the percentage of records.

that are put to the test Experiment with 0.25 and 0.3.

2. Compute the same metrics as in step one.

3