Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 3.02 KB

File metadata and controls

108 lines (78 loc) · 3.02 KB

Truck Suspension Performance Prediction

This project aims to develop a predictive model for truck suspension performance using linear regression. The model takes various input parameters related to truck specifications and predicts a performance metric. Additionally, the project includes a Streamlit web application that allows users to interactively input data and receive predictions. The application also leverages OpenAI's API to provide maintenance insights based on the predicted performance.

Table of Contents

Features

  • Predicts truck suspension performance based on user inputs.
  • Provides maintenance recommendations using OpenAI's API.
  • User-friendly interface built with Streamlit.

Technologies Used

  • Python: Programming language used for development.
  • Streamlit: Framework for building the web application.
  • Scikit-learn: Library for machine learning algorithms.
  • OpenAI API: For generating maintenance insights.
  • Pandas: For data manipulation and analysis.
  • Joblib: For saving and loading the trained model.

Installation

  1. Clone this repository:

    git clone https://github.com/SagarFall2022/Machine-Learning.git
    cd Truck Suspension Performance Prediction/
  2. Create a virtual environment and activate it:

    python -m venv venv
    • On Windows use:
      venv\Scripts\activate
    • On macOS/Linux use:
      source venv/bin/activate
  3. Install the required packages:

    pip install -r requirements.txt
  4. Set your OpenAI API key in your environment variables:

    • On macOS/Linux:
      export OPENAI_API_KEY='your_openai_api_key'
    • On Windows use:
      set OPENAI_API_KEY='your_openai_api_key'

Usage

  1. Open your terminal or command prompt.

  2. Navigate to the project directory:

    cd path/to/my_truck_project/
  3. Run the Streamlit app:

    streamlit run app.py
  4. Interact with the application:

    • A new tab will open in your default web browser displaying the Streamlit application.
    • Input your truck parameters and click the "Predict Performance" button to receive predictions and maintenance insights.

Model Training

The model is trained using synthetic data generated within the project. The training process includes:

  • Data generation
  • Model training using Linear Regression
  • Saving the trained model for future predictions

Model Performance

During training, the model's coefficients and R² score are printed to provide insights into its performance.

Deployment

This application can be deployed using platforms like Streamlit Sharing, Heroku, or AWS. Ensure all environment variables are correctly set in your deployment environment.