python matplotlib 散点图的拟合直线的简单示例
摘要:
# sample points X = [0, 5, 10, 15, 20] Y = [0, 7, 10, 13, 20] # solve for a and b def best_fit(X, Y): xbar = sum(X) / len(X) ybar = sum(Y) / len(Y) n 阅读全文
posted @ 2023-04-23 15:12 pu369com 阅读(310) 评论(0) 推荐(0) 编辑