From afa1a39697a67f05f274748ba5d21d1bcdd22748 Mon Sep 17 00:00:00 2001 From: Pavol Mulinka Date: Wed, 19 Jun 2024 09:05:13 +0200 Subject: [PATCH] Deployed 6f0ada6 with MkDocs version: 1.6.0 --- notebooks/04_model_training_pipeline.html | 1482 ++++++++++++++------ notebooks/04_model_training_pipeline.ipynb | 1170 +++++++++++----- search/search_index.json | 2 +- sitemap.xml.gz | Bin 127 -> 127 bytes 4 files changed, 1915 insertions(+), 739 deletions(-) diff --git a/notebooks/04_model_training_pipeline.html b/notebooks/04_model_training_pipeline.html index 0546066..67625a8 100755 --- a/notebooks/04_model_training_pipeline.html +++ b/notebooks/04_model_training_pipeline.html @@ -1757,55 +1757,13 @@

Train a testing model
target_col = "Exited"
 id_cols = ["CustomerId"]
-cat_cols = [
-    "Country",
-    "Gender",
-    "HasCreditCard",
-    "IsActiveMember",
-    "CustomerFeedback_sentiment3",
-    "CustomerFeedback_sentiment5",
-    "Surname_Country",
-    "Surname_Country_region",
-    "Surname_Country_subregion",
-    "Country_region",
-    "Country_subregion",
-    "is_native",
-    "Country_hemisphere",
-    "Country_IncomeGroup",
-    "Surname_Country_IncomeGroup",
-    "working_class",
-    "stage_of_life",
-    "generation",
-]
-cont_cols = df_pd.drop(
-    columns=id_cols + cat_cols + [target_col]
-).columns.values.tolist()
+cat_cols = ["Country", "Gender", "HasCreditCard", "IsActiveMember","CustomerFeedback_sentiment3", "CustomerFeedback_sentiment5", "Surname_Country", "Surname_Country_region", "Surname_Country_subregion", "Country_region", "Country_subregion", "is_native", "Country_hemisphere", "Country_IncomeGroup", "Surname_Country_IncomeGroup", "working_class", "stage_of_life", "generation"]
+cont_cols = df_pd.drop(columns=id_cols + cat_cols + [target_col]).columns.values.tolist()
 
target_col = "Exited" id_cols = ["CustomerId"] -cat_cols = [ - "Country", - "Gender", - "HasCreditCard", - "IsActiveMember", - "CustomerFeedback_sentiment3", - "CustomerFeedback_sentiment5", - "Surname_Country", - "Surname_Country_region", - "Surname_Country_subregion", - "Country_region", - "Country_subregion", - "is_native", - "Country_hemisphere", - "Country_IncomeGroup", - "Surname_Country_IncomeGroup", - "working_class", - "stage_of_life", - "generation", -] -cont_cols = df_pd.drop( - columns=id_cols + cat_cols + [target_col] -).columns.values.tolist()
+cat_cols = ["Country", "Gender", "HasCreditCard", "IsActiveMember","CustomerFeedback_sentiment3", "CustomerFeedback_sentiment5", "Surname_Country", "Surname_Country_region", "Surname_Country_subregion", "Country_region", "Country_subregion", "is_native", "Country_hemisphere", "Country_IncomeGroup", "Surname_Country_IncomeGroup", "working_class", "stage_of_life", "generation"] +cont_cols = df_pd.drop(columns=id_cols + cat_cols + [target_col]).columns.values.tolist() @@ -1844,7 +1802,7 @@

Train a testing model @@ -1907,20 +1851,20 @@

Train a testing model
prepare_data = PreprocessData(
-    id_cols=id_cols,
-    target_col=target_col,
-    cat_cols=cat_cols,
-    cont_cols=cont_cols,
-)
+        id_cols=id_cols,
+        target_col=target_col,
+        cat_cols=cat_cols,
+        cont_cols=cont_cols,
+    )
 # this should be fitted only on training data
 _ = prepare_data.fit(df=df_pd)
 
prepare_data = PreprocessData( - id_cols=id_cols, - target_col=target_col, - cat_cols=cat_cols, - cont_cols=cont_cols, -) + id_cols=id_cols, + target_col=target_col, + cat_cols=cat_cols, + cont_cols=cont_cols, + ) # this should be fitted only on training data _ = prepare_data.fit(df=df_pd)
@@ -1948,46 +1892,46 @@

Train a testing model
optimizer = LGBOptunaOptimizer(
-    objective="binary",
-    n_class=2,
-)
+        objective="binary",
+        n_class=2,
+    )
 
 trainer = Trainer(
-    cat_cols=prepare_data.cat_cols,
-    target_col=prepare_data.target_col,
-    id_cols=id_cols,
-    objective="binary",
-    n_class=2,
-    optimizer=optimizer,
-    preprocessors=[prepare_data],
+        cat_cols=prepare_data.cat_cols,
+        target_col=prepare_data.target_col,
+        id_cols=id_cols,
+        objective="binary",
+        n_class=2,
+        optimizer=optimizer,
+        preprocessors=[prepare_data],
 )
 
 metrics_dict = trainer.fit(
     df_train=df_train,
     df_valid=df_valid,
     df_test=df_test,
-)
+    )
 
optimizer = LGBOptunaOptimizer( - objective="binary", - n_class=2, -) + objective="binary", + n_class=2, + ) trainer = Trainer( - cat_cols=prepare_data.cat_cols, - target_col=prepare_data.target_col, - id_cols=id_cols, - objective="binary", - n_class=2, - optimizer=optimizer, - preprocessors=[prepare_data], + cat_cols=prepare_data.cat_cols, + target_col=prepare_data.target_col, + id_cols=id_cols, + objective="binary", + n_class=2, + optimizer=optimizer, + preprocessors=[prepare_data], ) metrics_dict = trainer.fit( df_train=df_train, df_valid=df_valid, df_test=df_test, -)
+ ) @@ -1999,7 +1943,7 @@

Train a testing model @@ -2013,15 +1957,15 @@

Train a testing model @@ -2118,14 +2062,14 @@

Train a testing model @@ -2451,14 +2395,14 @@

Train a testing model @@ -2624,14 +2568,14 @@

Train a testing model @@ -2733,14 +2677,14 @@

Train a testing model @@ -3066,14 +3010,14 @@

Train a testing model @@ -3178,7 +3122,7 @@

Train a testing model