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.8.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.8-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ds_sale_prediction_package-0.1.8.tar.gz
Algorithm Hash digest
SHA256 af3ebf7c89b62de81b155be3ec478b4986af77245e3190be915900ca34266657
MD5 eabe5b550751cedb93d1ac19c6386da3
BLAKE2b-256 2ea1cb4998b570ed6b6b7da720279ba4f2d941074072237665d0ef086b34e88c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ds_sale_prediction_package-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 14af9e318363fc687d43b8652423665ccf43ede8faf1d2aba6d2da8f87adc7e8
MD5 e0ea4519608841d9d0b51148d360024b
BLAKE2b-256 689cbbf116563efdbee509418a01780baa6ecebadee328d45553fc26f3cb146a

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