Auto MPG Predictor

This model predicts a vehicle's fuel efficiency (miles per gallon) based on its characteristics.

Model Details

  • Model type: Linear Regression
  • Input features: cylinders, displacement, horsepower, weight, acceleration, model_year, origin_Japan, origin_USA
  • Target: mpg (miles per gallon)

How to Use

from huggingface_hub import hf_hub_download
import joblib

# Download model and scaler
model_path = hf_hub_download(repo_id="your-username/auto-mpg-regressor", filename="auto_mpg_regressor.joblib")
scaler_path = hf_hub_download(repo_id="your-username/auto-mpg-regressor", filename="scaler.joblib")

model = joblib.load(model_path)
scaler = joblib.load(scaler_path)

# Prepare input data (same order as features in config)
import numpy as np
sample_input = np.array([[6, 225, 100, 3233, 15.4, 76, 0, 1]])  # Example input

# Preprocess
scaled_input = scaler.transform(sample_input)

# Predict
prediction = model.predict(scaled_input)
print(f"Predicted MPG: {prediction[0]}")
Downloads last month
0
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support