--- annotations_creators: - machine-generated language_creators: - found language: - en license: apache-2.0 multilinguality: monolingual size_categories: 10K Click to expand | Hyperparameter | Value | |------------------|---------| | alpha | 1 | | copy_X | True | | fit_intercept | False | | max_iter | 1000 | | positive | False | | precompute | False | | random_state | | | selection | cyclic | | tol | 0.0001 | | warm_start | False | ### Model Plot
Lasso(alpha=1, fit_intercept=False)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
## Evaluation Results The model achieved the following results on the test set: - **Mean Absolute Error (MAE)**: 50.31928636001356 - **R² Score**: 0.8854065597299239 ### Key Insights: - Longer ride durations increase costs significantly, which may justify adding a surcharge for long-distance rides. - Evening bookings reduce costs, potentially indicating lower demand during these hours. - The model's accuracy is dependent on high-quality feature data. Refer to the plots and tables for detailed performance insights. ### Model Coefficients | Feature | Coefficient | |---------|-------------| | Number_of_Riders | -0.1398 | | Number_of_Drivers | 0.4665 | | Number_of_Past_Rides | -0.0033 | | Average_Ratings | -0.0000 | | Expected_Ride_Duration | 3.4973 | | Location_Category_Suburban | 0.0000 | | Location_Category_Urban | -0.0000 | | Customer_Loyalty_Status_Regular | 0.0000 | | Customer_Loyalty_Status_Silver | 0.0000 | | Time_of_Booking_Evening | -2.4212 | | Time_of_Booking_Morning | -0.0000 | | Time_of_Booking_Night | 0.0000 | | Vehicle_Type_Premium | 39.5754 | ### Regression Equation Cost of Ride = *-0.1398* × *Number_of_Riders* + *0.4665* × *Number_of_Drivers* + *-0.0033* × *Number_of_Past_Rides* + *3.4973* × *Expected_Ride_Duration* + *-2.4212* × *Time_of_Booking_Evening* + *39.5754* × *Vehicle_Type_Premium* ### Actual vs Predicted The following plot shows the relationship between the actual and predicted values. The closer the points are to the diagonal line, the better the predictions. The dashed line represents the ideal case where predictions perfectly match the actual values. ![Actual vs Predicted Plot](actual_vs_predicted.png) The scatter plot above shows the predicted values against the actual values. The dashed line represents the ideal predictions where the predicted values are equal to the actual values. # How to Get Started with the Model To use this model: 1. **Install Dependencies**: Ensure `scikit-learn` and `pandas` are installed in your environment. 2. **Load the Model**: Download the saved model file and load it using `joblib`: ```python from joblib import load model = load('best_model.joblib') ``` 3. **Prepare Input Features**: Create a DataFrame with the required input features in the same format as the training dataset. 4. **Make Predictions**: Use the `predict` method to generate predictions: ```python predictions = model.predict(input_features) ``` # Model Card Authors This model card was written by **Pranav Sharma**. # Model Card Contact For inquiries or feedback, you can contact the author via **[GitHub](https://github.com/PranavSharma)**. # Citation If you use this model, please cite it as follows: ``` @model{pranav_sharma_dynamic_pricing_model_2025, author = {Pranav Sharma}, title = {Dynamic Pricing Model}, year = {2025}, version = {1.0.0}, url = {https://huggingface.co/PranavSharma/dynamic-pricing-model} } ```