diff --git a/is/ub9/regression.png b/is/ub9/regression.png new file mode 100644 index 0000000..105a826 --- /dev/null +++ b/is/ub9/regression.png Binary files differ diff --git a/is/ub9/residuals.png b/is/ub9/residuals.png new file mode 100644 index 0000000..c60ca43 --- /dev/null +++ b/is/ub9/residuals.png Binary files differ diff --git a/is/ub9/sample.py b/is/ub9/sample.py index 4c7afb6..8ac1fc5 100755 --- a/is/ub9/sample.py +++ b/is/ub9/sample.py @@ -15,9 +15,18 @@ plt.plot(X,Y,'x') -#clf=svm.SVR() -#clf.fit(X.T,Y) +X=np.array(X) +Xt=X.reshape((500,1)) -#plt(X,clf.predict(X),'o') +clf=svm.SVR() +clf.fit(Xt,Y) +ypred=clf.predict(Xt) +plt.plot(X,ypred,'rx') + +plt.show() + +plt.plot(Y,Y-ypred,'ro') + +plt.grid() plt.show()