![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机器学习
翟小花@@
这个作者很懒,什么都没留下…
展开
-
day03-波士顿房价预测
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets boston = datasets.load_boston() X = boston.data y = boston.target X = X[y < 50.0] y = y[y < 50.0] from sklearn.linear_model import LinearRegression lin_reg = LinearRegre原创 2021-07-13 10:53:34 · 54 阅读 · 0 评论 -
day04-机器学习-梯度下降
import numpy as np from matplotlib import pyplot as plt theta_history = [] #损失函数 def J(theta): try: return (theta - 2.5)**2 - 1.0 except: return float('inf') #导数 def dJ(theta): return 2*(theta - 2.5) def gradient_descent(initia原创 2021-07-13 09:04:50 · 46 阅读 · 0 评论 -
day01-Python基本语法
from matplotlib import pyplot as plt import numpy as np # plt.plot([0, 5], [0, 5]) # plt.show() # x = np.linspace(0, 2*np.pi, num=100)# 等差 # y = np.sin(x) # plt.plot(x, y) # plt.show() # cosy = np.cos(x) # plt.figure(figsize=(8, 6)) # 指定画布的大小 # plt.plot(x.原创 2021-07-13 08:42:15 · 61 阅读 · 0 评论 -
day03爬虫--豆瓣
import requests from lxml import html import pandas as pd import json # url="" headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"} tv_list = [] for i in range原创 2021-07-13 08:35:32 · 73 阅读 · 0 评论