资 源 简 介
# -*- coding: utf-8 -*
from numpy import *
import operator
def createDataSet():
group = array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]])
labels=["A","A","B","B"]
return group,labels
#特别注意numpy矩阵的表达方式: a=array([[1,2,3],[4,5,6]])这是一个2行3列的矩阵
#这里的dataset为group