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
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

A baseline algorithm for SA using SentiWordNet lexicons


Sentiment Analysis algorithms work by referring external resources where the positive and negative polarity of each word is considered. These external words, for which the polarity is predetermined, are known as lexicons. There are several lists of lexicons available and each one focuses on the polarity of a given word in a particular context. For example, consider the following couple of sentences:

  • The play has an unpredictable plot

  • This car's steering is unpredictable

The first usage of unpredictable indicates that the play is good. If this statement is found on an online portal that lets users rate plays, then this phrase can be taken as a positive feedback for the play involved. On the other hand, the usage of unpredictable in the second sentence means that driving the car could be dangerous because the steering wheel is unpredictable in its functioning. Thus, if we use a general-purpose lexicon that has a high negative polarity for...