Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Research Phase #37

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions research_phase/gradient_boosting_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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)"
Expand Down
13 changes: 7 additions & 6 deletions research_phase/requirements.txt
Original file line number Diff line number Diff line change
@@ -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

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"