Gelişmiş Ağaçlar Yöntemleri - Advanced Trees

0. Kütüphanelerin Kurulması

import warnings
import numpy as np
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier, VotingClassifier
from sklearn.model_selection import GridSearchCV, cross_validate, RandomizedSearchCV, validation_curve

# !pip install catboost
# !pip install xgboost
# !pip install lightgbm

from xgboost import XGBClassifier
from lightgbm import LGBMClassifier
from catboost import CatBoostClassifier

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

warnings.filterwarnings('ignore')
C:\Users\ABRA\anaconda3\lib\site-packages\xgboost\compat.py:36: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead. from pandas import MultiIndex, Int64Index

0. Veri Setinin Okutulması

#Veri setinin okutulması
df = pd.read_csv("diabetes.csv")

#Bağımsız değişkenlerin belirlenmesi
y = df["Outcome"]

#Bağımlı değişkenlerin belirlenmesi
x = df.drop(["Outcome"], axis=1)