Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.
/ RegERMs.jl Public archive

DEPRECATED: Regularised Empirical Risk Minimisation Framework (SVMs, LogReg, Linear Regression) in Julia

License

Notifications You must be signed in to change notification settings

JuliaStats/RegERMs.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RegERMs Logo

RegERMs.jl

Build Status Coverage Status RegERMs RegERMs

This package implements several machine learning algorithms in a regularised empirical risk minimisation framework (SVMs, LogReg, Linear Regression) in Julia.

Quick start

Some examples:

using RegERMs

# define some toy data (XOR - example)
np = 100
nn = 100
X = [randn(int(np/2),1)+1 randn(int(np/2),1)+1; randn(int(np/2-0.5),1)-1 randn(int(np/2-0.5),1)-1;
     randn(int(nn/2),1)+1 randn(int(nn/2),1)-1; randn(int(nn/2-0.5),1)-1 randn(int(nn/2-0.5),1)+1] # examples with 2 features
y = int(vec([ones(np,1); -ones(nn,1)]))       # binary class values

# use rbf kernel by using mercer map
map = MercerMap(X, :rbf)
X = RegERMs.apply(map)

# choose (linear) SVM as learning algorithm with regularization parameter 0.1
svm = SVM(X, y; λ=0.1)

# get a solution 
model = optimize(svm)

# make predictions and compute accuracy
ybar = predict(model, X)
acc = mean(ybar .== y)

Documentation

Full documentation available at Read the Docs.

About

DEPRECATED: Regularised Empirical Risk Minimisation Framework (SVMs, LogReg, Linear Regression) in Julia

Resources

License

Stars

Watchers

Forks

Packages

No packages published