def plot_tree_data(data, indicies_x, indicies_y, model, plot_indicies=False):
plt.subplot(3, 1, 1)
plt.plot(data, "o", color="blue", label="data")
plt.plot(model, color="red", label="model")
plt.ylim([-10, 10])
if plot_indicies:
plt.plot(
indicies_x,
indicies_y,
"o",
color="green",
label="fitness predictors"
)
plt.title("Data and Model Output")
plt.legend()
评论列表
文章目录