You are on page 1of 32

https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.

com/@yennhi95zz

A Hands-on Project: Enhancing Customer Churn


Prediction with Continuous Experiment
Tracking in Machine Learning

Dataset:
You can use the Telco Customer Churn dataset from Kaggle. This dataset contains information
about telecom customers, including various features like contract type, monthly charges, and
whether the customer churned or not.

Objective:
The goal of this project is to predict customer churn (whether a customer will leave the telecom
service) using a model stacking approach. Model stacking involves training multiple models and
combining their predictions using another model.

1
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

Steps:
1. Import Libraries: Import necessary libraries and initialize Comet ML.

2. Load and Explore Data: Load dataset and perform exploratory data analysis (EDA).

3. Preprocessing: Preprocess data by encoding and scaling features.

4. Model Training: Train multiple machine learning models, including Logistic Regression,
Random Forest, Gradient Boosting, and Support Vector Machine.

5. Hyperparameter Tuning: Use Optuna to optimize hyperparameters for the models.

6. Ensemble Modeling: Create a stacking ensemble of models for improved predictions.

7. Optimization Results: Display the best hyperparameters and accuracy.

8. End Experiment: Conclude the Comet ML experiment.

This project will give you insights into dealing with classification problems, handling imbalanced
datasets (if applicable), and utilizing model stacking to enhance predictive performance.

0. Import Libraries
!pip install -q optuna comet_ml
import optuna
import comet_ml
from comet_ml import Experiment

ERROR: pip's dependency resolver does not currently take into account
all the packages that are installed. This behaviour is the source of
the following dependency conflicts.
jupyterlab-lsp 4.2.0 requires jupyter-lsp>=2.0.0, but you have
jupyter-lsp 1.5.1 which is incompatible.

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier,
GradientBoostingClassifier
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score, log_loss, roc_auc_score
from sklearn.model_selection import GridSearchCV
from sklearn.ensemble import StackingClassifier
from sklearn.metrics import accuracy_score, log_loss

from kaggle_secrets import UserSecretsClient

2
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

# Set display options to show all columns


pd.set_option('display.max_columns', None)

