小编Map*_*ppi的帖子

ELI5 解释权重和解释预测作为 pandas DataFrame

如何将 ELI5 保存explain_weightsexplain_predictionpandas DataFrame?

下面的示例玩具代码。

# Load the dataset as DataFrame
import pandas as pd
from sklearn.datasets import load_iris
df = pd.DataFrame(load_iris().data, columns=load_iris().feature_names)
df['label'] = load_iris().target

# Divide to X and y and split to train and test sets
X = df.iloc[:,0:4].values
y = df.iloc[:,4].values
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)

# Define the neural network model
from keras.models import Sequential
from keras.layers import Dense
def baseline_model():
    model = Sequential() …
Run Code Online (Sandbox Code Playgroud)

pandas scikit-learn keras

6
推荐指数
1
解决办法
4478
查看次数

标签 统计

keras ×1

pandas ×1

scikit-learn ×1