Dev Thoughts

Musings from my development journey.

Topics

Is it food? An introduction to machine learning

large

Talk on machine learning given at Rails Conf 2017, by Matthew Mongeau

Pattern Recognition

Pattern recognition is one of the keys to humans being able to understand what elements are based on historical fuzzy learning. Aka, being able to recognize when something is food vs when something isn't food.

Unsupervised

Clustering and recognizing patterns of data to see how they fit together.

Supervised

Supervised learning is the machine learning task of inferring a function from labeled training data. The training data consist of a set of training examples.

Reinforcement

Iteration based learning, where programs are informed at each iteration if their perception of the world is accurate or not.

Tensor Flow

Building and training neural networks. Formal definition: an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them.

What is a Tensor?

A dimensional array. Formal definition: Tensors, defined mathematically, are simply arrays of numbers, or functions, that transform according to certain rules under a change of coordinates. In physics, tensors characterize the properties of a physical system, examples here: examples

What is Inception?

Built on the ImageNet data set. Enables programs to perform image recognition, documentation here.

Transfer Learning

Taking the knowledge base previously learned and applying it to new data. In data set, it's important to have the machine learning algorithm have knowledge about the expected data, but also the data that should be revealed as false. Example: if you are looking to recognize flower pictures, you should have images that aren't flowers in addition to having pictures of flowers.

Accuracy

There always needs to be room for error. No machine learning algorithm can be completely accurate or it means that it may be overfit (made too specifically).

Integrating a Python Tensor Flow in Rails

  • Build a Flask API service
  • Call the API by passing in the data
  • Receive the response back with the recommendation