Python library to help you to perform magic on your data analytics project
Project description
conjurer
Python library to help you to perform magic on your data analytics project; which helps
- EDA (load & check data)
- Automatic machine learning tuning
For detailed background please refer https://github.com/not-so-fat/conjurer/wiki
Install
pip install conjurer
Usage
You can build prediction pipeline from multiple data sources with following simple code.
from conjurer import (
eda,
ml
)
# Load CSVs as pandas.DataFrame
df_dict = {
name: eda.read_csv("{}_training.csv".format(name)
for name in ["target", "demand_history", "product", "customer"]
}
# Do feature engineering (not implemented)
feature_training, feature_names = engineer_feature(df_dict)
# Automatic lightgbm tuning
model = ml.tune_cv("lightgbm", "rg", feature_training, "sales_amount", feature_names, 5)
and produce prediction results.
# Load CSV files for test data set as the same data types as training
loader = eda.DfDictLoader(df_dict)
df_dict_test = loader.load({
name: "{}_test.csv".format(name)
for name in ["target", "demand_history", "product", "customer"]
})
# Feature generation for test data set (not implemented)
feature_test = generate_feature(df_dict)
# Get prediction on test data set
model.predict(feature_test)
supported ml algorithms
- LightGBM
lightgbm
(gbm_autosplit.LGBMClassifier
orgbm_autosplit.LGBMRegressor
) - XGBoost
xgboost
(gbm_autosplit.XGBClassfier
orgbm_autosplit.XGBRegressor
) - Random Forest
random_forest
(sklearn.ensemble.RandomForestClassifier
orsklearn.ensemble.RandomForestRegressor
) - Lasso / Logistic Regression
linear_model
(sklearn.linear_model.Lasso
orsklearn.linear_model.LogisticRegression
)
This module uses CV by sklearn_cv_pandas.RandomizedSearchCV
or sklearn_cv_pandas.GridSearchCV
to use
pandas.DataFrame for arguments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
conjurer-0.0.8.tar.gz
(21.8 kB
view hashes)
Built Distribution
conjurer-0.0.8-py3-none-any.whl
(32.3 kB
view hashes)