/opt/conda/lib/python3.10/site-packages/scipy/__init__.py:146:
UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this
version of SciPy (detected version 1.23.5
warnings.warn(f"A NumPy version >={np_minversion} and
<{np_maxversion}"

1. Initialize Comet ML
user_secrets = UserSecretsClient()
comet_api_key = user_secrets.get_secret("Comet API Key")

experiment = Experiment(
api_key= comet_api_key,
project_name="customer-churn",
workspace="yennhi95zz"
)

COMET WARNING: As you are running in a Jupyter environment, you will


need to call `experiment.end()` when finished to ensure all metrics
and code are logged before exiting.
COMET INFO: Couldn't find a Git repository in '/kaggle/working' nor in
any parent directory. Set `COMET_GIT_DIRECTORY` if your Git Repository
is elsewhere.
COMET INFO: Experiment is live on comet.com
https://www.comet.com/yennhi95zz/customer-churn/ce4189deb57943d281df04
05dab75687

2. Load Data
# Load the dataset
data = pd.read_csv("/kaggle/input/telco-customer-churn/WA_Fn-UseC_-
Telco-Customer-Churn.csv")
data.head()

customerID gender SeniorCitizen Partner Dependents tenure


PhoneService \
0 7590-VHVEG Female 0 Yes No 1
No
1 5575-GNVDE Male 0 No No 34
Yes
2 3668-QPYBK Male 0 No No 2
Yes

3
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

3 7795-CFOCW Male 0 No No 45
No
4 9237-HQITU Female 0 No No 2
Yes

MultipleLines InternetService OnlineSecurity OnlineBackup \


0 No phone service DSL No Yes
1 No DSL Yes No
2 No DSL Yes Yes
3 No phone service DSL Yes No
4 No Fiber optic No No

DeviceProtection TechSupport StreamingTV StreamingMovies


Contract \
0 No No No No Month-to-
month
1 Yes No No No One
year
2 No No No No Month-to-
month
3 Yes Yes No No One
year
4 No No No No Month-to-
month

PaperlessBilling PaymentMethod MonthlyCharges


TotalCharges \
0 Yes Electronic check 29.85
29.85
1 No Mailed check 56.95
1889.5
2 Yes Mailed check 53.85
108.15
3 No Bank transfer (automatic) 42.30
1840.75
4 Yes Electronic check 70.70
151.65

Churn
0 No
1 No
2 Yes
3 No
4 Yes

3. Perform EDA on the Dataset:


data.info()

4
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

<class 'pandas.core.frame.DataFrame'>
RangeIndex: 7043 entries, 0 to 7042
Data columns (total 21 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 customerID 7043 non-null object
1 gender 7043 non-null object
2 SeniorCitizen 7043 non-null int64
3 Partner 7043 non-null object
4 Dependents 7043 non-null object
5 tenure 7043 non-null int64
6 PhoneService 7043 non-null object
7 MultipleLines 7043 non-null object
8 InternetService 7043 non-null object
9 OnlineSecurity 7043 non-null object
10 OnlineBackup 7043 non-null object
11 DeviceProtection 7043 non-null object
12 TechSupport 7043 non-null object
13 StreamingTV 7043 non-null object
14 StreamingMovies 7043 non-null object
15 Contract 7043 non-null object
16 PaperlessBilling 7043 non-null object
17 PaymentMethod 7043 non-null object
18 MonthlyCharges 7043 non-null float64
19 TotalCharges 7043 non-null object
20 Churn 7043 non-null object
dtypes: float64(1), int64(2), object(18)
memory usage: 1.1+ MB

# Convert 'TotalCharges' column to numerical


data['TotalCharges'] = pd.to_numeric(data['TotalCharges'],
errors='coerce')

# Drop rows with missing values


data.dropna(inplace=True)

3.1. Customer Churn Distribution


This plot shows the distribution of churn vs. non-churn customers. You can see the number of
customers who have churned (left the telecom service) and those who have not.

# Plot 1: Class Distribution (Churn vs. Non-Churn)


plt.figure(figsize=(6, 6))
ax = sns.countplot(data=data, x='Churn')
plt.title("Customer Churn Distribution")
plt.xlabel("Churn")
plt.ylabel("Count")

# Adding data labels (rounded) to the bars

5
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

for p in ax.patches:
ax.annotate(f'{int(round(p.get_height()))}', (p.get_x() +
p.get_width() / 2., p.get_height()), ha='center', va='center',
fontsize=12, color='black', xytext=(0, 5), textcoords='offset points')

# Log the plot to Comet


experiment.log_figure(figure=plt)

plt.tight_layout()
plt.show()

3.2. Numeric Feature Distribution:


These histograms show the distribution of numeric features (tenure, MonthlyCharges, and
TotalCharges) for the entire dataset.

6
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

# Plot 2: Numeric Feature Distribution


numerical_features = ['tenure', 'MonthlyCharges', 'TotalCharges']
plt.figure(figsize=(15, 5))
for i, feature in enumerate(numerical_features, 1):
plt.subplot(1, 3, i)
sns.histplot(data=data, x=feature, kde=True)
plt.title(f'{feature} Distribution')
plt.xlabel(feature)
plt.ylabel('Density')
# Log the plot to Comet
experiment.log_figure(figure=plt)

plt.tight_layout()
plt.show()

3.3. Categorical Feature Distribution:


These plots show the distribution of categorical features (gender, SeniorCitizen, Partner,
Dependents, Contract, PaymentMethod) split by churn status.

These plots provide insights into how different categories of customers (e.g., seniors vs. non-
seniors, customers with partners vs. without) are distributed in terms of churn. You can identify
potential customer segments that are more likely to churn.

# Plot 3: Categorical Feature Distribution


categorical_features = ['gender', 'SeniorCitizen', 'Partner',
'Dependents', 'Contract', 'PaymentMethod']
plt.figure(figsize=(15, 10))
for i, feature in enumerate(categorical_features, 1):
plt.subplot(2, 3, i)
sns.countplot(data=data, x=feature, hue='Churn', palette='Set2')
plt.title(f'{feature} Distribution by Churn')
plt.xlabel(feature)
plt.ylabel('Count')
plt.xticks(rotation=45)
# Log the plot to Comet

7
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

experiment.log_figure(figure=plt)

plt.tight_layout()
plt.show()

3.4. Correlation Heatmap:


The heatmap displays the correlation between numeric features in the dataset.

Understanding feature correlations can help in feature selection. For instance, if


MonthlyCharges and TotalCharges are highly correlated, you might choose to keep only one of
them to avoid multicollinearity in your models. It also helps identify which features might be
more important in predicting churn.

# Plot 4: Correlation Heatmap


plt.figure(figsize=(10, 8))
correlation_matrix = data.corr(method='pearson', min_periods=1)
sns.heatmap(correlation_matrix, annot=True, cmap='coolwarm',
fmt=".2f")
plt.title("Correlation Heatmap")
# Log the plot to Comet
experiment.log_figure(figure=plt)

8
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

plt.tight_layout()
plt.show()

/tmp/ipykernel_32/829961921.py:3: FutureWarning: The default value of


numeric_only in DataFrame.corr is deprecated. In a future version, it
will default to False. Select only valid columns or specify the value
of numeric_only to silence this warning.
correlation_matrix = data.corr(method='pearson', min_periods=1)

3.5. Monthly Charges vs. Total Charges:


This scatterplot shows the relationship between Monthly Charges and Total Charges, with
points colored by churn status.

It appears that customers who have higher Total Charges are less likely to churn. This suggests
that long-term customers who spend more are more loyal. You can use this insight to focus on
retaining high-value, long-term customers by offering loyalty programs or incentives. These

9
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

business insights derived from EDA can guide feature engineering and model selection for your
churn prediction project. They help you understand the data's characteristics and make informed
decisions to optimize customer retention strategies.

# Plot 5: Monthly Charges vs. Total Charges


plt.figure(figsize=(8, 6))
sns.scatterplot(data=data, x='MonthlyCharges', y='TotalCharges',
hue='Churn', palette='Set2')
plt.title("Monthly Charges vs. Total Charges")
plt.xlabel("Monthly Charges")
plt.ylabel("Total Charges")
# Log the plot to Comet
experiment.log_figure(figure=plt)

plt.tight_layout()
plt.show()

10
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

4. Preprocessing
# Encode categorical features, scale numerical features

encoder = OneHotEncoder(handle_unknown="ignore", sparse=False)


scaler = StandardScaler()

X_train, X_val, y_train, y_val = train_test_split(data.drop("Churn",


axis=1), data["Churn"], test_size=0.2, random_state=42)

X_train_encoded = encoder.fit_transform(X_train[categorical_features])
X_val_encoded = encoder.transform(X_val[categorical_features])

X_train_scaled = scaler.fit_transform(X_train[numerical_features])
X_val_scaled = scaler.transform(X_val[numerical_features])

X_train_processed = np.concatenate((X_train_encoded, X_train_scaled),


axis=1)
X_val_processed = np.concatenate((X_val_encoded, X_val_scaled),
axis=1)

/opt/conda/lib/python3.10/site-packages/sklearn/preprocessing/
_encoders.py:868: FutureWarning: `sparse` was renamed to
`sparse_output` in version 1.2 and will be removed in 1.4.
`sparse_output` is ignored unless you leave `sparse` to its default
value.
warnings.warn(

# Split data into features and target


X = data.drop("Churn", axis=1)
y = data["Churn"]

# Split data into train and validation sets


X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2,
random_state=42)

5. Model Training and Hyperparameter Tuning:


Logistic Regression (logreg):

• Simple and interpretable model.


• Well-suited for binary classification tasks like churn prediction.
• Helps understand how features impact the chance of churn.

Random Forest Classifier (rf):

• Ensemble method combining multiple decision trees.


• Handles mixed feature types (categorical and numerical).
• Resistant to overfitting, good for complex datasets.

11
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

Gradient Boosting Classifier (gb):

• Sequential ensemble building strong predictive power.


• Captures complex relationships in data.
• Works well for various types of datasets.

Support Vector Machine (svm):

• Versatile model for linear and non-linear data.


• Can find complex decision boundaries.
• Useful when patterns between churn and non-churn are intricate.

Modeling Stacking

In the project, I am stacking models such as random forests, gradient boosting, and support
vector machines, which have different characteristics and can capture different aspects of the
customer churn problem. This ensemble approach can help you achieve a more accurate and
robust churn prediction model, ultimately leading to better customer retention strategies and
business outcomes.

5.1. Define an Optuna Objective Function:


def objective(trial):
# Define hyperparameter search space for individual models
rf_params = {
'n_estimators': trial.suggest_int('rf_n_estimators', 100,
300),
'max_depth': trial.suggest_categorical('rf_max_depth', [None,
10, 20]),
'min_samples_split': trial.suggest_int('rf_min_samples_split',
2, 10),
'min_samples_leaf': trial.suggest_int('rf_min_samples_leaf',
1, 4),
}

gb_params = {
'n_estimators': trial.suggest_int('gb_n_estimators', 100,
300),
'learning_rate': trial.suggest_float('gb_learning_rate', 0.01,
0.2),
'max_depth': trial.suggest_categorical('gb_max_depth', [3, 4,
5]),
}

svm_params = {
'C': trial.suggest_categorical('svm_C', [0.1, 1, 10]),
'kernel': trial.suggest_categorical('svm_kernel', ['linear',
'rbf']),
}

# Create models with suggested hyperparameters

12
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

rf = RandomForestClassifier(**rf_params)
gb = GradientBoostingClassifier(**gb_params)
svm = SVC(probability=True, **svm_params)

# Train individual models


rf.fit(X_train_processed, y_train)
gb.fit(X_train_processed, y_train)
svm.fit(X_train_processed, y_train)

# Evaluate individual models on validation data


rf_predictions = rf.predict(X_val_processed)
gb_predictions = gb.predict(X_val_processed)
svm_predictions = svm.predict(X_val_processed)

# Calculate accuracy and ROC AUC for individual models


rf_accuracy = accuracy_score(y_val, rf_predictions)
gb_accuracy = accuracy_score(y_val, gb_predictions)
svm_accuracy = accuracy_score(y_val, svm_predictions)

rf_roc_auc = roc_auc_score(y_val,
rf.predict_proba(X_val_processed)[:, 1])
gb_roc_auc = roc_auc_score(y_val,
gb.predict_proba(X_val_processed)[:, 1])
svm_roc_auc = roc_auc_score(y_val,
svm.predict_proba(X_val_processed)[:, 1])

# Create a stacking ensemble with trained models


estimators = [
('random_forest', rf),
('gradient_boosting', gb),
('svm', svm)
]

stacking_classifier = StackingClassifier(estimators=estimators,
final_estimator=LogisticRegression())

# Train the stacking ensemble


stacking_classifier.fit(X_train_processed, y_train)

# Evaluate the stacking ensemble on validation data


stacking_predictions =
stacking_classifier.predict(X_val_processed)
stacking_accuracy = accuracy_score(y_val, stacking_predictions)
stacking_roc_auc = roc_auc_score(y_val,
stacking_classifier.predict_proba(X_val_processed)[:, 1])

# Log parameters and metrics to Comet ML


experiment.log_parameters({
'rf_n_estimators': rf_params['n_estimators'],
'rf_max_depth': rf_params['max_depth'],

13
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

'rf_min_samples_split': rf_params['min_samples_split'],
'rf_min_samples_leaf': rf_params['min_samples_leaf'],
'gb_n_estimators': gb_params['n_estimators'],
'gb_learning_rate': gb_params['learning_rate'],
'gb_max_depth': gb_params['max_depth'],
'svm_C': svm_params['C'],
'svm_kernel': svm_params['kernel']
})

experiment.log_metrics({
'rf_accuracy': rf_accuracy,
'gb_accuracy': gb_accuracy,
'svm_accuracy': svm_accuracy,
'rf_roc_auc': rf_roc_auc,
'gb_roc_auc': gb_roc_auc,
'svm_roc_auc': svm_roc_auc,
'stacking_accuracy': stacking_accuracy,
'stacking_roc_auc': stacking_roc_auc
})

# Return the negative accuracy as Optuna aims to minimize the


objective
return -stacking_accuracy

5.2. Optuna Hyperparameter Optimization:


Now, you can use Optuna to optimize the hyperparameters of your models. Optuna will search
the hyperparameter space defined in the objective function and log the results to Comet ML.

Clarify the optimization goal: You should mention whether you are minimizing or maximizing a
specific metric. In the code, I am using direction='minimize', which implies optimizing accuracy
(negative accuracy to minimize) AKA minimizing a loss or error metric. If you want to
maximize accuracy or ROC AUC, you should use direction='maximize'.

from tabulate import tabulate

# Create and optimize the study


study = optuna.create_study(direction='minimize') # Adjust direction
based on your optimization goal
study.optimize(objective, n_trials=100) # You can adjust the number
of trials

# Get the best hyperparameters and results


best_rf_params = study.best_params
best_accuracy = -study.best_value # Convert back to positive accuracy

# Convert the dictionary to a list of key-value pairs for tabulation


param_table = [(key, value) for key, value in best_rf_params.items()]

14
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

# Display the best_rf_params table


best_rf_params = tabulate(param_table, headers=["Parameter", "Value"],
tablefmt="grid")

print(f"Best RF Hyperparameters:\n{best_rf_params}")
print(f"Best Accuracy: {best_accuracy}")

[I 2023-09-12 12:38:35,983] A new study created in memory with name:


no-name-b1a4aace-05ed-4053-8c5b-e29be198e505
[I 2023-09-12 12:40:16,164] Trial 1 finished with value: -
0.7853589196872779 and parameters: {'rf_n_estimators': 227,
'rf_max_depth': 10, 'rf_min_samples_split': 5, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 272, 'gb_learning_rate': 0.09729708459940609,
'gb_max_depth': 3, 'svm_C': 0.1, 'svm_kernel': 'linear'}. Best is
trial 1 with value: -0.7853589196872779.
[I 2023-09-12 12:41:18,526] Trial 2 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 237,
'rf_max_depth': 10, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 104, 'gb_learning_rate': 0.03563540977675788,
'gb_max_depth': 4, 'svm_C': 10, 'svm_kernel': 'linear'}. Best is trial
1 with value: -0.7853589196872779.
[I 2023-09-12 12:42:23,008] Trial 3 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 229,
'rf_max_depth': None, 'rf_min_samples_split': 7,
'rf_min_samples_leaf': 3, 'gb_n_estimators': 257, 'gb_learning_rate':
0.09612273536468068, 'gb_max_depth': 5, 'svm_C': 1, 'svm_kernel':
'rbf'}. Best is trial 1 with value: -0.7853589196872779.
[I 2023-09-12 12:43:10,436] Trial 4 finished with value: -
0.7818052594171997 and parameters: {'rf_n_estimators': 239,
'rf_max_depth': 10, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
4, 'gb_n_estimators': 232, 'gb_learning_rate': 0.05951885039403526,
'gb_max_depth': 4, 'svm_C': 0.1, 'svm_kernel': 'linear'}. Best is
trial 1 with value: -0.7853589196872779.
[I 2023-09-12 12:44:00,794] Trial 5 finished with value: -
0.7825159914712153 and parameters: {'rf_n_estimators': 101,
'rf_max_depth': None, 'rf_min_samples_split': 2,
'rf_min_samples_leaf': 1, 'gb_n_estimators': 194, 'gb_learning_rate':
0.16816455385699045, 'gb_max_depth': 5, 'svm_C': 0.1, 'svm_kernel':
'rbf'}. Best is trial 1 with value: -0.7853589196872779.
[I 2023-09-12 12:44:37,306] Trial 6 finished with value: -
0.7796730632551528 and parameters: {'rf_n_estimators': 117,
'rf_max_depth': 10, 'rf_min_samples_split': 3, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 208, 'gb_learning_rate': 0.03884253350250501,
'gb_max_depth': 3, 'svm_C': 0.1, 'svm_kernel': 'linear'}. Best is
trial 1 with value: -0.7853589196872779.
[I 2023-09-12 12:45:33,166] Trial 7 finished with value: -
0.7867803837953091 and parameters: {'rf_n_estimators': 278,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 158, 'gb_learning_rate': 0.11243255204825937,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 7

15
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

with value: -0.7867803837953091.


[I 2023-09-12 12:46:32,395] Trial 8 finished with value: -
0.7782515991471215 and parameters: {'rf_n_estimators': 198,
'rf_max_depth': 20, 'rf_min_samples_split': 2, 'rf_min_samples_leaf':
4, 'gb_n_estimators': 119, 'gb_learning_rate': 0.012595570940489102,
'gb_max_depth': 3, 'svm_C': 10, 'svm_kernel': 'linear'}. Best is trial
7 with value: -0.7867803837953091.
[I 2023-09-12 12:47:31,059] Trial 9 finished with value: -
0.7810945273631841 and parameters: {'rf_n_estimators': 147,
'rf_max_depth': None, 'rf_min_samples_split': 5,
'rf_min_samples_leaf': 4, 'gb_n_estimators': 272, 'gb_learning_rate':
0.15691516614004472, 'gb_max_depth': 5, 'svm_C': 0.1, 'svm_kernel':
'rbf'}. Best is trial 7 with value: -0.7867803837953091.
[I 2023-09-12 12:48:26,809] Trial 10 finished with value: -
0.7853589196872779 and parameters: {'rf_n_estimators': 299,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 147, 'gb_learning_rate': 0.12889093283123076,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 7
with value: -0.7867803837953091.
[I 2023-09-12 12:49:22,560] Trial 11 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 292,
'rf_max_depth': 10, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 300, 'gb_learning_rate': 0.09542678426291709,
'gb_max_depth': 3, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
7 with value: -0.7867803837953091.
[I 2023-09-12 12:50:09,829] Trial 12 finished with value: -
0.7796730632551528 and parameters: {'rf_n_estimators': 268,
'rf_max_depth': 20, 'rf_min_samples_split': 5, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 154, 'gb_learning_rate': 0.1197144652125794,
'gb_max_depth': 3, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
7 with value: -0.7867803837953091.
[I 2023-09-12 12:51:11,097] Trial 13 finished with value: -
0.7818052594171997 and parameters: {'rf_n_estimators': 263,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 223, 'gb_learning_rate': 0.08086889620342026,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 7
with value: -0.7867803837953091.
[I 2023-09-12 12:52:14,737] Trial 14 finished with value: -
0.7825159914712153 and parameters: {'rf_n_estimators': 188,
'rf_max_depth': 10, 'rf_min_samples_split': 5, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 183, 'gb_learning_rate': 0.12542604342430458,
'gb_max_depth': 3, 'svm_C': 10, 'svm_kernel': 'linear'}. Best is trial
7 with value: -0.7867803837953091.
[I 2023-09-12 12:53:01,770] Trial 15 finished with value: -
0.7825159914712153 and parameters: {'rf_n_estimators': 166,
'rf_max_depth': 10, 'rf_min_samples_split': 4, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 135, 'gb_learning_rate': 0.07980817466872983,
'gb_max_depth': 4, 'svm_C': 0.1, 'svm_kernel': 'rbf'}. Best is trial 7
with value: -0.7867803837953091.

16
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

[I 2023-09-12 12:53:54,938] Trial 16 finished with value: -


0.7782515991471215 and parameters: {'rf_n_estimators': 266,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 250, 'gb_learning_rate': 0.11418677794394845,
'gb_max_depth': 3, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
7 with value: -0.7867803837953091.
[I 2023-09-12 12:54:55,151] Trial 17 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 226,
'rf_max_depth': 20, 'rf_min_samples_split': 6, 'rf_min_samples_leaf':
4, 'gb_n_estimators': 290, 'gb_learning_rate': 0.1468678523370004,
'gb_max_depth': 3, 'svm_C': 0.1, 'svm_kernel': 'rbf'}. Best is trial 7
with value: -0.7867803837953091.
[I 2023-09-12 12:55:49,479] Trial 18 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 252,
'rf_max_depth': 10, 'rf_min_samples_split': 6, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 163, 'gb_learning_rate': 0.10432006824279462,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 7
with value: -0.7867803837953091.
[I 2023-09-12 12:57:07,117] Trial 19 finished with value: -
0.7796730632551528 and parameters: {'rf_n_estimators': 280,
'rf_max_depth': None, 'rf_min_samples_split': 8,
'rf_min_samples_leaf': 2, 'gb_n_estimators': 212, 'gb_learning_rate':
0.13599574724881172, 'gb_max_depth': 5, 'svm_C': 10, 'svm_kernel':
'linear'}. Best is trial 7 with value: -0.7867803837953091.
[I 2023-09-12 12:57:58,997] Trial 20 finished with value: -
0.7789623312011372 and parameters: {'rf_n_estimators': 213,
'rf_max_depth': 20, 'rf_min_samples_split': 4, 'rf_min_samples_leaf':
4, 'gb_n_estimators': 241, 'gb_learning_rate': 0.07009979724701848,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
7 with value: -0.7867803837953091.
[I 2023-09-12 12:58:55,249] Trial 21 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 297,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 151, 'gb_learning_rate': 0.1298105023195429,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 7
with value: -0.7867803837953091.
[I 2023-09-12 12:59:50,850] Trial 22 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 298,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 135, 'gb_learning_rate': 0.10297779988944963,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 7
with value: -0.7867803837953091.
[I 2023-09-12 13:00:44,603] Trial 23 finished with value: -
0.7889125799573561 and parameters: {'rf_n_estimators': 279,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 130, 'gb_learning_rate': 0.10666443000067644,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:01:38,037] Trial 24 finished with value: -

17
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

0.7846481876332623 and parameters: {'rf_n_estimators': 283,


'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 124, 'gb_learning_rate': 0.11051176942235022,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:02:29,115] Trial 25 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 252,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 101, 'gb_learning_rate': 0.10861020562409858,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:03:21,569] Trial 26 finished with value: -
0.7853589196872779 and parameters: {'rf_n_estimators': 260,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 108, 'gb_learning_rate': 0.14443506873792694,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:04:13,760] Trial 27 finished with value: -
0.7867803837953091 and parameters: {'rf_n_estimators': 279,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
4, 'gb_n_estimators': 100, 'gb_learning_rate': 0.11455634585625263,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:05:06,191] Trial 28 finished with value: -
0.7882018479033405 and parameters: {'rf_n_estimators': 248,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 122, 'gb_learning_rate': 0.08441954404021969,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:06:03,034] Trial 29 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 250,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 176, 'gb_learning_rate': 0.0894700494366345,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:06:56,690] Trial 30 finished with value: -
0.7825159914712153 and parameters: {'rf_n_estimators': 247,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
4, 'gb_n_estimators': 119, 'gb_learning_rate': 0.18473723438497533,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:07:53,972] Trial 31 finished with value: -
0.7882018479033405 and parameters: {'rf_n_estimators': 275,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 134, 'gb_learning_rate': 0.11006951952395715,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:08:47,678] Trial 32 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 220,

18
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':


3, 'gb_n_estimators': 132, 'gb_learning_rate': 0.09008814438647886,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:09:39,903] Trial 33 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 239,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 110, 'gb_learning_rate': 0.1006335043432642,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:10:35,797] Trial 34 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 268,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 141, 'gb_learning_rate': 0.08254013131717884,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:11:36,484] Trial 35 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 253,
'rf_max_depth': 20, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 122, 'gb_learning_rate': 0.12208970200173513,
'gb_max_depth': 4, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:13:25,059] Trial 37 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 198,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 169, 'gb_learning_rate': 0.10162477954224966,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:14:19,838] Trial 38 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 285,
'rf_max_depth': None, 'rf_min_samples_split': 10,
'rf_min_samples_leaf': 4, 'gb_n_estimators': 102, 'gb_learning_rate':
0.10704500870836393, 'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel':
'rbf'}. Best is trial 23 with value: -0.7889125799573561.
[I 2023-09-12 13:15:24,840] Trial 39 finished with value: -
0.7882018479033405 and parameters: {'rf_n_estimators': 271,
'rf_max_depth': 20, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 127, 'gb_learning_rate': 0.054168916923891974,
'gb_max_depth': 5, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:16:34,687] Trial 40 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 273,
'rf_max_depth': 20, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 188, 'gb_learning_rate': 0.041954177730763334,
'gb_max_depth': 5, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:17:36,550] Trial 41 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 237,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':

