Code Monkey home page Code Monkey logo

stringkernelsvm's Introduction

My implementation of string kernel from article H. Lodhi, C. Saunders, J. Shawe-Taylor, N. Cristianini, and C. Watkins. Text classification using string kernels. Journal of Machine Learning Research, 2, 2002 .

As far as I know, there is no implementation of this algorithm in scikit-learn.

Also you can look at http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/#libsvm_for_string_data for libsvm implementation of string kernel (with no warranty).

svm.SVC is a basic class from scikit-learn for SVM classification. It uses one-vs-one approach in multiclass case.

FILES: stringSVM.py - basic algorithm from the article

stringSVM_K2.py - algorithm with K''() from the article. Though authors say that algorithm with K''() is faster, in my realization, it comes out to be slower than basic algorithm. I suppose because of bad recursion support in Python.

CONCLUSION: Algorithms offered in the above mentioned article (pp. 424 - 426) are slow. Recursive realization leads to extensive memory usage (depth of recursion is achieved pretty soon). Caching helps not but so much as desired. There is a well-known problem with tail recursion in Python.

stringkernelsvm's People

Watchers

James Cloos avatar  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.