ML
文章平均质量分 79
Ian_Hwang
这个作者很懒,什么都没留下…
展开
-
AdaBoost算法
# coding=utf-8from math import log, expfrom numpy.core.umath import signfrom numpy.ma import multiplyfrom numpy import *def loadSimpleDate(): dataMat = matrix([[1. , 2.1],转载 2015-03-02 17:53:41 · 397 阅读 · 0 评论 -
FP树
__author__ = 'IanHwang'# coding:utf-8def createTree(dataSet, minSup=1): #create FP-tree from dataset but don't mine headerTable = {} #go over dataSet twice for trans in dataSet:#first pa原创 2015-03-17 11:28:51 · 1020 阅读 · 0 评论 -
朴素贝叶斯算法
# coding=utf-8from math import logfrom numpy import *def loadDataSet(): postingList=[['my','dog','has','flea','problems','help','please'], ['maybe','not','take','him','to','dog原创 2015-03-02 18:10:10 · 429 阅读 · 0 评论 -
Python感知机算法
# _*_ coding:utf-8 _*_import copyfrom matplotlib import pyplot as pltfrom matplotlib import animationtraining_set = [[(3,3),1],[(4,3),1],[(1,1),-1]]w = [0, 0]b = 0history = []def update(item转载 2015-02-07 16:36:45 · 565 阅读 · 0 评论