Book Image

Clojure for Machine Learning

By : Akhil Wali
Book Image

Clojure for Machine Learning

By: Akhil Wali

Overview of this book

<p>Clojure for Machine Learning is an introduction to machine learning techniques and algorithms. This book demonstrates how you can apply these techniques to real-world problems using the Clojure programming language.</p> <p>It explores many machine learning techniques and also describes how to use Clojure to build machine learning systems. This book starts off by introducing the simple machine learning problems of regression and classification. It also describes how you can implement these machine learning techniques in Clojure. The book also demonstrates several Clojure libraries, which can be useful in solving machine learning problems.</p> <p>Clojure for Machine Learning familiarizes you with several pragmatic machine learning techniques. By the end of this book, you will be fully aware of the Clojure libraries that can be used to solve a given machine learning problem.</p>
Table of Contents (17 chapters)
Clojure for Machine Learning
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding single-variable linear regression


We often come across situations where we would need to create an approximate model from some sample data. This model can then be used to predict more such data when its required parameters are supplied. For example, we might want to study the frequency of rainfall on a given day in a particular city, which we will assume varies depending on the humidity on that day. A formulated model could be useful in predicting the possibility of rainfall on a given day if we know the humidity on that day. We start formulating a model from some data by first fitting a straight line (that is, an equation) with some parameters and coefficients over this data. This type of model is called a linear regression model. We can think of linear regression as a way of fitting a straight line, , over the sample data, if we assume that the sample data has only a single dimension.

The linear regression model is simply described as a linear equation that represents the...