jeudi 21 mai 2020

Call a sample for y_test and predictions in Seaborn regplot

relatively new to Python. I'm trying to plot the y_test and predictions for my regression model in Seaborn regplot, but it results in overplotting. I have tried to sample, but it's not working. Here is my code:

algo = XGBRegressor(n_estimators=50, max_depth=5)
model = algo.fit(X_train, y_train)

#Predictions
preds = model.predict(X_test)

data_sample = credit.sample(100)

sns.set_style('ticks')
sns.regplot(y_test, preds, data=data_sample, fit_reg=True, scatter_kws={'color': 'darkred', 'alpha': 0.3, 's': 100})

Overplotted regplot

Any ideas on how to call a sample for the y_test and preds? Ty




Aucun commentaire:

Enregistrer un commentaire