19
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

3, 'gb_n_estimators': 129, 'gb_learning_rate': 0.05553761307475424,


'gb_max_depth': 5, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:18:41,670] Trial 42 finished with value: -
0.7825159914712153 and parameters: {'rf_n_estimators': 259,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 145, 'gb_learning_rate': 0.09091213279860089,
'gb_max_depth': 5, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:19:46,367] Trial 43 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 288,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 116, 'gb_learning_rate': 0.07134299225226537,
'gb_max_depth': 5, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:20:51,679] Trial 44 finished with value: -
0.7825159914712153 and parameters: {'rf_n_estimators': 272,
'rf_max_depth': 20, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 128, 'gb_learning_rate': 0.09400117304923084,
'gb_max_depth': 5, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:21:45,791] Trial 45 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 247,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 139, 'gb_learning_rate': 0.11754259913173924,
'gb_max_depth': 4, 'svm_C': 0.1, 'svm_kernel': 'rbf'}. Best is trial
23 with value: -0.7889125799573561.
[I 2023-09-12 13:22:43,424] Trial 46 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 259,
'rf_max_depth': None, 'rf_min_samples_split': 8,
'rf_min_samples_leaf': 4, 'gb_n_estimators': 164, 'gb_learning_rate':
0.05663908481469508, 'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel':
'rbf'}. Best is trial 23 with value: -0.7889125799573561.
[I 2023-09-12 13:23:39,449] Trial 47 finished with value: -
0.7839374555792467 and parameters: {'rf_n_estimators': 289,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 100, 'gb_learning_rate': 0.10888859227195612,
'gb_max_depth': 5, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:24:39,272] Trial 48 finished with value: -
0.7853589196872779 and parameters: {'rf_n_estimators': 230,
'rf_max_depth': 10, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 155, 'gb_learning_rate': 0.08404269976278497,
'gb_max_depth': 4, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:25:25,823] Trial 49 finished with value: -
0.7853589196872779 and parameters: {'rf_n_estimators': 171,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 115, 'gb_learning_rate': 0.09671746726471309,

20
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

'gb_max_depth': 4, 'svm_C': 0.1, 'svm_kernel': 'rbf'}. Best is trial


