摘要:
import numpy as np import random def genData(numPoints,bias,variance): x = np.zeros(shape=(numPoints,2)) y = np.zeros(shape=(numPoints)) for i in range(0,numPoi... 阅读全文
摘要:
from __future__ import print_function from time import time import logging import matplotlib.pyplot as plt from sklearn.cross_validation import train_test_split from sk... 阅读全文
摘要:
import numpy as np import pylab as pl from sklearn import svm # we create 40 separable points #np.random.seed(0) X = np.r_[np.random.randn(100, 2) - [2, 2], np.random.randn(100, 2) + [2, 2]] ... 阅读全文