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)" diff --git a/research_phase/requirements.txt b/research_phase/requirements.txt index 3d247ba..9b1953d 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" 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