Picture1

TensorFlow and Neural Networks: a Primer

Posted by Shantanu Raghav | Apr 10, 2018 11:30:00 AM

Prinicpal Data Science Consultant Shantanu Raghav, along with Director of Data Science Gabriel Mohanna and Data Science Consultant Adam Zebrowski, break down neural networks, TensorFlow and common use cases.


What is TensorFlow?

TensorFlow is an open source machine learning framework developed by Google and released in 2015. It has grown in popularity since its release, primarily for its ability to automatically incorporate any CPUs and GPUs that are available, meaning users can build models without worrying about managing hardware. Additionally, TensorFlow is widely considered to be an improvement of Theano, an older deep learning framework, since some Theano creators helped build TensorFlow while keeping the shortcomings of the preceding framework in mind.


Neural networks’ rise in popularity

The phrase “neural networks” is thrown around data science circles as if it were a recent development, but the reality is the concept is much older. A look at the history of the concept reveals its start in the 1940s, rooted in neurophysiology and mathematics.

The recent popularity is fueled by the rapidly declining cost of large computational power necessary to process neural networks. With the cost of computing declining, analysts have found it feasible to implement neural nets on standard laptop machines. However, this solution only works when dealing with minor projects containing small quantities of data.

As companies started collecting vast amounts of data, a standard CPU was no longer sufficient for analytical calculations, and it became necessary to use distributed computing as a means of expanding processing power. This allowed TensorFlow to become a machine learning framework of choice.

Despite advancements in distributed computing, the implementation of these models still requires sophisticated mathematical and technical knowledge. Some of this challenge is alleviated through the use of Keras, which is a high-level neural network API that has the ability to sit on top of TensorFlow. Keras is practical, having been built around the concept of user friendliness, modularity and extensibility. Additionally, Keras is available as a Python package, which is rapidly gaining popularity within the advanced analytics industry.


Why use TensorFlow?

So what kinds of problems can TensorFlow solve?

As you might suspect, TensorFlow is able to improve upon common analytic methods such as time-series modeling, recurrent neural nets (RNNs) and regression. With TensorFlow, time-series modeling becomes more accurate; with RNNs, TensorFlow increases computing efficiency; and with regression, TensorFlow can quickly find the lowest mean squared error.

But TensorFlow also pushes the boundaries of data analysis and is able to handle vast and complex datasets, meaning TensorFlow is highly effective in the cutting edge areas of image classification, text analytics and voice to speech processing, all of which provide enormous value to the organizations that invest in their deployment.


Text Analytics

Take a look around you: text is everywhere. Analysis of text has historically been performed using traditional natural language processing techniques, which depend on treating words as numbers and then building linear models on top of them. These models are somewhat limited, as they do not allow for the depth of language complexities to fully understand the intended meaning of a phrase. Neural nets, however, have this ability, leveraged to solve textual problems such as chatbots, sentiment analysis and topic modeling.

TensorFlow’s proficiency with convolutional neural networks (CNNs) in addition to RNNs is valuable, as these techniques are known to work well with text analytics. CNNs can be used to classify text, apply a moving window to input data and learn weights to apply to neighboring words, while RNNs identify relationships between words.


Image Classification

As previously mentioned, TensorFlow is exceptional at building CNNs. Their application extends beyond text analysis to image classification, as CNNs can classify images based on a training set, benefiting industries requiring dependence on image processing and computer vision, such as insurance claim processing, self-driving cars and facial recognition.

CNNs are a type of feed-forward artificial neural network which work by identifying simpler patterns in data, then learning to combine them to identify more complex patterns. This is particularly useful in case of images where TensorFlow neural nets identify lines and curves and use them to classify larger shapes and objects like faces and objects. TensorFlow models can be trained effectively on an existing database of classified images and improved over time.

An example of this can be seen in an object detection API that Google released for TensorFlow. Google also released MobileNets, a family of computer vision models optimized for use within the computing constraints of a mobile device. Examples of use would be facial, object and landmark recognition.

Picture1TensorFlow object detection

Picture1


Of course, the work is not finished. Many advancements still remain for image processing, but the earliest adopters of TensorFlow will benefit from a competitive advantage.


Voice to speech

Speech recognition is now part of everyday life, and given the size and nature of audio data, this is another problem well-suited to TensorFlow.

Python’s libraries for speech processing can be used to read in audio data, including Librosa, a popular open-source library that not only allows reading and decomposing several audio formats like 'aac', 'au', 'flac', 'm4a', 'mp3', 'ogg' and 'wav,' but also has capabilities for generating spectral charts and waveforms, getting beat and frequency counts. Once that data is obtained, TensorFlow is brought in to identify patterns and produce a model for understanding all future input.


How Clarity can help

Clarity Insights is uniquely prepared to help clients adopt the use of TensorFlow to solve any unique machine learning or artificial intelligence challenge your business is facing. Clarity Insights has its own “Artificial Intelligence Lab,” created with the sole purpose of guiding organizations through the implementation of cutting edge analytical methods and techniques. From Silicon Valley to the Midwest, Clarity has a wide berth of analytical acumen, as evidenced by Forrester’s latest report naming Clarity Insights a leader amongst analytics service providers.

 


Written by Shantanu Raghav

Analytics consultant with 7+ years experience in Technology, Payments, Retail, Consumer Electronics and Insurance


Topics: data science

Subscribe to our Blog

Start a conversation

Read Recent Posts: