机器学习
文章平均质量分 73
lyl140935
这个作者很懒,什么都没留下…
展开
-
机器学习0919第六题
import pandas as pdfrom numpy import nangd = pd.DataFrame([[27898, 2400, 1100, 1200, 800], [25999, 2200, 1200, 800, 400], [21018,1250,1300,600,600],[19185,1400,1000,700,400],[17129,3000,1000,300,700],[24700,5000,1000,500,500],[24800,6000,4000,1200,1100原创 2020-09-22 16:36:16 · 148 阅读 · 0 评论 -
机器学习0919第五题
import matplotlib.pyplot as pltimport numpy as np#解决中文显示问题plt.rcParams['font.sans-serif'] = ['KaiTi'] # 指定默认字体plt.rcParams['axes.unicode_minus'] = False # 解决保存图像是负号'-'显示为方块的问题x0 = 0.5y0 = 2*x0plt.scatter(x0, y0, s=50, color='r', lw = 3)#plt.plot([x原创 2020-09-22 16:35:59 · 106 阅读 · 0 评论 -
机器学习第二题0919
import numpy as npdef sun_prime(num): for j in range(2, int(np.sqrt(num)) + 1):#从2开始,到sqrt(num) if num % j == 0:#观察num是否是质数 return 0 break else: return num#返回值为num,方便求和lylsum = 5# 从4开始,要加上2,3两个质数for i原创 2020-09-22 16:36:53 · 319 阅读 · 0 评论 -
机器学习第五题0919
import matplotlib.pyplot as pltimport numpy as np#解决中文显示问题plt.rcParams['font.sans-serif'] = ['KaiTi'] # 指定默认字体plt.rcParams['axes.unicode_minus'] = False # 解决保存图像是负号'-'显示为方块的问题x0 = 0.5y0 = 2*x0plt.scatter(x0, y0, s=50, color='r', lw = 3)#plt.plot([x原创 2020-09-22 16:37:04 · 353 阅读 · 0 评论 -
机器学习作业9.19日第四题
import matplotlib.pyplot as pltimport numpy as np#解决中文显示问题plt.rcParams['font.sans-serif'] = ['KaiTi'] # 指定默认字体plt.rcParams['axes.unicode_minus'] = False # 解决保存图像是负号'-'显示为方块的问题x_data = ['1978', '1979', '1980', '1981', '1982', '1983', '1984', '1985', '1原创 2020-09-22 10:03:09 · 288 阅读 · 0 评论