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.6.tar.gz (12.2 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.6-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ds_sale_prediction_package-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4b3ad586841cf8af1343b5f6e5eac8ce69cb6ca49f960a3c2b5bfbc4e5edb107
MD5 812e5ec0c7bf65853511441197975980
BLAKE2b-256 5b2d2795fd3ac592376dfedaf4e3689899743b7fa4a11fc74c34c35f1b78e268

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ds_sale_prediction_package-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a638b8a5dda28da61236ead381118d43a7cd1f8b230a24195584216c42dc944d
MD5 c524f8438b6b57a6b5dc4e2655d46abe
BLAKE2b-256 846107d576bcef7911d6bcce16774179ac065bf6737d5ad0da646a542a64853b

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