Seaborn
Seaborn-05-Pairplot多变量图
seaborn.pairplot
fit_reg
IfTrue, estimate and plot a regression model relating thexandyvariables.
import seaborn as sns
# sns.set(style="darkgrid")
g = sns.lmplot(
data=code_origin,
x="true", y="predict", fit_reg=False
)
ax = plt.gca()
def annotate(data, **kws):
# ax.text(.05, .9, 'R2={:.2f}'.format(score_pipe["R2"]),
# transform=ax.transAxes)
ax.text(.05, .9, r'$R^2={:.2f}$'.format(score_pipe["R2"]),
transform=ax.transAxes)
g.map_dataframe(annotate)
g.set_axis_labels("Real value", "Predicted value")
axes = g.fig.axes
for ax in axes:
ax.plot(code_origin['true'], code_origin['true'], C='k', linewidth=1, linestyle='--')


浙公网安备 33010602011771号