From 117e152594a5a637ea7f8cd784cad57174aece33 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Sun, 14 Oct 2018 16:34:08 +0300 Subject: [PATCH 1/2] fix typos --- pystacknet/pystacknet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pystacknet/pystacknet.py b/pystacknet/pystacknet.py index 356f77e..72a99d8 100644 --- a/pystacknet/pystacknet.py +++ b/pystacknet/pystacknet.py @@ -157,10 +157,10 @@ def __init__(self, models, metric="logloss", folds=3, restacking=False, use_retr raise Exception("Models has to be a list of sklearn type of models ") for l in range (len(models)): if not isinstance(models[l], list): - raise Exception("Each element in the models' list has to be a list . In other words a 2-dimensional list is epected. ") + raise Exception("Each element in the 'models' list has to be a list . In other words a 2-dimensional list is expected. ") for m in range (len(models[l])): if not hasattr(models[l][m], 'fit') : - raise Exception("Each model/algorithm needs to implement a 'fit() method ") + raise Exception("Each model/algorithm needs to implement a 'fit()' method ") if not hasattr(models[l][m], 'predict_proba') and not hasattr(models[l][m], 'predict') and not hasattr(models[l][m], 'transform') : raise Exception("Each model/algorithm needs to implement at least one of ('predict()','predict_proba()' or 'transform()' ") @@ -940,10 +940,10 @@ def __init__(self, models, metric="rmse", folds=3, restacking=False, use_retrain raise Exception("Models has to be a list of sklearn type of models ") for l in range (len(models)): if not isinstance(models[l], list): - raise Exception("Each element in the models' list has to be a list . In other words a 2-dimensional list is epected. ") + raise Exception("Each element in the models' list has to be a list . In other words a 2-dimensional list is expected. ") for m in range (len(models[l])): if not hasattr(models[l][m], 'fit') : - raise Exception("Each model/algorithm needs to implement a 'fit() method ") + raise Exception("Each model/algorithm needs to implement a 'fit()' method ") if not hasattr(models[l][m], 'predict_proba') and not hasattr(models[l][m], 'predict') and not hasattr(models[l][m], 'transform') : raise Exception("Each model/algorithm needs to implement at least one of ('predict()','predict_proba()' or 'transform()' ") From 5089851858b2b8ae99a6ee464acb0d6e383b1fe6 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Sun, 14 Oct 2018 16:44:47 +0300 Subject: [PATCH 2/2] fix typo --- pystacknet/pystacknet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pystacknet/pystacknet.py b/pystacknet/pystacknet.py index 72a99d8..648b88f 100644 --- a/pystacknet/pystacknet.py +++ b/pystacknet/pystacknet.py @@ -940,7 +940,7 @@ def __init__(self, models, metric="rmse", folds=3, restacking=False, use_retrain raise Exception("Models has to be a list of sklearn type of models ") for l in range (len(models)): if not isinstance(models[l], list): - raise Exception("Each element in the models' list has to be a list . In other words a 2-dimensional list is expected. ") + raise Exception("Each element in the 'models' list has to be a list . In other words a 2-dimensional list is expected. ") for m in range (len(models[l])): if not hasattr(models[l][m], 'fit') : raise Exception("Each model/algorithm needs to implement a 'fit()' method ")