- 博客(6)
- 收藏
- 关注
原创 【机器学习实战】10.k-means聚类算法(1)
这里主要记录对书上相关程序运行结果的一些展示。程序:# -*- coding: utf-8 -*-"""Created on Fri Mar 30 10:42:00 2018@author: ##"""from numpy import *import matplotlib.pyplot as plt def loadDataSet(filename): ''' ...
2018-03-30 15:17:45 482 1
原创 【机器学习实战】6.支持向量机——简化SMO算法
主体是书上的程序,添加了一个画图函数,查看分类结果。实际上,按照书上的程序,分类结果并不一定好。书上图6-4只是理想结果。程序后附上结果。# -*- coding: utf-8 -*-"""Created on Thu Mar 15 10:26:20 2018@author: ###"""import numpy as npimport matplotlib.pyplot as p...
2018-03-20 17:27:26 818
原创 【机器学习实战】5.Logistic回归(1)
程序:# -*- coding: utf-8 -*-"""Created on Wed Mar 14 14:15:43 2018@author: ###"""import numpy as npimport matplotlib.pyplot as pltdef loadDataSet(): dataMat=[] labelMat=[] fr=open('...
2018-03-14 20:17:51 314
原创 【机器学习实战】11.使用Apriori算法进行关联分析——python3程序
之前费心费力写了一篇,结果没有保存。这一篇主要放上书本上的程序分析及运行结果。 关联分析主要分为:频繁项集生成和关联规则生成1.频繁项集生成——Apriori算法代码:def createC1(dataSet): ''' 构建大小为1的所有候选项的集合,存储不重复的项值 map(function,data)映射函数,在python3中返回一个迭代器,智能循环一...
2018-03-06 17:32:14 4072 3
原创 [leetcode]21. Merge Two Sorted Lists
题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Output: 1-&g...
2018-03-02 11:05:43 129
原创 【leetcode】70. Climbing Stairs
题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive ...
2018-03-02 10:52:34 142
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人