![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机器学习
文章平均质量分 59
qq_34911780
这个作者很懒,什么都没留下…
展开
-
一元线性回归的Python编程实现
这篇文章主要是为了实现周志华老师的机器学习书涉及的:单变量的线性回归,即一元线性回归的Python编程实现。代码如下:# -*- coding: cp936 -*- from numpy import * import pandas as pd from pandas import Series import matplotlib.pyplot as plt import tensorflow a...原创 2018-04-01 19:34:58 · 3281 阅读 · 0 评论 -
一元线性回归的MATLAB编程实现
load('Copy_of_data.mat', 'data')X=data(:,1);y=data(:,2);pos0=find(y==0);pos1=find(y==1);x_pos=1:size(y);hold onplot(X(pos0,:),y(pos0,:),'ro','LineWidth',2,'MarkerSize',7);plot(X(pos1,:),y(pos1,:),'k+'...原创 2018-03-28 15:24:49 · 9871 阅读 · 0 评论