Giter Club home page Giter Club logo

deepr's Introduction

deepr

An R package to streamline the training, fine-tuning and predicting processes for deep learning. It aims to further simplify the functions in packages such as 'h2o' and 'deepnet'.

Installation

library(devtools)
install_github("woobe/deepr")

Example 1

Extracting hidden features from original predictors (x) and creating new predictors (x_new).

1.1 Load Library

library(deepr)

1.2 Generate random numbers as original predictors (x)

x <- matrix(rnorm(1000000), nrow = 5000)
dim(x)
[1] 5000  200

1.3 Train a RBM model with 100 hidden features

model_rbm <- train_rbm(x, n_features = 100)
=====================================================================
[deepr]: Training a Restricted Boltzmann Machine
=====================================================================
[deepr]: Removing variables with near zero variance ...
[deepr]: Normalising x to values between 0 and 1 ...
[deepr]: Training a RBM Layer of 10 Hidden Features ...
[deepr]: Returning the RBM Model ...
[deepr]: All Done! Total Duration: 474 sec.
=====================================================================

1.4 Transform original x into new x

x_new <- transform_x(model_rbm, x)
=====================================================================
[deepr]: Transforming Predictors Using a Trained RBM
=====================================================================
[deepr]: Pre-processing predictors (x) based on the RBM object ...
[deepr]: Converting original predictors (x) into new ones (x_new) ...
[deepr]: Returning new predictors (x_new) ...
[deepr]: All Done! Total Duration: 1 sec.
=====================================================================
dim(x_new)
[1] 5000   100

1.5 Install or upgrade H2O's R package quickly

## Automatically install the latest version
install_h2o()
## Install a specific version
install_h2o(h2o_ver = "1500")
## Overwrite the current R package 
install_h2o(force = TRUE)

deepr's People

Contributors

woobe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.