02 2017 档案

摘要:#coding=utf-8 from numpy import * def loadSimpleData(): dataMat = matrix([[1. , 2.1], [2. , 1.1], [1.3 , 1.], [1. , 1.], [2. , 1.]]) classLabels = [1. 阅读全文
posted @ 2017-02-21 15:56 白白毛狗 阅读(877) 评论(0) 推荐(0)
摘要:#coding:utf-8 from numpy import * #加载文档词向量数据以及相应文档类别,0表示正常言论,1表示侮辱性文字 def loadDataSet(): postingList = [['my','dog','has','flea','problems','help','pl 阅读全文
posted @ 2017-02-21 15:52 白白毛狗 阅读(857) 评论(0) 推荐(0)
摘要:写这篇博文,始于以下问题的探究: 1 #coding:utf-8 2 class A(object): 3 def __init__(self): 4 print 'enter A' 5 print 'leave A' 6 class B(object): 7 def __init__(self): 阅读全文
posted @ 2017-02-12 15:12 白白毛狗 阅读(309) 评论(0) 推荐(0)