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
1. Introduction to Machine Learning 2. Linear Regression 3. Classification Techniques 4. Information Retrieval 5. Collaborative Filtering 6. Sentiment Analysis 7. Anomaly Detection Index

Understanding logistic regression


Unlike linear regression which is used to predict the real values of a real entity, logistic regression is used to predict the class or tag of an unseen entry. Logistic regression's output is either a 0 or a 1 depicting the predicted class of the unseen entry. Logistic regression uses a smooth curve whose values range from 0 to 1 for all the values of the independent variable.

Sigmoid function (also called logistic function) is one option for this function. This is defined by the following formula:

The sigmoid function chart

The following chart is generated by the code snippet using FsPlot:

You need to install Chrome to get the chart rendered.

So you see that the function value approaches 1 as the value of X approaches infinity, and it approaches 0 as the value of approaches negative infinity. So for any given value of , you can determine the class if you set your threshold at 0.5. In other words, you can say that if for a given value of the value of the sigmoid...

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 €14.99/month. Cancel anytime}