Book Image

Clojure for Data Science

By : Henry Garner
Book Image

Clojure for Data Science

By: Henry Garner

Overview of this book

Table of Contents (18 chapters)
Clojure for Data Science
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Summary


In this chapter, we've learned about how to determine whether two or more variables share a linear relationship. We've seen how to express the strength of their correlation with r and how well a linear model explains the variance with R2 and . We've also performed hypothesis tests and calculated confidence intervals to infer the range of the true population parameter for correlation, .

Having established a correlation between variables, we were able to build a predictive model using ordinary least squares regression and simple Clojure functions. We then generalized our approach using Incanter's matrix functionality and the normal equation. This simple model demonstrated the principles of machine learning by determining the model parameters β, inferred from our sample data, that could be used to make predictions. Our model was able to predict an expected weight for a new athlete that fell well within the prediction interval of the true value.

In the next chapter, we'll see how similar...