My upcoming conference talks & workshops: M-cubed, ML Summit & data2day

I’ll be giving talks and workshops at the following three upcoming conferences; hope to meet some of you there! Traditional machine learning workflows focus heavily on model training and optimization; the best model is usually chosen via performance measures like accuracy or error and we tend to assume that a model is good enough for deployment if it passes certain thresholds of these performance criteria. Why a model makes the predictions it makes, however, is generally neglected. But being able to understand and interpret such models can be immensely important for improving model quality, increasing trust and transparency and for reducing bias. Because complex machine learning models are essentially black boxes and too complicated to understand, we need to use approximations. Required audience experience: Basic knowledge of machine learning Objective of the talk: Listeners will get an overview of why…
Original Post: My upcoming conference talks & workshops: M-cubed, ML Summit & data2day

Addendum: Text-to-Speech with the googleLanguageR package

You first need to set up a Google Cloud Account and provide credit card information (the first year is free to use, though). If you haven’t used Google Cloud before, you will need to wait until you activated your account; in my case, I had to wait two days until they sent a small amount of money to my bank account which I then needed to enter in order to verify the information.Then, you create a project, activate the API(s) you want to use and create the authentication information as a JSON file. More information on how to do this is described here.Install and load the library and give the path to the saved authentication JSON file. Text-to-Speech with googleLanguageR Now, we can use the Google Cloud Text-to-Speech API from R. “Google Cloud Text-to-Speech enables developers to synthesize natural-sounding speech…
Original Post: Addendum: Text-to-Speech with the googleLanguageR package

Code for Workshop: Introduction to Machine Learning with R

