• Stars
    star
    1
  • Language
    Julia
  • License
    Other
  • Created over 10 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kernel SVM written in Julia

KSVM

Overview

This package implements Kernel SVM in julia. The quadratic optimisation problem is solved with Ipopt and the following kernel functions are availables:

  • Linear
  • Polynomial
  • Laplacian RBF
  • RBF

Installation

Pkg.clone("https://github.com/remusao/KSVM.jl.git")
Pkg.update()

Usage

using Vega
using KSVM

# Declare data
x = [[0 0 0 0 0 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 6 6 6 6 6],
     [1 2 3 4 5 0 6 0 2 3 4 6 0 2 3 4 6 0 2 3 4 6 0 6 1 2 3 4 5]]

# Labels (-1 or +1)
y = [-1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1]

# Random data to test with unknown labels
data = rand(2, 1000) * 7

plot(x = reshape(x[1, :], size(x, 2)), y = reshape(x[2, :], size(x, 2)), group = y, kind = :scatter)

original

# Try with linear kernel
# This is the classic SVM algorithm
svm = train(x, y)
print_2Ddecision(svm, data)

linear

# Try with a RBF kernel and different sigmas
# ex: 0.6 or 1.0
svm = train(x, y, rbf, sigma)
print_2Ddecision(svm, data)

rbf rbf

More Repositories

1

tldts

JavaScript Library to work against complex domain names, subdomains and URIs.
TypeScript
270
star
2

Hodor

One Brainfuck interpreter to rule them all!
Brainfuck
36
star
3

Bison-Flex-CPP-template

A C++ template for Bison / Flex projects
C++
31
star
4

bandwidth-monitor

Simple project to continuously measure the bandwidth of your home Internet connection
Python
19
star
5

blockrz

Super minimal blocker of ads, trackers and annoyances.
TypeScript
16
star
6

wgraph

Etymological graphs based on Wiktionary dumps
Python
14
star
7

mono

A monorepo of TypeScript libraries I maintain
TypeScript
13
star
8

https-everywhere-core

A more efficient matching engine for HTTPS Everywhere written in pure JavaScript
TypeScript
11
star
9

privacy_bot

Privacy bot crawls privacy policies of popular domains, persist them and analyze them.
Python
6
star
10

remusao.github.io

My personal blog
CSS
5
star
11

LDA.jl

*Deprecated* - Linear Discriminant Analysis and Kernel Fisher Analysis
Julia
5
star
12

simple-sanic

A faster http.server using sanic
Python
3
star
13

Wikipedia.jl

*Deprecated* - A julia wrapper over Wikipedia API
Julia
3
star
14

tsmaz

tsmaz has moved to https://github.com/remusao/mono/tree/master/packages/smaz
3
star
15

firefox-67-idb-bug-repro

Minimal extension to reproduce an IndexedDB bug happening in Firefox 67
JavaScript
3
star
16

node-app-packaging-template

Minimal template to package Node.js projects: minified bundle, self-contained executable, docker
JavaScript
2
star
17

twitter-adblocker

Simple extension to block ads on Twitter
JavaScript
2
star
18

Sumup.jl

Automatic multi-documents, multi-topics summarization based on topic extraction
Julia
2
star
19

Brainfuck.jl

Simple brainfuck interpreter written in Julia
Julia
1
star
20

NGram.jl

Implement the NGram model in julia
Julia
1
star
21

site-pinning

Web-extension allowing to pin sub-resources to get reproducible page loading
JavaScript
1
star
22

Prpa

A multi-threaded video stream processing.
C++
1
star
23

broxy

Your Privacy Bro!
JavaScript
1
star
24

PythonMatching

A Python module that allows OCaml-like pattern-matching.
Python
1
star
25

metaheuristic

Metaheuristic toolbox
C++
1
star
26

thunderbird-msg-filters

thunderbird-msg-filters has moved to https://github.com/remusao/mono/tree/master/packages/thunderbird-msg-filters
1
star
27

PyCheck

A general purpose TestSuit written in Python for projects of any size.
Python
1
star
28

Data_Structs

A set of generic data structures to use in a C project
C++
1
star
29

katas

Katas'trophe
Python
1
star
30

CPP_Coding_Style_Checker

A program that check a C++ file (source or header) and output each coding bad style on output.
C++
1
star
31

haskell-goggle

Brave Search Goggle to rerank results and boost content related to the Haskell programming language.
1
star