未验证 提交 96b39861 编写于 作者: P PyCaret 提交者: GitHub

Add files via upload

上级 ba7c350b
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
PyCaret is end-to-end open source machine learning library for python programming language. Its primary objective is to reduce the cycle time of hypothesis to insights by providing an easy to use high level unified API. PyCaret's vision is to become defacto standard for teaching machine learning and data science. Our strength is in our easy to use unified interface for both supervised and unsupervised learning. It saves time and effort that citizen data scientists, students and researchers spent on coding or learning to code using different interfaces, so that now they can focus on business problem. PyCaret is end-to-end open source machine learning library for python programming language. Its primary objective is to reduce the cycle time of hypothesis to insights by providing an easy to use high level unified API. PyCaret's vision is to become defacto standard for teaching machine learning and data science. Our strength is in our easy to use unified interface for both supervised and unsupervised learning. It saves time and effort that citizen data scientists, students and researchers spent on coding or learning to code using different interfaces, so that now they can focus on business problem.
## Current Release ## Current Release
The current release is beta 0.0.30 (as of 31/01/2020). A full release is targetted in the first week of February 2020. The current release is beta 0.0.31 (as of 01/02/2020). A full release is targetted in the first week of February 2020.
## Features Currently Available ## Features Currently Available
As per beta 0.0.30 following modules are generally available: As per beta 0.0.31 following modules are generally available:
* pycaret.datasets <br/> * pycaret.datasets <br/>
* pycaret.classification (binary and multiclass) <br/> * pycaret.classification (binary and multiclass) <br/>
* pycaret.regression <br/> * pycaret.regression <br/>
...@@ -31,7 +31,7 @@ pip install pycaret ...@@ -31,7 +31,7 @@ pip install pycaret
``` ```
## Quick Start ## Quick Start
As of beta 0.0.30 classification, regression, nlp, arules, anomaly and clustering modules are available. As of beta 0.0.31 classification, regression, nlp, arules, anomaly and clustering modules are available.
### Classification / Regression ### Classification / Regression
......
此差异已折叠。
...@@ -403,14 +403,14 @@ def setup(data, ...@@ -403,14 +403,14 @@ def setup(data,
data_cols = data_cols.drop(target) data_cols = data_cols.drop(target)
ord_keys = ordinal_features.keys() ord_keys = ordinal_features.keys()
for k in ord_keys:
if len(data[k].unique()) != len(ordinal_features.get(k)):
sys.exit("(Value Error) Levels passed in ordinal_features param doesnt match with levels in data. ")
for i in ord_keys: for i in ord_keys:
if i not in data_cols: if i not in data_cols:
sys.exit("(Value Error) Column name passed as a key in ordinal_features param doesnt exist. ") sys.exit("(Value Error) Column name passed as a key in ordinal_features param doesnt exist. ")
for k in ord_keys:
if len(data[k].unique()) != len(ordinal_features.get(k)):
sys.exit("(Value Error) Levels passed in ordinal_features param doesnt match with levels in data. ")
for i in ord_keys: for i in ord_keys:
value_in_keys = ordinal_features.get(i) value_in_keys = ordinal_features.get(i)
value_in_data = list(data[i].unique()) value_in_data = list(data[i].unique())
...@@ -898,9 +898,9 @@ def setup(data, ...@@ -898,9 +898,9 @@ def setup(data,
#generate values for grid show #generate values for grid show
missing_values = data_before_preprocess.isna().sum().sum() missing_values = data_before_preprocess.isna().sum().sum()
if missing_values > 0: if missing_values > 0:
missing_flag = 'True' missing_flag = True
else: else:
missing_flag = 'False' missing_flag = False
if normalize is True: if normalize is True:
normalize_grid = normalize_method normalize_grid = normalize_method
...@@ -928,9 +928,9 @@ def setup(data, ...@@ -928,9 +928,9 @@ def setup(data,
rare_level_threshold_grid = 'None' rare_level_threshold_grid = 'None'
if bin_numeric_features is None: if bin_numeric_features is None:
numeric_bin_grid = 'False' numeric_bin_grid = False
else: else:
numeric_bin_grid = 'True' numeric_bin_grid = True
if remove_outliers is False: if remove_outliers is False:
outliers_threshold_grid = None outliers_threshold_grid = None
...@@ -977,6 +977,11 @@ def setup(data, ...@@ -977,6 +977,11 @@ def setup(data,
else: else:
unknown_categorical_method_grid = None unknown_categorical_method_grid = None
if group_features is not None:
group_features_grid = True
else:
group_features_grid = False
learned_types = preprocess.dtypes.learent_dtypes learned_types = preprocess.dtypes.learent_dtypes
learned_types.drop(target, inplace=True) learned_types.drop(target, inplace=True)
...@@ -1226,7 +1231,7 @@ def setup(data, ...@@ -1226,7 +1231,7 @@ def setup(data,
['Polynomial Degree ', polynomial_degree_grid], #new ['Polynomial Degree ', polynomial_degree_grid], #new
['Trignometry Features ', trigonometry_features], #new ['Trignometry Features ', trigonometry_features], #new
['Polynomial Threshold ', polynomial_threshold_grid], #new ['Polynomial Threshold ', polynomial_threshold_grid], #new
['Group Features ', group_features], #new ['Group Features ', group_features_grid], #new
['Feature Selection ', feature_selection], #new ['Feature Selection ', feature_selection], #new
['Features Selection Threshold ', feature_selection_threshold_grid], #new ['Features Selection Threshold ', feature_selection_threshold_grid], #new
['Feature Interaction ', feature_interaction], #new ['Feature Interaction ', feature_interaction], #new
...@@ -1318,7 +1323,7 @@ def setup(data, ...@@ -1318,7 +1323,7 @@ def setup(data,
['Polynomial Degree ', polynomial_degree_grid], #new ['Polynomial Degree ', polynomial_degree_grid], #new
['Trignometry Features ', trigonometry_features], #new ['Trignometry Features ', trigonometry_features], #new
['Polynomial Threshold ', polynomial_threshold_grid], #new ['Polynomial Threshold ', polynomial_threshold_grid], #new
['Group Features ', group_features], #new ['Group Features ', group_features_grid], #new
['Feature Selection ', feature_selection], #new ['Feature Selection ', feature_selection], #new
['Features Selection Threshold ', feature_selection_threshold_grid], #new ['Features Selection Threshold ', feature_selection_threshold_grid], #new
['Feature Interaction ', feature_interaction], #new ['Feature Interaction ', feature_interaction], #new
...@@ -1406,7 +1411,7 @@ def setup(data, ...@@ -1406,7 +1411,7 @@ def setup(data,
['Polynomial Degree ', polynomial_degree_grid], #new ['Polynomial Degree ', polynomial_degree_grid], #new
['Trignometry Features ', trigonometry_features], #new ['Trignometry Features ', trigonometry_features], #new
['Polynomial Threshold ', polynomial_threshold_grid], #new ['Polynomial Threshold ', polynomial_threshold_grid], #new
['Group Features ', group_features], #new ['Group Features ', group_features_grid], #new
['Feature Selection ', feature_selection], #new ['Feature Selection ', feature_selection], #new
['Features Selection Threshold ', feature_selection_threshold_grid], #new ['Features Selection Threshold ', feature_selection_threshold_grid], #new
['Feature Interaction ', feature_interaction], #new ['Feature Interaction ', feature_interaction], #new
...@@ -1444,7 +1449,6 @@ def setup(data, ...@@ -1444,7 +1449,6 @@ def setup(data,
def create_model(estimator = None, def create_model(estimator = None,
ensemble = False, ensemble = False,
method = None, method = None,
......
此差异已折叠。
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# License: MIT # License: MIT
def setup(data, def setup(data,
target, target,
train_size=0.7, train_size=0.7,
...@@ -412,14 +414,14 @@ def setup(data, ...@@ -412,14 +414,14 @@ def setup(data,
data_cols = data_cols.drop(target) data_cols = data_cols.drop(target)
ord_keys = ordinal_features.keys() ord_keys = ordinal_features.keys()
for k in ord_keys:
if len(data[k].unique()) != len(ordinal_features.get(k)):
sys.exit("(Value Error) Levels passed in ordinal_features param doesnt match with levels in data. ")
for i in ord_keys: for i in ord_keys:
if i not in data_cols: if i not in data_cols:
sys.exit("(Value Error) Column name passed as a key in ordinal_features param doesnt exist. ") sys.exit("(Value Error) Column name passed as a key in ordinal_features param doesnt exist. ")
for k in ord_keys:
if len(data[k].unique()) != len(ordinal_features.get(k)):
sys.exit("(Value Error) Levels passed in ordinal_features param doesnt match with levels in data. ")
for i in ord_keys: for i in ord_keys:
value_in_keys = ordinal_features.get(i) value_in_keys = ordinal_features.get(i)
value_in_data = list(data[i].unique()) value_in_data = list(data[i].unique())
...@@ -932,9 +934,9 @@ def setup(data, ...@@ -932,9 +934,9 @@ def setup(data,
#generate values for grid show #generate values for grid show
missing_values = data_before_preprocess.isna().sum().sum() missing_values = data_before_preprocess.isna().sum().sum()
if missing_values > 0: if missing_values > 0:
missing_flag = 'True' missing_flag = True
else: else:
missing_flag = 'False' missing_flag = False
if normalize is True: if normalize is True:
normalize_grid = normalize_method normalize_grid = normalize_method
...@@ -962,9 +964,9 @@ def setup(data, ...@@ -962,9 +964,9 @@ def setup(data,
rare_level_threshold_grid = 'None' rare_level_threshold_grid = 'None'
if bin_numeric_features is None: if bin_numeric_features is None:
numeric_bin_grid = 'False' numeric_bin_grid = False
else: else:
numeric_bin_grid = 'True' numeric_bin_grid = True
if remove_outliers is False: if remove_outliers is False:
outliers_threshold_grid = None outliers_threshold_grid = None
...@@ -1011,6 +1013,11 @@ def setup(data, ...@@ -1011,6 +1013,11 @@ def setup(data,
else: else:
unknown_categorical_method_grid = None unknown_categorical_method_grid = None
if group_features is not None:
group_features_grid = True
else:
group_features_grid = False
learned_types = preprocess.dtypes.learent_dtypes learned_types = preprocess.dtypes.learent_dtypes
learned_types.drop(target, inplace=True) learned_types.drop(target, inplace=True)
...@@ -1205,7 +1212,7 @@ def setup(data, ...@@ -1205,7 +1212,7 @@ def setup(data,
['Polynomial Degree ', polynomial_degree_grid], #new ['Polynomial Degree ', polynomial_degree_grid], #new
['Trignometry Features ', trigonometry_features], #new ['Trignometry Features ', trigonometry_features], #new
['Polynomial Threshold ', polynomial_threshold_grid], #new ['Polynomial Threshold ', polynomial_threshold_grid], #new
['Group Features ', group_features], #new ['Group Features ', group_features_grid], #new
['Feature Selection ', feature_selection], #new ['Feature Selection ', feature_selection], #new
['Features Selection Threshold ', feature_selection_threshold_grid], #new ['Features Selection Threshold ', feature_selection_threshold_grid], #new
['Feature Interaction ', feature_interaction], #new ['Feature Interaction ', feature_interaction], #new
...@@ -1301,7 +1308,7 @@ def setup(data, ...@@ -1301,7 +1308,7 @@ def setup(data,
['Polynomial Degree ', polynomial_degree_grid], #new ['Polynomial Degree ', polynomial_degree_grid], #new
['Trignometry Features ', trigonometry_features], #new ['Trignometry Features ', trigonometry_features], #new
['Polynomial Threshold ', polynomial_threshold_grid], #new ['Polynomial Threshold ', polynomial_threshold_grid], #new
['Group Features ', group_features], #new ['Group Features ', group_features_grid], #new
['Feature Selection ', feature_selection], #new ['Feature Selection ', feature_selection], #new
['Features Selection Threshold ', feature_selection_threshold_grid], #new ['Features Selection Threshold ', feature_selection_threshold_grid], #new
['Feature Interaction ', feature_interaction], #new ['Feature Interaction ', feature_interaction], #new
...@@ -1392,7 +1399,7 @@ def setup(data, ...@@ -1392,7 +1399,7 @@ def setup(data,
['Polynomial Degree ', polynomial_degree_grid], #new ['Polynomial Degree ', polynomial_degree_grid], #new
['Trignometry Features ', trigonometry_features], #new ['Trignometry Features ', trigonometry_features], #new
['Polynomial Threshold ', polynomial_threshold_grid], #new ['Polynomial Threshold ', polynomial_threshold_grid], #new
['Group Features ', group_features], #new ['Group Features ', group_features_grid], #new
['Feature Selection ', feature_selection], #new ['Feature Selection ', feature_selection], #new
['Features Selection Threshold ', feature_selection_threshold_grid], #new ['Features Selection Threshold ', feature_selection_threshold_grid], #new
['Feature Interaction ', feature_interaction], #new ['Feature Interaction ', feature_interaction], #new
...@@ -1435,7 +1442,6 @@ def setup(data, ...@@ -1435,7 +1442,6 @@ def setup(data,
def create_model(estimator = None, def create_model(estimator = None,
ensemble = False, ensemble = False,
method = None, method = None,
......
...@@ -27,7 +27,7 @@ def readme(): ...@@ -27,7 +27,7 @@ def readme():
setup( setup(
name="pycaret", name="pycaret",
version="0.0.30", version="0.0.31",
description="A Python package for supervised and unsupervised machine learning.", description="A Python package for supervised and unsupervised machine learning.",
long_description=readme(), long_description=readme(),
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册