Applied Artificial intelligence in data products and understanding thoughts

Applied AI #2 – Building intelligent data products

Applied AI meetup #4 – The mechanism of thought

Applied AI #4 – Using machine learning for games as a spring-board for solving real-world problems’

Advertisements

Key deep learning takeaways from NIPS2016 for applied data scientist

NIPS2016 in nutshell:

[1] Nuts and bolts of applying Deep Learning by Andrew Ng

[2]Generating Videos with Scene Dynamics:

screen-shot-2016-12-09-at-4-00-42-pm

This repository contains an implementation of Generating Videos with Scene Dynamics by Carl Vondrick, Hamed Pirsiavash, Antonio Torralba, to appear at NIPS 2016. The model learns to generate tiny videos using adversarial networks

 

[3] Magenta: Make Music and Art Using Machine Learning

screen-shot-2016-12-09-at-4-05-27-pm

Magenta is a Google Brain project to ask and answer the questions, “Can we use machine learning to create compelling art and music? If so, how? If not, why not?” Our work is done in TensorFlow, and we regularly release our models and tools in open source. These are accompanied by demos, tutorial blog postings and technical papers. To follow our progress, watch our GitHub and join our discussion group.

[4] Embedding visualization of high dimensional data:

Open sourcing the Embedding Projector: a tool for visualizing high dimensional data. This project is release by Google same time as NIPS 2016 but not part of NIPS

See Live Demo: http://projector.tensorflow.org/

screen-shot-2016-12-09-at-4-24-06-pm

Embeddings are ubiquitous in machine learning, appearing in recommender systems, NLP, and many other applications. Indeed, in the context of TensorFlow, it’s natural to view tensors (or slices of tensors) as points in space, so almost any TensorFlow system will naturally give rise to various embeddings.

[5] Microsoft Project Malmo

Although this project from Microsoft is already old however a demo was scheduled in NIPS which brought it back to highlight.

screen-shot-2016-12-09-at-4-52-14-pm

Project Malmo is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment.

[6] Hierarchical Object Detection with Deep Reinforcement Learning

It’s a method for performing hierarchical object detection in images guided by a deep reinforcement learning agent. The key idea is to focus on those parts of the image that contain richer information and zoom on them. We train an intelligent agent that, given an image window, is capable of deciding where to focus the attention among five different predefined region candidates (smaller windows). This procedure is iterated providing a hierarchical image analysis. We compare two different candidate proposal strategies to guide the object search: with and without overlap.

architecture

Let’s try H2o and DoParallel in to run GBM

What is H2O?

  • H2O is distributed machine learning platform for enterprises
  • It’ open source, support various supervise, un-supervise and clustering algorithms in distributed mode with interface from R, Python, Java, Scala & REST
  • Learn more here

What is DoParallel?

  • This R package let you run multiple R instances per CPU in parallel
  • It provides a parallel backend for the %dopar% function using the parallel package
  • Learn more here

Where is the code (.R):

# Loading h2o library
library(“h2o”)
#Loading doParallel Library
library(“doParallel”)
# Setting a cluster configuration of 8 CPU
cl <- makeCluster(8)
# Register parallel configuration for R environment
registerDoParallel(cl)
# Loading iris dataset as H2O data frame
iris.hex <- as.h2o(iris)
# Setting time
ptm <- proc.time()
# Looping each cluster environment to run R per cluster
R <- foreach(n = 3:10) %dopar% {
  #Note:  Reloading h2o library is must on each separate R instance. 
  # Loading h2o library on each R instance. 
  library(h2o)
 # Initializing H2O on each instance 
  h2o.init()
 # Calling GM model on h2o frame
  grid <- h2o.grid(“gbm”,  paste0(“gbm_grid_id”,n), x = c(1:4), y = 5,
                   training_frame = iris.hex,
                   hyper_params = list(ntrees = 1:n),
                   nfolds = 5)
  model <- h2o.getModel(grid@model_ids[[1]])
  # printing logloss from model
  as.numeric(grid@summary_table$logloss[1])
}
# listing h2o objects
h2o.ls
That’s all.