Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Julia for Data Science

You're reading from  Julia for Data Science

Product type Book
Published in Sep 2016
Publisher Packt
ISBN-13 9781785289699
Pages 346 pages
Edition 1st Edition
Languages
Author (1):
Anshul Joshi Anshul Joshi
Profile icon Anshul Joshi
Toc

Table of Contents (17) Chapters close

Julia for Data Science
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. The Groundwork – Julia's Environment 2. Data Munging 3. Data Exploration 4. Deep Dive into Inferential Statistics 5. Making Sense of Data Using Visualization 6. Supervised Machine Learning 7. Unsupervised Machine Learning 8. Creating Ensemble Models 9. Time Series 10. Collaborative Filtering and Recommendation System 11. Introduction to Deep Learning

Scatter matrix and covariance


Covariance is used very often by data scientists to find out how two ordered sets of data follow in the same direction. It can very easily define whether the variables are correlated or not. To best represent this behavior, we create a covariance matrix. The unnormalized version of the covariance matrix is the scatter matrix.

To create a scatter matrix, we use the scattermat(arr) function.

The default behavior is to treat each row as an observation and column as a variable. This can be changed by providing the keyword arguments vardim and mean:

  • Vardim: vardim=1 (default) means each column is a variable and each row is an observation. vardim=2 is the reverse.

  • mean: The mean is computed by scattermat. We can use a predefined mean to save compute cycles.

We can also create a weighted covariance matrix using the cov function. It also takes vardim and mean as optional arguments for the same purpose.

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}