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.
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
To run this project, you need to install the required packages. You can do this by running:
pip install -r requirements/requirements.txtTo run the API, navigate to the bike_sharing_api/app directory and execute:
uvicorn main:app --reloadTo run the tests, navigate to the tests directory and execute:
pytestTo train the model, navigate to the bikeshare_model directory and execute:
python train_pipeline.pyTo 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.