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

Ridge regression


Ridge regression is a technique to block the cases where X'X becomes singular. I is an identity matrix where all the elements in the diagonal are 1 and all the other elements are zero. is a user-defined scalar value and it is used to minimize the prediction error.

The following code snippet uses the house price example to find the theta using ridge regression model:

The price is a vector holding the price of all the houses.

  • is known as the Shrinkage Parameter
  • controls the size of the coefficients of theta
  • controls the amount of regularization

To obtain the value of , you have to break the training data into several sets and run the algorithm several times with several values of , and then find the one that is most sensible and reduces error the most. There are some techniques to find the value of using SVD but it's not proven to work all the time.

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}