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 by yourself, and save as pandas.DataFrame
feature_training, feature_names = generate_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"]
})
# Do feature engineering for test data set by yourself
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.11.tar.gz
(22.2 kB
view hashes)
Built Distribution
conjurer-0.0.11-py3-none-any.whl
(32.7 kB
view hashes)
Close
Hashes for conjurer-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78b8f5b0fcc67203553f8d6b74163fc916e24ce52ace990fd0990f1adb766691 |
|
MD5 | ad0cd5cb0699e699ca5d64aa5a18499d |
|
BLAKE2b-256 | d27b471eaf1f13a9efe7980addf1a5066b48e18d5fba85e6beea741215e7d66b |