Giter VIP home page Giter VIP logo

rssl's Introduction

CRAN version Travis-CI Build Status codecov.io CRAN mirror downloads

R Semi-Supervised Learning package

This R package provides implementations of several semi-supervised learning methods, in particular, our own work involving constraint based semi-supervised learning.

The package is still under development. Therefore, function names and interfaces are subject to change.

Installation Instructions

This package is not yet available on CRAN. To install the latest version of the package using the devtools package:

library(devtools)
install_github("jkrijthe/RSSL")

Usage

After installation, load the package as usual:

library(RSSL)

The following code generates a simple dataset, trains a supervised and two semi-supervised classifiers and evaluates their performance:

# Generate dataset
df <- generate2ClassGaussian(d=2,expected=TRUE)
df_lab <- df[sample(nrow(df),10),]
df_unlab <- df[sample(nrow(df),1000),]
df_unlab$Class <- NA
df_combined <- rbind(df_lab, df_unlab)

# Train Classifiers
t_sup <- LeastSquaresClassifier(Class~., df_lab)
t_self <- SelfLearning(Class~., df_combined, method=LeastSquaresClassifier)
t_ic <- ICLeastSquaresClassifier(Class~., df_combined)

# Evaluate performance: Squared Loss & Error Rate
mean(loss(t_sup,df))
mean(loss(t_self,df))
mean(loss(t_ic,df))

mean(predict(t_sup,df)!=df$Class)
mean(predict(t_self,df)!=df$Class)
mean(predict(t_ic,df)!=df$Class)

For an overview of different classifiers and examples on how to use them, see the classifier overview vignette.

Acknowledgement

Work on this package was supported by Project 23 of the Dutch national program COMMIT.

rssl's People

Contributors

jkrijthe avatar

Watchers

Richard Oy 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.