23 with value: -0.7889125799573561.
[I 2023-09-12 13:26:19,376] Trial 50 finished with value: -
0.7810945273631841 and parameters: {'rf_n_estimators': 274,
'rf_max_depth': 20, 'rf_min_samples_split': 6, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 144, 'gb_learning_rate': 0.07609953932272348,
'gb_max_depth': 3, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:27:10,783] Trial 51 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 242,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 109, 'gb_learning_rate': 0.09937607374435911,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:27:57,024] Trial 52 finished with value: -
0.7867803837953091 and parameters: {'rf_n_estimators': 127,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 125, 'gb_learning_rate': 0.11745283884054691,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:28:47,291] Trial 53 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 230,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 108, 'gb_learning_rate': 0.10618474005720532,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:29:34,225] Trial 54 finished with value: -
0.7818052594171997 and parameters: {'rf_n_estimators': 256,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 114, 'gb_learning_rate': 0.12488773717178249,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
23 with value: -0.7889125799573561.
[I 2023-09-12 13:30:25,959] Trial 55 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 208,
'rf_max_depth': 10, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 122, 'gb_learning_rate': 0.1118334675367541,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 23
with value: -0.7889125799573561.
[I 2023-09-12 13:31:23,267] Trial 56 finished with value: -
0.7903340440653873 and parameters: {'rf_n_estimators': 263,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 134, 'gb_learning_rate': 0.0865910120747001,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 56
with value: -0.7903340440653873.
[I 2023-09-12 13:32:22,142] Trial 57 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 265,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 135, 'gb_learning_rate': 0.08459717357636247,
'gb_max_depth': 5, 'svm_C': 0.1, 'svm_kernel': 'rbf'}. Best is trial

21
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

56 with value: -0.7903340440653873.


[I 2023-09-12 13:33:13,213] Trial 58 finished with value: -
0.7796730632551528 and parameters: {'rf_n_estimators': 278,
'rf_max_depth': None, 'rf_min_samples_split': 4,
'rf_min_samples_leaf': 2, 'gb_n_estimators': 150, 'gb_learning_rate':
0.07580057419160811, 'gb_max_depth': 3, 'svm_C': 1, 'svm_kernel':
'linear'}. Best is trial 56 with value: -0.7903340440653873.
[I 2023-09-12 13:34:21,150] Trial 59 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 292,
'rf_max_depth': 20, 'rf_min_samples_split': 3, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 158, 'gb_learning_rate': 0.06285758000747485,
'gb_max_depth': 4, 'svm_C': 10, 'svm_kernel': 'rbf'}. Best is trial 56
with value: -0.7903340440653873.
[I 2023-09-12 13:35:21,228] Trial 60 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 264,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 204, 'gb_learning_rate': 0.08755651391331597,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 56
with value: -0.7903340440653873.
[I 2023-09-12 13:36:13,853] Trial 61 finished with value: -
0.7867803837953091 and parameters: {'rf_n_estimators': 243,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 132, 'gb_learning_rate': 0.09712151233621061,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 56
with value: -0.7903340440653873.
[I 2023-09-12 13:37:07,128] Trial 62 finished with value: -
0.7882018479033405 and parameters: {'rf_n_estimators': 271,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 118, 'gb_learning_rate': 0.1043818627667415,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 56
with value: -0.7903340440653873.
[I 2023-09-12 13:38:03,189] Trial 63 finished with value: -
0.7889125799573561 and parameters: {'rf_n_estimators': 272,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 139, 'gb_learning_rate': 0.09325790375142273,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 56
with value: -0.7903340440653873.
[I 2023-09-12 13:38:59,253] Trial 64 finished with value: -
0.7910447761194029 and parameters: {'rf_n_estimators': 271,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 138, 'gb_learning_rate': 0.0948181291293482,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 64
with value: -0.7910447761194029.
[I 2023-09-12 13:39:57,551] Trial 65 finished with value: -
0.7917555081734187 and parameters: {'rf_n_estimators': 300,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 139, 'gb_learning_rate': 0.09345289942291049,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.

22
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

[I 2023-09-12 13:40:55,286] Trial 66 finished with value: -


0.7867803837953091 and parameters: {'rf_n_estimators': 298,
'rf_max_depth': 10, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 140, 'gb_learning_rate': 0.08796447559503179,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:41:49,294] Trial 67 finished with value: -
0.7810945273631841 and parameters: {'rf_n_estimators': 282,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 177, 'gb_learning_rate': 0.09567462891745224,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
65 with value: -0.7917555081734187.
[I 2023-09-12 13:42:48,163] Trial 68 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 294,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 148, 'gb_learning_rate': 0.09235216466107189,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:43:48,285] Trial 69 finished with value: -
0.7910447761194029 and parameters: {'rf_n_estimators': 300,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 160, 'gb_learning_rate': 0.07821400219812574,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:44:48,482] Trial 70 finished with value: -
0.7867803837953091 and parameters: {'rf_n_estimators': 299,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 166, 'gb_learning_rate': 0.07913546717242197,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:45:45,461] Trial 71 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 286,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 137, 'gb_learning_rate': 0.08134947307828817,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:46:43,315] Trial 72 finished with value: -
0.7882018479033405 and parameters: {'rf_n_estimators': 277,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 156, 'gb_learning_rate': 0.08685039959580683,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:47:42,048] Trial 73 finished with value: -
0.7896233120113717 and parameters: {'rf_n_estimators': 293,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 145, 'gb_learning_rate': 0.09895342780517714,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:48:40,739] Trial 74 finished with value: -

23
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

0.7867803837953091 and parameters: {'rf_n_estimators': 290,


'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 150, 'gb_learning_rate': 0.07566685009133928,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:49:39,934] Trial 75 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 284,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 159, 'gb_learning_rate': 0.10064842953203822,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:50:39,374] Trial 76 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 300,
'rf_max_depth': 20, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 144, 'gb_learning_rate': 0.0921147047883816,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:51:40,238] Trial 77 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 294,
'rf_max_depth': None, 'rf_min_samples_split': 8,
'rf_min_samples_leaf': 1, 'gb_n_estimators': 175, 'gb_learning_rate':
0.08481469792279317, 'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel':
'rbf'}. Best is trial 65 with value: -0.7917555081734187.
[I 2023-09-12 13:52:34,828] Trial 78 finished with value: -
0.7839374555792467 and parameters: {'rf_n_estimators': 279,
'rf_max_depth': 20, 'rf_min_samples_split': 6, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 129, 'gb_learning_rate': 0.10272426102281627,
'gb_max_depth': 3, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:53:25,727] Trial 79 finished with value: -
0.7818052594171997 and parameters: {'rf_n_estimators': 267,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 140, 'gb_learning_rate': 0.09486107540275275,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
65 with value: -0.7917555081734187.
[I 2023-09-12 13:54:22,434] Trial 80 finished with value: -
0.7889125799573561 and parameters: {'rf_n_estimators': 292,
'rf_max_depth': 10, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 124, 'gb_learning_rate': 0.07959243805105294,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:55:18,040] Trial 81 finished with value: -
0.7882018479033405 and parameters: {'rf_n_estimators': 291,
'rf_max_depth': 10, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 121, 'gb_learning_rate': 0.07801076631645862,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:56:13,869] Trial 82 finished with value: -
0.7853589196872779 and parameters: {'rf_n_estimators': 283,

24
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

'rf_max_depth': 10, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':


2, 'gb_n_estimators': 132, 'gb_learning_rate': 0.0708534980332146,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:57:11,070] Trial 83 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 294,
'rf_max_depth': 10, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 127, 'gb_learning_rate': 0.08981904313324875,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:58:07,135] Trial 84 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 262,
'rf_max_depth': 10, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 146, 'gb_learning_rate': 0.0818307345229255,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 13:59:08,402] Trial 85 finished with value: -
0.7825159914712153 and parameters: {'rf_n_estimators': 284,
'rf_max_depth': 10, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 221, 'gb_learning_rate': 0.09811261301249444,
'gb_max_depth': 4, 'svm_C': 0.1, 'svm_kernel': 'rbf'}. Best is trial
65 with value: -0.7917555081734187.
[I 2023-09-12 14:00:10,853] Trial 86 finished with value: -
0.7839374555792467 and parameters: {'rf_n_estimators': 289,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 196, 'gb_learning_rate': 0.1138818337382532,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:01:10,960] Trial 87 finished with value: -
0.7867803837953091 and parameters: {'rf_n_estimators': 300,
'rf_max_depth': 20, 'rf_min_samples_split': 7, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 152, 'gb_learning_rate': 0.10630864098533097,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:02:08,221] Trial 88 finished with value: -
0.7867803837953091 and parameters: {'rf_n_estimators': 270,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 136, 'gb_learning_rate': 0.09259410143568621,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:03:06,178] Trial 89 finished with value: -
0.7882018479033405 and parameters: {'rf_n_estimators': 277,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
1, 'gb_n_estimators': 142, 'gb_learning_rate': 0.07296060755175435,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:04:01,314] Trial 90 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 258,
'rf_max_depth': 20, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 124, 'gb_learning_rate': 0.08189933596979698,

25
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65


with value: -0.7917555081734187.
[I 2023-09-12 14:04:58,024] Trial 91 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 274,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 133, 'gb_learning_rate': 0.10972270279100357,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:05:58,571] Trial 92 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 287,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 160, 'gb_learning_rate': 0.10260719805981487,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:07:06,000] Trial 93 finished with value: -
0.783226723525231 and parameters: {'rf_n_estimators': 276,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 268, 'gb_learning_rate': 0.09705263756100509,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:08:02,743] Trial 94 finished with value: -
0.7839374555792467 and parameters: {'rf_n_estimators': 294,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 106, 'gb_learning_rate': 0.08836230654281374,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:08:56,254] Trial 95 finished with value: -
0.7846481876332623 and parameters: {'rf_n_estimators': 255,
'rf_max_depth': None, 'rf_min_samples_split': 10,
'rf_min_samples_leaf': 3, 'gb_n_estimators': 117, 'gb_learning_rate':
0.08529667631146484, 'gb_max_depth': 3, 'svm_C': 1, 'svm_kernel':
'rbf'}. Best is trial 65 with value: -0.7917555081734187.
[I 2023-09-12 14:09:53,532] Trial 96 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 267,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
4, 'gb_n_estimators': 130, 'gb_learning_rate': 0.06680073412606798,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65
with value: -0.7917555081734187.
[I 2023-09-12 14:10:50,596] Trial 97 finished with value: -
0.7874911158493249 and parameters: {'rf_n_estimators': 280,
'rf_max_depth': 20, 'rf_min_samples_split': 8, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 137, 'gb_learning_rate': 0.10915615548778701,
'gb_max_depth': 4, 'svm_C': 0.1, 'svm_kernel': 'rbf'}. Best is trial
65 with value: -0.7917555081734187.
[I 2023-09-12 14:11:46,674] Trial 98 finished with value: -
0.7860696517412935 and parameters: {'rf_n_estimators': 250,
'rf_max_depth': 10, 'rf_min_samples_split': 10, 'rf_min_samples_leaf':
3, 'gb_n_estimators': 121, 'gb_learning_rate': 0.09875274016606653,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'rbf'}. Best is trial 65

26
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

with value: -0.7917555081734187.


[I 2023-09-12 14:12:42,423] Trial 99 finished with value: -
0.7818052594171997 and parameters: {'rf_n_estimators': 295,
'rf_max_depth': 20, 'rf_min_samples_split': 9, 'rf_min_samples_leaf':
2, 'gb_n_estimators': 113, 'gb_learning_rate': 0.11487120000946097,
'gb_max_depth': 4, 'svm_C': 1, 'svm_kernel': 'linear'}. Best is trial
65 with value: -0.7917555081734187.

Best RF Hyperparameters:
+----------------------+---------------------+
| Parameter | Value |
+======================+=====================+
| rf_n_estimators | 300 |
+----------------------+---------------------+
| rf_max_depth | 20 |
+----------------------+---------------------+
| rf_min_samples_split | 8 |
+----------------------+---------------------+
| rf_min_samples_leaf | 2 |
+----------------------+---------------------+
| gb_n_estimators | 139 |
+----------------------+---------------------+
| gb_learning_rate | 0.09345289942291049 |
+----------------------+---------------------+
| gb_max_depth | 4 |
+----------------------+---------------------+
| svm_C | 1 |
+----------------------+---------------------+
| svm_kernel | rbf |
+----------------------+---------------------+
Best Accuracy: 0.7917555081734187

experiment.end()

COMET INFO:
----------------------------------------------------------------------
-----------------
COMET INFO: Comet.ml Experiment Summary
COMET INFO:
----------------------------------------------------------------------
-----------------
COMET INFO: Data:
COMET INFO: display_summary_level : 1
COMET INFO: url :
https://www.comet.com/yennhi95zz/customer-churn/ce4189deb57943d281df04
05dab75687
COMET INFO: Metrics [count] (min, max):
COMET INFO: gb_accuracy [100] : (0.7640369580668088,
0.7924662402274343)
COMET INFO: gb_roc_auc [100] : (0.8042899814154298,

27
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

0.8275504604728453)
COMET INFO: rf_accuracy [100] : (0.7604832977967306,
0.783226723525231)
COMET INFO: rf_roc_auc [100] : (0.7839880209762333,
0.8187654979267074)
COMET INFO: stacking_accuracy [100] : (0.7782515991471215,
0.7917555081734187)
COMET INFO: stacking_roc_auc [100] : (0.8136417992348748,
0.8247718342815433)
COMET INFO: svm_accuracy [100] : (0.7732764747690121,
0.7860696517412935)
COMET INFO: svm_roc_auc [100] : (0.7664970414813818,
0.8130671788208375)
COMET INFO: Parameters:
COMET INFO: C : 1.0
COMET INFO: bootstrap : True
COMET INFO: break_ties : False
COMET INFO: cache_size : 200
COMET INFO: categories : auto
COMET INFO: ccp_alpha : 0.0
COMET INFO: class_weight : 1
COMET INFO: coef0 : 0.0
COMET INFO: constant : 1
COMET INFO: copy : True
COMET INFO: criterion :
friedman_mse
COMET INFO: cv : 1
COMET INFO: decision_function_shape : ovr
COMET INFO: degree : 3
COMET INFO: drop : 1
COMET INFO: dtype : <class
'numpy.float64'>
COMET INFO: dual : False
COMET INFO: estimators :
[('random_forest', RandomForestClassifier(max_depth=20,
min_samples_leaf=2, min_samples_split=9,
n_estimators=295)), ('gradient_boosting',
GradientBoostingClassifier(learning_rate=0.11487120000946097,
max_depth=4,
n_estimators=113)), ('svm', SVC(C=1,
kernel='linear', probability=True))]
COMET INFO: final_estimator :
LogisticRegression()
COMET INFO: final_estimator__C : 1.0
COMET INFO: final_estimator__class_weight : 1
COMET INFO: final_estimator__dual : False
COMET INFO: final_estimator__fit_intercept : True
COMET INFO: final_estimator__intercept_scaling : 1
COMET INFO: final_estimator__l1_ratio : 1

28
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

COMET INFO: final_estimator__max_iter : 100


COMET INFO: final_estimator__multi_class : auto
COMET INFO: final_estimator__n_jobs : 1
COMET INFO: final_estimator__penalty : l2
COMET INFO: final_estimator__random_state : 1
COMET INFO: final_estimator__solver : lbfgs
COMET INFO: final_estimator__tol : 0.0001
COMET INFO: final_estimator__verbose : 0
COMET INFO: final_estimator__warm_start : False
COMET INFO: fit_intercept : True
COMET INFO: gamma : scale
COMET INFO: gb_learning_rate :
0.11487120000946097
COMET INFO: gb_max_depth : 4
COMET INFO: gb_n_estimators : 113
COMET INFO: gradient_boosting :
GradientBoostingClassifier(learning_rate=0.11487120000946097,
max_depth=4,
n_estimators=113)
COMET INFO: gradient_boosting__ccp_alpha : 0.0
COMET INFO: gradient_boosting__criterion :
friedman_mse
COMET INFO: gradient_boosting__init : 1
COMET INFO: gradient_boosting__learning_rate :
0.11487120000946097
COMET INFO: gradient_boosting__loss : log_loss
COMET INFO: gradient_boosting__max_depth : 4
COMET INFO: gradient_boosting__max_features : 1
COMET INFO: gradient_boosting__max_leaf_nodes : 1
COMET INFO: gradient_boosting__min_impurity_decrease : 0.0
COMET INFO: gradient_boosting__min_samples_leaf : 1
COMET INFO: gradient_boosting__min_samples_split : 2
COMET INFO: gradient_boosting__min_weight_fraction_leaf : 0.0
COMET INFO: gradient_boosting__n_estimators : 113
COMET INFO: gradient_boosting__n_iter_no_change : 1
COMET INFO: gradient_boosting__random_state : 1
COMET INFO: gradient_boosting__subsample : 1.0
COMET INFO: gradient_boosting__tol : 0.0001
COMET INFO: gradient_boosting__validation_fraction : 0.1
COMET INFO: gradient_boosting__verbose : 0
COMET INFO: gradient_boosting__warm_start : False
COMET INFO: handle_unknown : ignore
COMET INFO: init : 1
COMET INFO: intercept_scaling : 1
COMET INFO: kernel : linear
COMET INFO: l1_ratio : 1
COMET INFO: learning_rate :
0.11487120000946097
COMET INFO: loss : log_loss

29
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

COMET INFO: max_categories : 1


COMET INFO: max_depth : 4
COMET INFO: max_features : 600
COMET INFO: max_iter : 100
COMET INFO: max_leaf_nodes : 1
COMET INFO: max_samples : 1
COMET INFO: min_frequency : 1
COMET INFO: min_impurity_decrease : 0.0
COMET INFO: min_samples_leaf : 1
COMET INFO: min_samples_split : 2
COMET INFO: min_weight_fraction_leaf : 0.0
COMET INFO: multi_class : auto
COMET INFO: n_estimators : 113
COMET INFO: n_iter_no_change : 1
COMET INFO: n_jobs : 1
COMET INFO: oob_score : False
COMET INFO: passthrough : False
COMET INFO: penalty : l2
COMET INFO: probability : True
COMET INFO: random_forest :
RandomForestClassifier(max_depth=20, min_samples_leaf=2,
min_samples_split=9,
n_estimators=295)
COMET INFO: random_forest__bootstrap : True
COMET INFO: random_forest__ccp_alpha : 0.0
COMET INFO: random_forest__class_weight : 1
COMET INFO: random_forest__criterion : gini
COMET INFO: random_forest__max_depth : 20
COMET INFO: random_forest__max_features : sqrt
COMET INFO: random_forest__max_leaf_nodes : 1
COMET INFO: random_forest__max_samples : 1
COMET INFO: random_forest__min_impurity_decrease : 0.0
COMET INFO: random_forest__min_samples_leaf : 2
COMET INFO: random_forest__min_samples_split : 9
COMET INFO: random_forest__min_weight_fraction_leaf : 0.0
COMET INFO: random_forest__n_estimators : 295
COMET INFO: random_forest__n_jobs : 1
COMET INFO: random_forest__oob_score : False
COMET INFO: random_forest__random_state : 1
COMET INFO: random_forest__verbose : 0
COMET INFO: random_forest__warm_start : False
COMET INFO: random_state : 181532
COMET INFO: rf_max_depth : 20
COMET INFO: rf_min_samples_leaf : 2
COMET INFO: rf_min_samples_split : 9
COMET INFO: rf_n_estimators : 295
COMET INFO: shrinking : True
COMET INFO: solver : lbfgs
COMET INFO: sparse : False

30
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

COMET INFO: sparse_output : False


COMET INFO: splitter : best
COMET INFO: stack_method : auto
COMET INFO: strategy : prior
COMET INFO: subsample : 1.0
COMET INFO: svm : SVC(C=1,
kernel='linear', probability=True)
COMET INFO: svm_C : 1
COMET INFO: svm__C : 1
COMET INFO: svm__break_ties : False
COMET INFO: svm__cache_size : 200
COMET INFO: svm__class_weight : 1
COMET INFO: svm__coef0 : 0.0
COMET INFO: svm__decision_function_shape : ovr
COMET INFO: svm__degree : 3
COMET INFO: svm__gamma : scale
COMET INFO: svm__kernel : linear
COMET INFO: svm__max_iter : -1
COMET INFO: svm__probability : True
COMET INFO: svm__random_state : 1
COMET INFO: svm__shrinking : True
COMET INFO: svm__tol : 0.001
COMET INFO: svm__verbose : False
COMET INFO: svm_kernel : linear
COMET INFO: tol : 0.0001
COMET INFO: validation_fraction : 0.1
COMET INFO: verbose : 0
COMET INFO: warm_start : False
COMET INFO: with_mean : True
COMET INFO: with_std : True
COMET INFO: Uploads:
COMET INFO: conda-environment-definition : 1
COMET INFO: conda-info : 1
COMET INFO: conda-specification : 1
COMET INFO: environment details : 1
COMET INFO: figures : 5
COMET INFO: filename : 1
COMET INFO: installed packages : 1
COMET INFO: notebook : 1
COMET INFO: os packages : 1
COMET INFO: source_code : 1
COMET INFO:
COMET INFO: Please wait for metadata to finish uploading (timeout is
3600 seconds)

6. Interpret the results


Detail explanation and interpret the results into business insights in the blog.

31
https://www.linkedin.com/in/yennhi95zz/ || https://github.com/yennhi95zz || https://medium.com/@yennhi95zz

References:
• GitHub Repository
• Kaggle Project
• Medium Article

👏If you found this article interesting, your support by commenting your insights in this post will
help me spread the knowledge to others.

❗Found the articles helpful? Get UNLIMITED access to every story on Medium with just
$1/week — HERE

☕Buy Me a Coffee — HERE

32

You might also like