Skip to main content

This package provides a comprehensive toolkit for data preparation, feature extraction, model validation, hyperparameter optimization, and results visualization created for the Kaggle competition Predict Future Sales. The competition's objective is to predict total sales for each product and store in the upcoming month.

Project description

ds_sales_prediction_package

The package is designed to optimize the machine learning pipeline for time-series sales prediction task for the Kaggle competition Predict Future Sales. It includes the following key components:

DataPreparation Prepares a combined dataset from both training and test data. - Processes training data after DQL and EDA steps. It includes target value clipping, dataset expansion using a Cartesian product, and base feature selection. - Processes test data by assigning the date_block_num value equal 34 and merges it with the preprocessed train data. - Optimizes data types based on feature values to reduce memory usage.

FeatureExtractor Generates a diverse set of features to enhance predictive model performance. - Descriptive features: (e.g. item_category_id, city, shop_type, shop_cluster_umap, shop_cluster_pca) from dict based on csv files (items, and train dataset after EDA) - One-hot encoded features (item_category_id). - TF-IDF encoded features (shop_type). - Binary features (e.g. is_moscow) - Time-based features (e.g., months_since_last_sale, months_since_first_sale). - Lag features, including lagged item_cnt_month and item_price

ModelValidator Facilitates model validation and training using time-series cross-validation. - Split the dataset into training and validation sets based on time-series cross-validation with either expanding or sliding windows. - Train and evaluate models across multiple folds, calculating RMSE for both training and validation sets. - Retrain the model on the combined training and validation data, and make predictions on the test set.

ExplainabilityLayer Explains the results of model predictions through various plots. - Supports various scikit-learn, LightGBM, XGBoost, and CatBoost models. - Includes tools for error analysis, visualizing true vs. predicted values, and identifying patterns in residuals.

optimize_model Utilizes hyperopt for hyperparameter optimization, enabling efficient model tuning to achieve optimal performance.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Installation

pip install ds_sales_prediction_package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ds_sale_prediction_package-0.1.7.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ds_sale_prediction_package-0.1.7-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file ds_sale_prediction_package-0.1.7.tar.gz.

File metadata

File hashes

Hashes for ds_sale_prediction_package-0.1.7.tar.gz
Algorithm Hash digest
SHA256 5b1248f3ea19403b2e1cbf2a64cb0a955ea15b950cdfee58d7a31bf4cfa522a9
MD5 4d725ac73b348f47d267796fa8cff092
BLAKE2b-256 b3af61c52f158f0dfc014e24fa786798bfbf9dbd757d392035ad5613ac736eb0

See more details on using hashes here.

File details

Details for the file ds_sale_prediction_package-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for ds_sale_prediction_package-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9b9782f8d21ec22f0fabcca9c3a04ec4f03fd7e23ae55fa32817e293285ac6b8
MD5 aa92ba060ba283f443ec4bf5c12aba12
BLAKE2b-256 c7cace1d110454fc2d8b8a21c13f1c9498c17e3ecfe3b66e190b53ca86dca7a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page