autokeras

Package: R Interface to AutoKeras

https://github.com/r-tensorflow/autokeras

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary

Keywords

autodl automatic-machine-learning automl deep-learning keras machine-learning r tensorflow
Last synced: 6 months ago · JSON representation

Repository

Package: R Interface to AutoKeras

Basic Info
Statistics
  • Stars: 73
  • Watchers: 7
  • Forks: 14
  • Open Issues: 5
  • Releases: 0
Topics
autodl automatic-machine-learning automl deep-learning keras machine-learning r tensorflow
Created almost 7 years ago · Last pushed about 5 years ago
Metadata Files
Readme License

README.Rmd

---
title: "R Interface to AutoKeras"
output: github_document
---

[![Travis Build Status](https://travis-ci.org/r-tensorflow/autokeras.svg?branch=master)](https://travis-ci.org/r-tensorflow/autokeras) 
[![Coverage status](https://img.shields.io/codecov/c/github/jcrodriguez1989/autokeras/master.svg)](https://codecov.io/github/jcrodriguez1989/autokeras?branch=master)
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)


[AutoKeras](https://autokeras.com/) is an open source software library for 
automated machine learning (AutoML). It is developed by
[DATA Lab](https://people.engr.tamu.edu/xiahu/index.html) at Texas A&M
University and community contributors. The ultimate goal of AutoML is to
provide easily accessible deep learning tools to domain experts with limited
data science or machine learning background. AutoKeras provides functions
to automatically search for architecture and hyperparameters of deep
learning models.

Check out the [AutoKeras blogpost at the **RStudio TensorFlow for R blog**](https://blogs.rstudio.com/tensorflow/posts/2019-04-16-autokeras/).

## Dependencies

* [AutoKeras](https://autokeras.com/) requires Python >= 3.5 .

## Installation

Install the current released version of `{autokeras}` from [CRAN](https://cran.r-project.org/package=autokeras):

```{r eval = FALSE}
install.packages("autokeras")
```

Or install the development version from GitHub:

```{r eval = FALSE}
if (!require("remotes")) {
  install.packages("remotes")
}
remotes::install_github("r-tensorflow/autokeras")
```

Then, use the `install_autokeras()` function to install TensorFlow:

```{r eval = FALSE}
library("autokeras")
install_autokeras()
```

## Docker

`autokeras` R package has a configured Docker image.

Steps to run it:

From a bash console:

```{bash eval = FALSE}
docker pull jcrodriguez1989/r-autokeras:1.0.0
docker run -it jcrodriguez1989/r-autokeras:1.0.0 /bin/bash
```

To run the docker image, and share the current folder (in home machine) to the `/data` path (in the docker machine), then do:

```{bash eval = FALSE}
docker run -it -v ${PWD}:/data jcrodriguez1989/r-autokeras:1.0.0 /bin/bash
ls /data # once when the docker image is running
```

## Examples

### CIFAR-10 dataset

```{r eval = FALSE}
library("keras")

# Get CIFAR-10 dataset, but not preprocessing needed
cifar10 <- dataset_cifar10()
c(x_train, y_train) %<-% cifar10$train
c(x_test, y_test) %<-% cifar10$test
```

```{r eval = FALSE}
library("autokeras")

# Create an image classifier, and train 10 different models
clf <- model_image_classifier(max_trials = 10) %>%
  fit(x_train, y_train)
```

```{r eval = FALSE}
# And use it to evaluate, predict
clf %>% evaluate(x_test, y_test)
```

```{r eval = FALSE}
clf %>% predict(x_test[1:10, , , ])
```

```{r eval = FALSE}
# Get the best trained Keras model, to work with the keras R library
(keras_model <- export_model(clf))
```

### IMDb dataset

```{r eval = FALSE}
library("keras")

# Get IMDb dataset
imdb <- dataset_imdb(num_words = 1000)
c(x_train, y_train) %<-% imdb$train
c(x_test, y_test) %<-% imdb$test

# AutoKeras procceses each text data point as a character vector,
# i.e., x_train[[1]] " this film was just brilliant casting..",
# so we need to transform the dataset.
word_index <- dataset_imdb_word_index()
word_index <- c(
  "", "", "", "",
  names(word_index)[order(unlist(word_index))]
)
x_train <- lapply(x_train, function(x) {
  paste(word_index[x + 1], collapse = " ")
})
x_test <- lapply(x_test, function(x) {
  paste(word_index[x + 1], collapse = " ")
})

x_train <- matrix(unlist(x_train), ncol = 1)
x_test <- matrix(unlist(x_test), ncol = 1)
y_train <- array(unlist(y_train))
y_test <- array(unlist(y_test))
```

```{r eval = FALSE}
library("autokeras")

# Create a text classifier, and train 10 different models
clf <- model_text_classifier(max_trials = 10) %>%
  fit(x_train, y_train)
```

```{r eval = FALSE}
# And use it to evaluate, predict
clf %>% evaluate(x_test, y_test)
```

```{r eval = FALSE}
clf %>% predict(x_test[1:10])
```

```{r eval = FALSE}
# Get the best trained Keras model, to work with the keras R library
export_model(clf)
```

Owner

  • Name: TensorFlow for R
  • Login: r-tensorflow
  • Kind: organization

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 137
  • Total Committers: 4
  • Avg Commits per committer: 34.25
  • Development Distribution Score (DDS): 0.445
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Juan Cruz Rodriguez j****z@b****r 76
jcrodriguez1989 j****z@u****r 58
Dhruv 4****9 2
Adrian Serapio a****0@x****h 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 10
  • Total pull requests: 12
  • Average time to close issues: 5 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 10
  • Total pull request authors: 5
  • Average comments per issue: 3.1
  • Average comments per pull request: 0.33
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Bmoser-boop (1)
  • d-bohn (1)
  • mrchypark (1)
  • reActionHank (1)
  • ashkanmy (1)
  • kmuthusi (1)
  • abbottken (1)
  • ShixiangWang (1)
  • jbwoillard (1)
  • harryprince (1)
Pull Request Authors
  • jcrodriguez1989 (7)
  • adtserapio (2)
  • dA505819 (1)
  • vansh0901 (1)
  • Rishi0812 (1)
Top Labels
Issue Labels
hacktoberfest (1) bug (1) question (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 323 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: autokeras

R Interface to 'AutoKeras'

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 323 Last month
Rankings
Stargazers count: 5.1%
Forks count: 5.3%
Average: 24.6%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 47.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.1 depends
  • keras * imports
  • methods * imports
  • reticulate * imports
  • stats * imports
  • covr * suggests
  • testthat * suggests