Fuel Burn Prediction Model

Model Overview

This is a RandomForestRegressor model designed to predict fuel burn in kilograms based on three key features:

  • Truck ID: Identifier of the truck (e.g., Truck_ID).
  • Kms Driven: The number of kilometers the truck has driven.
  • Litros (Fuel Consumed): The amount of fuel consumed in liters.

The model is trained using historical data of trucks, which includes fuel consumption and distances driven. It predicts fuel consumption (in kilograms) given the truck's specific parameters.

Model Specifications

  • Algorithm: Random Forest Regressor
  • Input Features:
    • Truck ID (Categorical, one-hot encoded)
    • Kilometers driven (Continuous)
    • Fuel consumption in liters (Continuous)
  • Output:
    • Predicted fuel burn (in kilograms)

Model Performance

  • R-squared (R²): 0.9996 on the test set.
  • Mean Absolute Error (MAE): 0.1513.
  • Mean Squared Error (MSE): Low, showing strong model performance.

These metrics indicate that the model performs exceptionally well on the test set and can generalize to unseen data with high accuracy.

Usage

You can load this model using joblib and use it to predict fuel consumption for new truck data.

Example Usage:

import joblib
import pandas as pd

# Load the model
model = joblib.load('fuel_burn_model.pkl')

# Example input data
input_data = pd.DataFrame({
    'Truck_ID': [0],  # Use the numerical representation of the Truck ID(1,2,3)
    'Kms': [100000],  # Kilometers driven
    'Litros': [150]   # Fuel consumption in liters
})

# Predict fuel burn in kilograms
predicted_fuel_burn = model.predict(input_data)
print(f"Predicted fuel burn: {predicted_fuel_burn[0]:.2f} kg")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
Inference API (serverless) does not yet support scikit-learn models for this pipeline type.

Space using poudel/fuel-burn-predictor 1