Random Forest hyper_params <- list( ntrees = c(25, 50, 75, 100), max_depth = c(10, 20, 30), min_rows = c(1, 3, 5) ) search_criteria <- list( strategy = “RandomDiscrete”, max_models = 50, max_runtime_secs = 360, stopping_rounds = 5, stopping_metric = “AUC”, stopping_tolerance = 0.0005, seed = 42 ) rf_grid <- h2o.grid(algorithm = “randomForest”, # h2o.randomForest, # alternatively h2o.gbm # for Gradient boosting trees x = features, y = response, grid_id = “rf_grid”, training_frame = train, validation_frame = valid, nfolds = 25, fold_assignment = “Stratified”, hyper_params = hyper_params, search_criteria = search_criteria, seed = 42 ) # performance metrics where smaller is better -> order with decreasing = FALSE sort_options_1 <- c(“mean_per_class_error”, “mse”, “err”, “logloss”) for (sort_by_1 in sort_options_1) { grid <- h2o.getGrid(“rf_grid”, sort_by = sort_by_1, decreasing = FALSE) model_ids <- [email protected]_ids best_model <- h2o.getModel(model_ids[[1]]) h2o.saveModel(best_model, path=”models”, force = TRUE) } #…
Original Post: Code for Workshop: Introduction to Machine Learning with R

Text-to-speech with R

Computers started talking to us! They do this with so called Text-to-Speech (TTS) systems. With neural nets, deep learning and lots of training data, these systems have gotten a whole lot better in recent years. In some cases, they are so good that you can’t distinguish between human and machine voice. In one of our recent codecentric.AI videos, we compared different Text-to-Speech systems (the video is in German, though – but the text snippets and their voice recordings we show in the video are a mix of German and English). In this video, we had a small contest between Polly, Alexa, Siri And Co to find out who best speaks different tongue twisters. Here, I want to find out what’s possible with R and Text-to-Speech packages. How does TTS work? Challenges for good TTS systems are the complexity…
Original Post: Text-to-speech with R

Explaining Keras image classification models with lime

Last week I published a blog post about how easy it is to train image classification models with Keras. What I did not show in that post was how to use the model for making predictions. This, I will do here. But predictions alone are boring, so I’m adding explanations for the predictions using the lime package. I have already written a few blog posts (here, here and here) about LIME and have given talks (here and here) about it, too. Neither of them applies LIME to image classification models, though. And with the new(ish) release from March of Thomas Lin Pedersen’s lime package, lime is now not only on CRAN but it natively supports Keras and image classification models. Thomas wrote a very nice article about how to use keras and lime in R! Here, I am following this…
Original Post: Explaining Keras image classification models with lime

Sketchnotes from TWiML&AI: Practical Deep Learning with Rachel Thomas

These are my sketchnotes for Sam Charrington’s podcast This Week in Machine Learning and AI about Practical Deep Learning with Rachel Thomas: Sketchnotes from TWiMLAI talk: Practical Deep Learning with Rachel Thomas You can listen to the podcast here. In this episode, i’m joined by Rachel Thomas, founder and researcher at Fast AI. If you’re not familiar with Fast AI, the company offers a series of courses including Practical Deep Learning for Coders, Cutting Edge Deep Learning for Coders and Rachel’s Computational Linear Algebra course. The courses are designed to make deep learning more accessible to those without the extensive math backgrounds some other courses assume. Rachel and I cover a lot of ground in this conversation, starting with the philosophy and goals behind the Fast AI courses. We also cover Fast AI’s recent decision to switch to their courses…
Original Post: Sketchnotes from TWiML&AI: Practical Deep Learning with Rachel Thomas

It’s that easy! Image classification with keras in roughly 100 lines of code.

I’ve been using keras and TensorFlow for a while now – and love its simplicity and straight-forward way to modeling. As part of the latest update to my Workshop about deep learning with R and keras I’ve added a new example analysis:And I was (again) suprised how fast and easy it was to build the model; it took not even half an hour and only around 100 lines of code (counting only the main code; for this post I added comments and line breaks to make it easier to read)!That’s why I wanted to share it here and spread the keras love. <3 The code If you haven’t installed keras before, follow the instructions of RStudio’s keras site library(keras) The dataset is the fruit images dataset from Kaggle. I downloaded it to my computer and unpacked it. Because I don’t…
Original Post: It’s that easy! Image classification with keras in roughly 100 lines of code.

rOpenSci unconference 2018 + introduction to TensorFlow Probability & the ‘greta’ package

On May 21st and 22nd, I had the honor of having been chosen to attend the rOpenSci unconference 2018 in Seattle. It was a great event and I got to meet many amazing people! rOpenSci rOpenSci is a non-profit organisation that maintains a number of widely used R packages and is very active in promoting a community spirit around the R-world. Their core values are to have open and reproducible research, shared data and easy-to-use tools and to make all this accessible to a large number of people. rOpenSci unconference Part of creating a welcoming community infrastructure is their yearly unconference. At the unconference, about 60 invited R users from around the world get together to work on small projects that are relevant to the R community at the time. Project ideas are collected and discussed in Github issues during…
Original Post: rOpenSci unconference 2018 + introduction to TensorFlow Probability & the ‘greta’ package

July 5th & 6th in Münster: Workshop on Deep Learning with Keras and TensorFlow in R

Registration is now open for my 1.5-day workshop on deep learning with Keras and TensorFlow using R. It will take place on July 5th & 6th in Münster, Germany. You can read about one participant’s experience in my last workshop: Big Data – a buzz word you can find everywhere these days, from nerdy blogs to scientific research papers and even in the news. But how does Big Data Analysis work, exactly? In order to find that out, I attended the workshop on “Deep Learning with Keras and TensorFlow”. On a stormy Thursday afternoon, we arrived at the modern and light-flooded codecentric AG headquarters. There, we met performance expert Dieter Dirkes and Data Scientist Dr. Shirin Glander. In the following two days, Shirin gave us a hands-on introduction into the secrets of Deep Learning and helped us to program our first…
Original Post: July 5th & 6th in Münster: Workshop on Deep Learning with Keras and TensorFlow in R

Sketchnotes from TWiML&AI: Adversarial Attacks Against Reinforcement Learning Agents with Ian Goodfellow & Sandy Huang

These are my sketchnotes for Sam Charrington’s podcast This Week in Machine Learning and AI about Adversarial Attacks Against Reinforcement Learning Agents with Ian Goodfellow & Sandy Huang: Sketchnotes from TWiMLAI talk: Adversarial Attacks Against Reinforcement Learning Agents with Ian Goodfellow & Sandy Huang You can listen to the podcast here. In this episode, I’m joined by Ian Goodfellow, Staff Research Scientist at Google Brain and Sandy Huang, Phd Student in the EECS department at UC Berkeley, to discuss their work on the paper Adversarial Attacks on Neural Network Policies. If you’re a regular listener here you’ve probably heard of adversarial attacks, and have seen examples of deep learning based object detectors that can be fooled into thinking that, for example, a giraffe is actually a school bus, by injecting some imperceptible noise into the image. Well, Sandy and Ian’s…
Original Post: Sketchnotes from TWiML&AI: Adversarial Attacks Against Reinforcement Learning Agents with Ian Goodfellow & Sandy Huang