Python ile Açıklanabilir AI
Fouad Trad
Machine Learning Engineer




![Orijinal veri kümesinde [1, 2, 3, 4] olan bir özelliğin karıştırılıp [4, 2, 1, 3] olduğu; karıştırılan veri kümesinin ML modeline verilerek karıştırılmış performansın elde edildiğini gösteren görsel.](https://assets.datacamp.com/production/repositories/6745/datasets/8941afd8450944dd95675cf114c800a0de3d511c/PI_2.png)


| GRE Puanı | TOEFL Puanı | Üniversite Derecesi | SOP | LOR | CGPA | Kabul Olasılığı | Kabul |
|---|---|---|---|---|---|---|---|
| 337 | 118 | 4 | 4.5 | 4.5 | 9.65 | 0.92 | 1 |
| 324 | 107 | 4 | 4 | 4.5 | 8.87 | 0.76 | 1 |
| 316 | 104 | 3 | 3 | 3.5 | 8 | 0.72 | 1 |
| 322 | 110 | 3 | 3.5 | 2.5 | 8.67 | 0.8 | 1 |
| 314 | 103 | 2 | 2 | 3 | 8.21 | 0.45 | 0 |
Veriler şurada:
X_train, y_train
from sklearn.neural_network import MLPClassifier model = MLPClassifier(hidden_layer_sizes=(10,10))model.fit(X_train, y_train)
from sklearn.inspection import permutation_importanceresult = permutation_importance(model,X_train, y_train,n_repeats=10,random_state=42,scoring='accuracy')print(result.importances_mean)
[0.16213568 0.13831658 0.10575377 0.10522613 0.11741206 0.20072864]
import matplotlib.pyplot as plt
plt.bar(X_train.columns,
result.importances_mean)

import matplotlib.pyplot as plt
plt.bar(X_train.columns,
result.importances_mean)

plt.bar(X_train.columns, np.abs(log_reg.coef_[0]))

Python ile Açıklanabilir AI