0% found this document useful (0 votes)
2 views2 pages

DataAnalysis FinalProject

The final project involves comparing two regressors using a bike-sharing dataset to predict the total number of bike rentals. Key tasks include data examination, regressor optimization, and performance evaluation based on training time and mean squared error. The final deliverable consists of visualizations, a summary table of results, and observations on regressor performance.

Uploaded by

1933911033
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

DataAnalysis FinalProject

The final project involves comparing two regressors using a bike-sharing dataset to predict the total number of bike rentals. Key tasks include data examination, regressor optimization, and performance evaluation based on training time and mean squared error. The final deliverable consists of visualizations, a summary table of results, and observations on regressor performance.

Uploaded by

1933911033
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to Data Analysis and Machine Learning with

Python
Final Project

May 2026

Instructions: For the final project we will compare two different types of regressors on
a real-world data set of bike rentals compiled over two years. The project goals include
examination of the data, optimization of the regressor performance, and comparison
and evaluation of the two regressors.

1. Dataset: Use the provided bike-sharing dataset file named


“[Link]”. This contains a data set of bike rental transactions. Your
regression target, i.e., the variable you should try to predict from the other
columns is `cnt`, which represents the total number of bike rentals in a given
hour.
Feature Overview: The dataset contains time, calendar, and weather-related
variables that may help explain bike rental demand.
Main columns in the hourly dataset:
- `instant`: running row index or record identifier
- `dteday`: date of the observation
- `season`: season code
1 = spring, 2 = summer, 3 = fall, 4 = winter
- `yr`: year indicator: 0 = 2011, 1 = 2012
- `mnth`: month number from 1 to 12
- `hr`: hour of day from 0 to 23
- `holiday`: whether the day is a holiday: 0 = no, 1 = yes
- `weekday`: day of the week
- `workingday`: whether the day is a working day
0 = no, 1 = yes
- `weathersit`: weather situation category
1 = clear or partly cloudy
2 = mist or cloudy
3 = light snow or light rain
4 = heavy rain, ice, or severe weather
- `temp`: normalized temperature
- `atemp`: normalized “feels like” temperature
- `hum`: normalized humidity
- `windspeed`: normalized wind speed
- `cnt`: total number of bike rentals in that hour; this is the regression target
Notes for interpretation:
- some variables are numeric measurements, while others are category
codes stored as integers
- `season`, `yr`, `mnth`, `hr`, `holiday`, `weekday`, `workingday`, and `weathersit`
should usually be treated as categorical or discrete features
- `temp`, `atemp`, `hum`, and `windspeed` are continuous variables
- `cnt` is the regression target, not an input feature
- `instant` is mainly an identifier and should be considered carefully before
using it as a predictor

Suggested steps for the analysis flow:


 A notebook containing suggested data preprocessing steps and the
setup of two regressors is provided: “FinalProject_starter.ipynb”
 Your tasks are:
o Read the data file into pandas in the data structures required by
the data processing cell
o Plot all features and target values and inspect them
o Add an evaluation of the regressor performance, e.g., study
training time and mean_squared_error
o Plot the predicted vs actual ‘cnt’ value. NOTE: study these plots
carefully. Do they contain unexpected features? Could there be a
problem in the input data? Are there outlier data that cannot be
fitted/should be removed?
o Optimize the hyperparameters of the two regressors, after outlier
removal, if necessary. Try to match the training time of both
models through appropriate choice of hyperparameters.
o Evaluate the Models:
 fit the model on the training data
 record the training time
 predict on both the training set and the test set
 compute the mean squared error (MSE) on the training set
 compute the mean squared error (MSE) on the test set

Final deliverable – results summary


o Scatter plot of predicted vs actual ‘cnt’ for both regressors after
optimization and outlier removal, if necessary
o Table showing measurement of training time and MSE on training
and test data for both regressors, as well as the final chosen
hyperparameters.
o A paragraph summarizing your observations. Which regressor
shows better performance? Which one shows stronger signs of
overfitting?

You might also like