Skip to content

piyushknaik/bikeshare_project

Repository files navigation

Bike sharing prediction

This repository contains code for a bike sharing prediction project. The goal is to predict the number of bike rentals using RandomForest model, based on various features such as weather conditions, time of day, and other relevant factors.

Project Structure

bike_sharing_prediction/
├── bike_sharing_api/
│   ├── app/
│   │   ├── __init__.py
│   │   ├── api.py
│   │   ├── config.py
│   │   ├── main.py
│   │   ├── schemas/
│   │       ├── __init__.py
│   │       ├── health.py
│   │       ├── predict.py
├── bikeshare_model/
│   ├── __init__.py
│   ├── config.yml
│   ├── pipeline.py
│   ├── predict.py
│   ├── train_pipeline.py
│   ├── VERSION
│   ├── config/
│   │   ├── __init__.py
│   │   ├── core.py
│   ├── datasets/
│   │   ├── __init__.py
│   │   ├── bike-rental-dataset.csv
│   ├── processing/
│   │   ├── __init__.py
│   │   ├── data_manager.py
│   │   ├── features.py
│   │   ├── validation.py
│   ├── trained_models/
│       ├── __init__.py
│       ├── bikeshare__model_output_v0.0.1.pkl
├── requirements/
│   ├── requirements.txt
│   ├── test_requirements.txt
├── tests/
│   ├── __ini__.py
│   ├── conftest.py
│   ├── test_features.py
│   ├── test_predictions.py

Requirements

To run this project, you need to install the required packages. You can do this by running:

pip install -r requirements/requirements.txt

Running the Application

To run the API, navigate to the bike_sharing_api/app directory and execute:

uvicorn main:app --reload

Running Tests

To run the tests, navigate to the tests directory and execute:

pytest

Model Training

To train the model, navigate to the bikeshare_model directory and execute:

python train_pipeline.py

Model Prediction

To make predictions using the trained model, you can use the predict.py script in the bikeshare_model directory. You can also use the API endpoint /predict to get predictions by sending a POST request with the required features in the request body.

About

The goal is to predict the number of bike rentals using Random Forest model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published