Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Semi-Supervised Learning package for the R programming language

NotificationsYou must be signed in to change notification settings

jkrijthe/RSSL

Repository files navigation

CRAN statusR-CMD-checkCRAN mirror downloadsCodecov test coverage

R Semi-Supervised Learning package

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

To cite the package, use either of these two references:

  • Krijthe, J. H. (2016). RSSL: R package for Semi-supervised Learning.In B. Kerautret, M. Colom, & P. Monasse (Eds.), Reproducible Researchin Pattern Recognition. RRPR 2016. Lecture Notes in Computer Science,vol 10214. (pp. 104–115). Springer International Publishing.https://doi.org/10.1007/978-3-319-56414-2_8. arxiv:https://arxiv.org/abs/1612.07993
  • Krijthe, J.H. & Loog, M. (2015). Implicitly ConstrainedSemi-Supervised Least Squares Classification. In E. Fromont, T. deBie, & M. van Leeuwen, eds. 14th International Symposium on Advancesin Intelligent Data Analysis XIV (Lecture Notes in Computer ScienceVolume 9385). Saint Etienne. France, pp. 158-169.

Installation Instructions

This package available on CRAN. The easiest way to install the packageis to use:

install.packages("RSSL")

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 andtwo semi-supervised classifiers and evaluates their performance:

library(dplyr,warn.conflicts=FALSE)library(ggplot2,warn.conflicts=FALSE)set.seed(2)df<- generate2ClassGaussian(200,d=2,var=0.2,expected=TRUE)# Randomly remove labelsdf<-df %>% add_missinglabels_mar(Class~.,prob=0.98)# Train classifierg_nm<- NearestMeanClassifier(Class~.,df,prior=matrix(0.5,2))g_self<- SelfLearning(Class~.,df,method=NearestMeanClassifier,prior=matrix(0.5,2))# Plot datasetdf %>%   ggplot(aes(x=X1,y=X2,color=Class,size=Class))+  geom_point()+  coord_equal()+  scale_size_manual(values=c("-1"=3,"1"=3),na.value=1)+  geom_linearclassifier("Supervised"=g_nm,"Semi-supervised"=g_self)

# Evaluate performance: Squared Loss & Error Ratemean(loss(g_nm,df))mean(loss(g_self,df))mean(predict(g_nm,df)!=df$Class)mean(predict(g_self,df)!=df$Class)

Acknowledgement

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

About

A Semi-Supervised Learning package for the R programming language

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp