Book Image

F# for Machine Learning Essentials

By : Sudipta Mukherjee
Book Image

F# for Machine Learning Essentials

By: Sudipta Mukherjee

Overview of this book

The F# functional programming language enables developers to write simple code to solve complex problems. With F#, developers create consistent and predictable programs that are easier to test and reuse, simpler to parallelize, and are less prone to bugs. If you want to learn how to use F# to build machine learning systems, then this is the book you want. Starting with an introduction to the several categories on machine learning, you will quickly learn to implement time-tested, supervised learning algorithms. You will gradually move on to solving problems on predicting housing pricing using Regression Analysis. You will then learn to use Accord.NET to implement SVM techniques and clustering. You will also learn to build a recommender system for your e-commerce site from scratch. Finally, you will dive into advanced topics such as implementing neural network algorithms while performing sentiment analysis on your data.
Table of Contents (16 chapters)
F# for Machine Learning Essentials
About the Author
About the Reviewers

Chapter 6. Sentiment Analysis

"Are you happy or not; that's the question!"

Sentiment Analysis (SA) or opinion mining is a technique used to figure out the polarity (positivity or negativity) of a sentence automatically.

This can be quite difficult given that natural language is difficult for computers to decipher. There is another related concept called Emotion Detection (ED). While the task of SA is to determine whether a given sentence or a phrase represents a positive or negative sentiment, ED tries to do something more challenging. It tries to find the actual emotion being expressed in a text.

So, the output of ED algorithms is categorical (joy, sadness, anger, violence, feel-good) while that of SA algorithms is mostly Boolean (the sentence being examined by the algorithm has either a positive or a negative polarity).

Sometimes, it makes sense to return the polarity percentage from SA algorithms as that can be used as a degree of positivity. SA is important because it gives companies the...