Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FormMe/MultipleKernel-LeastSquares-SupportVectorMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

30 Commits

Repository files navigation

MultipleKernel-LeastSquares-SuportVectorMachine

The research thesis report in Russian presented in report.pdf

Firstly import package

from mk_ls_svm_lib as mk

Create instance of classificator with list of kernels

kernel_set = [mk.kernel.RBF(10), mk.kernel.Poly(1,2)]
clf = mk.mk_ls_svm.MKLSSVM(kernel_set)

Fit classificator

import numpy as np
X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]])
y = np.array([1, 1, 2, 2]) 
clf = clf.fit(X,y)

Predict

predicted_y = clf.predict(X)

You can save your classificator into file

clf.to_pkl('my_clf.pkl')

And load it

clf = mk.mk_ls_svm.load_clf_from_pkl('my_clf.pkl') 

Also you can use built-in k-fold crossvalidation

score = mk.crossvalidation.cross_val_score(clf, X, y)

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /