#--------------------------------------实例一-----------------------------------------------
from sklearn import datasets
from sklearn.neighbors import KNeighborsClassifier
from sklearn.cross_validation import train_test_split
import numpy as np
np.random.seed(0)#设置随机种子,设置后每次产生的随机数都一样
#-----------------------------------实例三---------------------------
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from sklearn import neighbors,datasets