Auto-Keras, or How You can Create a Deep Learning Model in 4 Lines of Code | by Favio Vázquez | Towards Data Science

Before starting, a great quote by Matthew Mayo about what AutoML is not:
AutoML is not automated data science. While there is undoubtedly overlap, machine learning is but one of many tools in the data science toolkit, and its use does not actually factor in to all data science tasks. For example, if prediction will be part of a given data science task, machine learning will be a useful component; however, machine learning may not play in to a descriptive analytics task at all.
Ok so, what is automated machine learning then? In simple words is a way of automating the tasks of (https://www.automl.org/automl/):
Preprocess and clean the data.
Select and construct appropriate features.
Select an appropriate model family.
Optimize model hyperparameters.
Postprocess machine learning models.
Critically analyze the results obtained.
Now that we are clear on what is AutoML now, what is Keras?
Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research.
This was created by François Chollet and was the first serious step for making Deep Learning easy for the masses.
TensorFlow has a Python API which is not that hard, but Keras made really easy to get into Deep Learning for lots of people. It should be noted that Keras is now officially a part of Tensorflow:
www.tensorflow.org
Great. Now we know what is Keras and AutoML, let’s combine them. Auto-Keras is an open source software library for automated machine learning. Auto-Keras provides functions to automatically search for architecture and hyperparameters of deep learning models.
Installation
pip install autokeras
Usage
For the usage I’m going to use an example they have on their web. But first let’s compare how we can do the same with different tools. I’ll use the famous and sometimes hated MNIST dataset.
MNIST is a simple computer vision dataset. It consists of images of handwritten digits like these:
It also includes labels for each image, telling us which digit it is.
Resources:
github.com
www.tensorflow.org
Not so easy, but very well explained in the example. TensorFlow is not meant to be the easiest tool for deep learning, but a fast an reliable one. With eager execution the code is much more readable.
Resources:
github.com
Resources:
github.com
You can see that until now the Keras is the simpler package for running this example. It’s a great package with awesome features to got from zero to a model in just minutes.
But now, the cherry on the cake.
Yep, that is all. Pretty simple right? You just need an ImageClassifier, then fit the data and evaluate it. You have a final_fit there too, and it’s running a final training after found the best architecture.
For now you have the ImageClassifier, the BayesianSearcher, a Graph module, a PreProcessor, a LayerTransformer, a NetTransformer, a ClassifierGenerator and some utilities. This is an evolving package, please take a look at the creators disclaimer:
Please note that this is a pre-release version of the Auto-Keras which is still undergoing final testing before its official release. The website, its software and all content found on it are provided on an “as is” and “as available” basis. Auto-Keras does notgive any warranties, whether express or implied, as to the suitability or usability of the website, its software or any of its content. Auto-Keras will not be liable for any loss, whether such loss is direct, indirect, special or consequential, suffered by any party as a result of their use of the libraries or content. Any usage of the libraries is done at the user’s own risk and the user will be solely responsible for any damage to any computer system or loss of data that results from such activities. Should you encounter any bugs, glitches, lack of functionality or other problems on the website, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.
Either way is an amazing package that is very useful and it will be in the future. For more on AutoML and packages see this:
www.automl.org
www.kdnuggets.com
www.kdnuggets.com
Oh! If you want an even simple way for doing AutoML and Deep Learning without coding at all check out Deep Cognition and my posts on it: