LinearRegressionWithRegularization】的更多相关文章

在线性回归的基础上加上正则项: # -*-coding:utf-8 -*- ''' Created on 2016年12月15日 @author: lpworkdstudy ''' import numpy as np from numpy.core.multiarray import dtype import matplotlib.pyplot as plt filename = "ex1data1.txt" alpha = 0.01 f = open(filename,"…