![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机器学习
CodeJugend
我,什么都莫得
展开
-
线性回归LinearRegression.py
线性回归实现 import numpy as np import matplotlib.pyplot as plt data = np.loadtxt('ex1data1.txt', delimiter=',') print(type(data)) <class 'numpy.ndarray'> ex1data1.txt提供的样本 6.1101,17.592 5.52...原创 2020-04-10 16:22:09 · 460 阅读 · 0 评论 -
mytool algorithm(LinerRegression pack)(python)
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation def computer_cost(x, y, w, b): m = len(x) cost = 0 h_x = w * x + b cha = h_x - y fangcha = cha **...原创 2020-04-08 12:06:19 · 117 阅读 · 0 评论 -
LinerRegression(python)
import myTool import numpy as np import matplotlib.pyplot as plt data = np.loadtxt('ex1data1.txt', delimiter=',') # print(type(data)) x = data[:, 0] y = data[:, 1] # print(x) # print(y) pl...原创 2020-04-08 12:06:43 · 220 阅读 · 0 评论