MyNixOS website logo
Description

Build Machine Learning Models Like Using Python's Scikit-Learn Library in R.

The idea is to provide a standard interface to users who use both R and Python for building machine learning models. This package provides a scikit-learn's fit, predict interface to train machine learning models in R.

CRAN status Downloads R-CMD-check

SuperML

The goal of SuperML is to provide sckit-learn's fit,predict,transform standard way of building machine learning models in R. It is build on top of latest r-packages which provides optimized way of training machine learning models.

Installation

You can install latest stable cran version using (recommended):

install.packages("superml")
install.packages("superml", dependencies=TRUE) # to install all dependencies at once

You can install superml from github with:

# install.packages("devtools")
devtools::install_github("saraswatmks/superml")

Description

In superml, every machine learning algorithm is called as a trainer. Following is the list of trainers available as of today:

  • LMTrainer: used to train linear, logistic, ridge, lasso models
  • KNNTrainer: K-Nearest Neighbour Models
  • KMeansTrainer: KMeans Model
  • NBTrainer: Naive Baiyes Model
  • SVMTrainer: SVM Model
  • RFTrainer: Random Forest Model
  • XGBTrainer: XGBoost Model

In addition, there are other useful functions to support modeling tasks such as:

  • CountVectorizer: Create Bag of Words model
  • TfidfVectorizer: Create TF-IDF feature model
  • LabelEncoder: Convert categorical features to numeric
  • GridSearchCV: For hyperparameter optimization
  • RandomSearchCV: For hyperparameter optimization
  • kFoldMean: Target encoding
  • smoothMean: Target encoding

To compute text similarity, following functions are available:

  • bm_25: Computes bm25 distance
  • dot: Computes dot product between two vectors
  • dotmat: Computes dot product between vector & matrix

Usage

Any machine learning model can be trained using the following steps:

data(iris)
library(superml)

# random forest
rf <- RFTrainer$new(n_estimators = 100)
rf$fit(iris, "Species")
pred <- rf$predict(iris)

Documentation

The documentation can be found here: SuperML Documentation

Contributions & Support

SuperML is my ambitious effort to help people train machine learning models in R as easily as they do in python. I encourage you to use this library, post bugs and feature suggestions in the issues above.

Metadata

Version

0.5.7

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows