Coder Social home page Coder Social logo

pykernels's Introduction

pyKernels

  • authors: Wojciech Marian Czarnecki and Katarzyna Janocha
  • version: 0.0.4
  • dependencies: numpy, scipy, scikit-learn

General description

Python library for working with kernel methods in machine learning. Provided code is easy to use set of implementations of various kernel functions ranging from typical linear, polynomial or rbf ones through wawelet, fourier transformations, kernels for binary sequences and even kernels for labeled graphs.

Sample usage

from sklearn.svm import SVC
from sklearn.metrics import accuracy_score
import numpy as np

from pykernels.basic import RBF

X = np.array([[1,1], [0,0], [1,0], [0,1]])
y = np.array([1, 1, 0, 0])

print 'Testing XOR'

for clf, name in [(SVC(kernel=RBF(), C=1000), 'pykernel'), (SVC(kernel='rbf', C=1000), 'sklearn')]:
    clf.fit(X, y)
    print name
    print clf
    print 'Predictions:', clf.predict(X)
    print 'Accuracy:', accuracy_score(clf.predict(X), y)
    print

implemented Kernels

  • Vector kernels for R^d

    • Linear
    • Polynomial
    • RBF
    • Cosine similarity
    • Exponential
    • Laplacian
    • Rational quadratic
    • Inverse multiquadratic
    • Cauchy
    • T-Student
    • ANOVA
    • Additive Chi^2
    • Chi^2
    • MinMax
    • Min/Histogram intersection
    • Generalized histogram intersection
    • Spline
    • Sorensen
    • Tanimoto
    • Wavelet
    • Fourier
    • Log (CPD)
    • Power (CPD)
  • Graph kernels

    • Labeled

      • Shortest paths
    • Unlabeled

      • Shortest paths
      • 3,4-Graphlets
      • Random walk

pykernels's People

Contributors

lejlot avatar kasiajanocha avatar nils-werner avatar elcaceres avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.