From 5f7817d74db16d5c2c4ec745c14ccfb7d91e7218 Mon Sep 17 00:00:00 2001 From: jncabelin Date: Sun, 11 Feb 2024 01:37:59 +0800 Subject: [PATCH 1/3] update dependencies --- research_phase/requirements.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/research_phase/requirements.txt b/research_phase/requirements.txt index 3d247ba..5957a5b 100644 --- a/research_phase/requirements.txt +++ b/research_phase/requirements.txt @@ -1,9 +1,10 @@ # We use compatible release functionality (see PEP 440 here: https://www.python.org/dev/peps/pep-0440/#compatible-release) # to specify acceptable version ranges of our project dependencies. This gives us the flexibility to keep up with small # updates/fixes, whilst ensuring we don't install a major update which could introduce backwards incompatible changes. -numpy>=1.20.0,<1.21.0 -pandas>=1.3.5,<1.4.0 -scikit-learn>=1.0.2,<1.1.0 -jupyter>=1.0.0,<1.1.0 -feature_engine>=0.3.1,<0.4.0 -matplotlib>=3.1.2,<4.0.0 \ No newline at end of file + +numpy>=1.20.0,<1.25.0;python_version>="3.8" +pandas>=1.5.0,<2.1.0;python_version>="3.8" +scikit-learn>=1.2.0;python_version>="3.8" +jupyter>=1.0.0,<1.1.0;python_version>="3.8" +feature-engine>=1.5.0;python_version>="3.8" +matplotlib>=3.1.2,<4.0.0;python_version>="3.8" \ No newline at end of file From b970d2b797ad74ed956de4da06b010dfe23e028a Mon Sep 17 00:00:00 2001 From: jncabelin Date: Sun, 11 Feb 2024 01:40:03 +0800 Subject: [PATCH 2/3] update notebook --- research_phase/gradient_boosting_model.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/research_phase/gradient_boosting_model.ipynb b/research_phase/gradient_boosting_model.ipynb index 2ddc960..6cb434e 100755 --- a/research_phase/gradient_boosting_model.ipynb +++ b/research_phase/gradient_boosting_model.ipynb @@ -22,7 +22,7 @@ "# from sklearn.pipeline import Pipeline\n", "# from sklearn.compose import ColumnTransformer\n", "\n", - "from feature_engine.categorical_encoders import RareLabelCategoricalEncoder\n", + "from feature_engine.encoding import RareLabelEncoder\n", "\n", "# to visualise al the columns in the dataframe\n", "pd.pandas.set_option('display.max_columns', None)" @@ -684,7 +684,7 @@ "source": [ "### Separate dataset into train and test\n", "\n", - "Before beginning to engineer our features, it is important to separate our data intro training and testing set. This is to avoid over-fitting. This step involves randomness, therefore, we need to set the seed." + "### Before beginning to engineer our features, it is important to separate our data intro training and testing set. This is to avoid over-fitting. This step involves randomness, therefore, we need to set the seed." ] }, { @@ -1035,7 +1035,7 @@ "source": [ "# remove rare caregories\n", "\n", - "rare_enc = RareLabelCategoricalEncoder(tol=0.01, n_categories=5, variables = vars_cat)\n", + "rare_enc = RareLabelEncoder(tol=0.01, n_categories=5, variables = vars_cat)\n", "rare_enc.fit(X_train)\n", "X_train = rare_enc.transform(X_train)\n", "X_test = rare_enc.transform(X_test)" From 3ce96511ab7ddc1141fde60e4e1ce070441763ea Mon Sep 17 00:00:00 2001 From: jncabelin Date: Thu, 15 Feb 2024 00:24:49 +0800 Subject: [PATCH 3/3] updated requirements --- research_phase/requirements.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/research_phase/requirements.txt b/research_phase/requirements.txt index 5957a5b..9b1953d 100644 --- a/research_phase/requirements.txt +++ b/research_phase/requirements.txt @@ -2,9 +2,9 @@ # to specify acceptable version ranges of our project dependencies. This gives us the flexibility to keep up with small # updates/fixes, whilst ensuring we don't install a major update which could introduce backwards incompatible changes. -numpy>=1.20.0,<1.25.0;python_version>="3.8" -pandas>=1.5.0,<2.1.0;python_version>="3.8" -scikit-learn>=1.2.0;python_version>="3.8" -jupyter>=1.0.0,<1.1.0;python_version>="3.8" -feature-engine>=1.5.0;python_version>="3.8" -matplotlib>=3.1.2,<4.0.0;python_version>="3.8" \ No newline at end of file +numpy>=1.20.0,<1.25.0;python_version>="3.8" and python_version<"3.12" +pandas>=1.5.0,<2.1.0;python_version>="3.8" and python_version<"3.12" +scikit-learn>=1.2.0;python_version>="3.8" and python_version<"3.12" +jupyter>=1.0.0,<1.1.0;python_version>="3.8" and python_version<"3.12" +feature-engine>=1.5.0,<=1.6.2;python_version>="3.8" and python_version<"3.12" +matplotlib>=3.1.2,<4.0.0;python_version>="3.8" and python_version<"3.12" \ No newline at end of file