- Prediction of bike rental count hourly or daily based on the environmental and seasonal settings using neural networks via Pytorch.
- type of the problem: Regression problem
- inputs are (season,month,hour,holiday or not, weather, temp) output number of bikes will be rented
Bike sharing systems are new generation of traditional bike rentals where whole process from membership, rental and return back has become automatic. Through these systems, user is able to easily rent a bike from a particular position and return back at another position.
Currently, there are about over 500 bike-sharing programs around the world which is composed of over 500 thousands bicycles. Today, there exists great interest in these systems due to their important role in traffic, environmental and health issues. Apart from interesting real world applications of bike sharing systems, the characteristics of data being generated by these systems make them attractive for the research.
Opposed to other transport services such as bus or subway, the duration of travel, departure and arrival position is explicitly recorded in these systems. This feature turns bike sharing system into a virtual sensor network that can be used for sensing mobility in the city.
Hence, it is expected that most of important events in the city could be detected via monitoring these data.
- all dependencies exists in requirements.txt use
pip install -r requirements.txt
to install all requirements
- jupyter file contents bike-Sharing-patterns
- Load and view Raw Data
- Dataset characteristics
- correlation with target
- Data visualization
- Data preprocessing
- Feature engineering and one hot encoding
- Save preprocessed data
- Model Training
- Train and test loaders
- Model architecture selection
- Final model training
- Save final weights without overfitting
- Inferences
- Load and view Raw Data
- all data preprocessing and data loading in dataset module
- all train and testing in model_trainning module
- model architecture in model module
Bike-sharing rental process is highly correlated to the environmental and seasonal settings. For instance, weather conditions, precipitation, day of week, season, hour of the day, etc. can affect the rental behaviors.
The core data set is related to the two-year historical log corresponding to years 2011 and 2012 from Capital Bikeshare system, Washington D.C., USA which is publicly available in the [Capital Bikeshare system data][capitalbikeshare-url].
- bike-sharing-patterns.csv: bike sharing counts aggregated on hourly basis. Records: 17379 hours
instant
: record indexdteday
: dateseason
: season (1:springer, 2:summer, 3:fall, 4:winter)yr
: year (0: 2011, 1:2012)mnth
: month (1 to 12)hr
: hour (0 to 23)holiday
: weather [day is holiday or not][holiday-schedule-url]weekday
: day of the weekworkingday
: if day is neither weekend nor holiday is 1, otherwise is 0.weathersit
:- Clear, Few clouds, Partly cloudy, Partly cloudy
- Mist + Cloudy, Mist + Broken clouds, Mist + Few clouds, Mist
- Light Snow, Light Rain + Thunderstorm + Scattered clouds, Light Rain + Scattered clouds
- Heavy Rain + Ice Pallets + Thunderstorm + Mist, Snow + Fog
temp
: Normalized temperature in Celsius. The values are divided to 41 (max)atemp
: Normalized feeling temperature in Celsius. The values are divided to 50 (max)hum
: Normalized humidity. The values are divided to 100 (max)windspeed
: Normalized wind speed. The values are divided to 67 (max)casual
: count of casual usersregistered
: count of registered userscnt
: count of total rental bikes including both casual and registered
- the best architecture that fit with the data among alot of tested architectures