Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
F# for Machine Learning Essentials

You're reading from  F# for Machine Learning Essentials

Product type Book
Published in Feb 2016
Publisher
ISBN-13 9781783989348
Pages 194 pages
Edition 1st Edition
Languages
Author (1):
Sudipta Mukherjee Sudipta Mukherjee
Profile icon Sudipta Mukherjee

Table of Contents (16) Chapters

F# for Machine Learning Essentials
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Introduction to Machine Learning Linear Regression Classification Techniques Information Retrieval Collaborative Filtering Sentiment Analysis Anomaly Detection Index

Pointwise Mutual Information


PMI between two words is calculated using the following formula:

represent the number of occurrences of the word word in the entire document collection. The original article that proposed this idea used the number of articles returned for the search word word from the AltaVista search engine. But you can safely use a probability (the number of documents in which the word word appeared divided by the total number of documents). The & operator in refers to the number of documents containing both words word1 and word2 divided by the total number of documents.

The following function finds the probability of the word in a document collection represented by list:

The following function finds the probability of the words w1 and w2 in a document collection represented by list:

The following function calculates the PMI between w1 and w2:

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}