Skip to content

Commit

Permalink
Merge pull request #2 from grknc/YG-13-modelleme
Browse files Browse the repository at this point in the history
Update Telco_Churn_Feature_Engineering.py
  • Loading branch information
grknc authored Jan 21, 2024
2 parents 98df80e + c48f112 commit e829ade
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Telco_Churn_Feature_Engineering.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,6 @@ def cat_summary(dataframe,col_name):

df.groupby("INT_SEC_SERV_GENDER").agg({"Churn": ["mean","count"]})



###############################################
# * 2.3.Processing Encoding and One-Hot Encoding
###############################################
Expand All @@ -437,7 +435,6 @@ def one_hot_encoder(dataframe, categorical_cols, drop_first=True):
ohe_cols = [col for col in df.columns if 30 >= df[col].nunique() > 2]

df = one_hot_encoder(df, ohe_cols)

df.head()

###############################################
Expand All @@ -461,4 +458,4 @@ def one_hot_encoder(dataframe, categorical_cols, drop_first=True):
from sklearn.ensemble import RandomForestClassifier
rf_model = RandomForestClassifier(random_state=46).fit(X_train, y_train)
y_pred = rf_model.predict(X_test)
accuracy_score(y_pred, y_test)
accuracy_score(y_pred, y_test)

0 comments on commit e829ade

Please sign in to comment.