GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pythonForMachineLearning/SVM1.py at master · daacheng/pythonForMachineLearning Expand file tree/ Copy pathSVM1.pyMore file actions 10 lines (10 loc) · 375 Bytes / Copy pathSVM1.pyFile metadata and controls10 lines (10 loc) · 375 Bytes 1 2 3 4 5 6 7 8 9 10 from sklearn import svm x=[[2,0],[1,1],[2,3]]#特征向量 y=[0,0,1]#特征对应的label clf=svm.SVC(kernel='linear') clf.fit(x,y) print(clf) print(clf.support_vectors_)#支持向量 print(clf.support_)#支持向量在x中的索引 print(clf.n_support_)#针对每个标签label找到了几个支持向量 print(clf.predict([[2,0]]))#预测这个点属于哪一类标签label |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |