What I Learned from the O'Reilly AI Conference Keynotes

Earlier this week, I attended the O'Reilly AI Conference up in San Jose, CA.  Wednesday and Thursday started off with keynotes showcasing what companies were currently researching in the field of AI.  While I'm no expert in the field, I found four key takeaways from the keynotes.

Read more


Rundown on Machine Learning Services in AWS

With machine learning and AI being very popular and hyped, it's not surprising that cloud providers such as Azure, Google Cloud, and AWS offer services for doing machine learning.  These services often don't require the user to delve into mathematically complex topics such as convolutional neural networks and back propagation.

Currently, I'm doing training on AWS for the Associate Developer Certification as part of company training.  While the likelihood of hitting machine learning services on the exam is low, I find it to be a good idea to cover an overview in general.  I won't go over every services, but hopefully you would be able to distinguish the major ones.

Amazon SageMaker

Building and training machine learning projects as a toy project is reasonable.  Sure, it might take a few minutes depending on the amount of data or the complexity of your model, but it isn't much to pull your hair about.  Once you try to apply machine learning to real products that will be used by millions, now you have a problem.  Using your computer specs probably won't be sufficient to train on hundreds of thousands to millions of data points.  Buying more computing power will help, but it won't be cheap.  How do you cope?

This is where Amazon SageMaker comes in.  SageMaker allows users to create Jupyter Notebooks as well as import their existing models.  SageMaker also handles workflow such as labeling, training, and deploying.  The service supports frameworks, including but not limited to, Tensorflow, Caffe, and Keras.

Visual Services

While SageMaker is nice for customized models, maybe you don't want the hassle of creating your own models.  Maybe, you want something that you can just plug-in and use immediately.  Fortunately, AWS provides numerous services that can be used for common functionality.

Rekognition

If you wanted to work with computer vision, you used OpenCV.  OpenCV allows users to manipulate images and act on it accordingly.  However, working with images isn't easy.  There are lighting effects, spatial, mirroring, etc. that can make recognition difficult.  Enter Rekognition.

Rekognition allows users to use recognize faces, text, and labels.  It can also be used to recognize entities within videos.  All you have to do is upload your images and videos and Rekognition will handle the rest.

DeepLens

Maybe your data doesn't involve text, but instead video.  Additionally, you might not have a camera dedicated for computer vision.  This is where AWS DeepLens come in.

DeepLens isn't really a service but more of a physical product.  In this case, AWS provides camera for developers to build and test their deep learning models against.  The camera is also compatible with Amazon SageMaker.  The camera currently costs $250.

DeepRacer

With the recent developments of reinforcement learning, many people are getting onto the AI train.  However, the underlying understanding of reinforcement learning is difficult.  That's why Amazon created AWS DeepRacer.

DeepRacer is a fully autonomous race car for learning visual machine learning and reinforcement learning.  The device will cost $400 and will be release on April 15, 2019.

Natural Language Processing Services

Like images and video, AWS also provide services that focus more on text and speech.

Comprehend

Suppose you are dealing with natural language and you need to understand relationships within the data.

Luckily for you, Amazon Comprehend was designed for this case.  In fact, you don't even need to know machine learning to use it.  Just provide your data and Comprehend will label it accordingly.  Alternatively, you can choose to topic model your data to provide a better visual on your data.

The first 50k words are free per month with an additional word $0.0001.  Running a job is free for the first five and additional ones are $1.

Amazon Lex

One of Amazon's most popular products is Alexa.  What if you, the developer, could also leverage the same technology as Alexa?  Luckily for you, this is where Amazon Lex comes in.

Amazon Lex provides you the ability to build conversational interfaces using voice or text.  Lex is integrated seamlessly with AWS and allows users to add sophisticated chatbots to your applications.

Amazon Polly

I remembered in the mid-2000 of Apple's VoiceOver feature.  VoiceOver allowed people to highlight a piece of text and have the computer speak the words.  At the time, pronunciation wasn't the greatest, but it was pretty cool.  About a decade later, we dramatically improved speech to the point that we can't even readily distinguish whether a voce is human or AI.

With Amazon Polly, developers now have the ability to implement text-to-speech into their applications.  The services provides 24 languages with more voices for the future.  According to Amazon, they won't be retiring any voices within Polly.

Other Services

There are additional services, such as Transcribe and Translate, that enable for speech recognition and language translation.  Amazon is also adding additional services, such Personalize, Forecast, and Textract, but at time of writing, they are limited in availability.

In recent years, machine learning and AI have gone mainstream.  However, most companies don't have access to resources for creating their own solutions.  That's why the major tech companies, such as Google, Facebook, Microsoft, and Amazon are providing ML solutions for businesses.  In the future, I won't be surprised to see more powerful services being offered from Amazon and others.


An Introduction to Chatbots

With the rise of Siri, Google Home, Alexa, and Cortana, it's obvious that there's a demand for chatbots.  In the past, chatbots were more of a niche technology due to limited functionality.  With recent advancements in computer technology, chatbots have now become practical for everyday use.

What is a Chatbot?

First, let’s define the term “chatbot.”  What exactly is a chatbot?

Think of it like a customer support representative.  You contact support, they ask about the problem, you describe them the problem you’re having, they ask further questions to pinpoint the problem, and eventually you get a solution.

Now, replace the person with a computer program, the program being an on-demand Q&A application.  That is a chatbot.

Types of Chatbot

Designing chatbots can be quite complex since you’re dealing with intensive computing power, immense datasets, and ambiguity of natural language.  However, we can derive two main types of chatbots. 

Rule-based Chatbot

In rule-based, a chatbot answer questions based on a series of rules.  These rules are predefined by the developer and depending on the user’s actions, would trigger other rules. 

Rule-based makes developing chatbots simpler as you only need to work in a very limited context.  However, this simplicity also prevent chatbots from getting smarter.

Take the image below as an example.

In the image, our chatbot is geared towards helping users shop on an e-commerce website.  When the user go to the chatbot, the bot will first greet the user.  Usually this is a simple "hello."

While the options aren't limited to the ones shown above, the user can ask to place items into their shopping cart, determine whether an item is in stock, and understanding the refund policy.

Once the user types in a command, the chatbot will perform various actions depending on the task.  The heavy lifting is done in the background and will notify the user once the action has completed.  The user can either follow up with additional commands or just end the conversation.

However, the chatbot cannot handle tasks outside its domain like tracking items for delivery or buying tickets for the movie theater near you.

AI-based

With AI chatbots, you utilize a machine learning model to train your chatbot to handle user input.  Oftentimes, chatbots utilize Deep Learning to derive a model.  Additionally, you can tack on voice to text recognition to provide ease of communication to the user.

Unlike rule-based, you only supply training data to the model and the model will be tailored to the dataset.  This flexibility allows the chatbot to handle complex sentences.  However, since using Deep Learning is complex, it's harder to fine-tune the model.  Additionally, utilizing it can be overkill for chatbots that work in simple environments.

Why the resurgence?

Simply put, we have three things that are going for us today:

  1. Computing power - While there were extensive theory on AI methods in the mid-20th century, the amount of computing power wasn't sufficient.  Due to Moore's Law, we have been able to quickly and dramatically speed up processing power.
  2. Huge datasets - In the past, there wasn't a lot of data to be had for training and utilizing AI models.  With the rise of the internet and complex system architectures need to handle petabytes of data, we know have access to an abundant amount of data.
  3. Resurgence of AI - In early days for AI research, people were overhyping the practicality of AI.  As a result, an AI winter occurred in the 1980s and 1990s.  During this time, there wasn't much research going on due to reduced funding.  However, with the addition of the former two points, AI became more practical for everyday products and solutions.  Whether we will hit another AI winter is up for debate, but there's definitely much research going at the moment.

Conclusion

While we haven't seen general AI, we have definitely seen more powerful chatbots taking hold in our daily lives.  In fact, you can find many blog posts on how to build your own chatbot.  It wouldn't be surprising if chatbots became very human-like in a few years.  Now, whether or not you'll talk to chatbots more than humans is a discussion for another day.


When Your Model Is Inaccurate

Let's imagine you're doing research on an ideal rental property.  You gather your data, open up your favorite programming environment and you get to work on perform Exploratory Data Analysis (EDA).  During your EDA, you find some dirty data and clean it to train on.  You decide on a model, separate the data into training, validation, and testing, and train your model on the cleaned data.  Upon evaluating your model using some validation and test data, you notice that your validation error is very high as well as your test error.

Now suppose you pick a different model or add additional features.  Now your validation error is much lower.  Great!  However, upon using your testing data, you notice that the error is still high.  What just happened?

Read more


What are Neural Networks?

I admit, I'm late to the whole Neural Network party.  With all of the major news covering AI that use neural network as part of their implementation, you'd have to be living under a rock to not know about them.  While it's true that they can provide more flexible models compared to the other machine learning algorithms, they can be challenging to work with.

Read more


Coursera now offers Deep Learning

For those interested in machine learning, Dr. Andrew Ng recently launched his new Coursera specialization course called Deep Learning.  Be prepared to have some Python experience.

Read more