Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Julia for Data Science

You're reading from   Julia for Data Science high-performance computing simplified

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781785289699
Length 346 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Anshul Joshi Anshul Joshi
Author Profile Icon Anshul Joshi
Anshul Joshi
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. The Groundwork – Julia's Environment 2. Data Munging FREE CHAPTER 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

Histograms


Data exploration after a basic understanding can also be done with the aid of visualizations. Plotting a histogram is one of the most common ways of data exploration through visualization. A histogram type is used to tabulate data over a real plane separated into regular intervals.

A histogram is created using the fit method:

julia> fit(Histogram, data[, weight][, edges])  

fit takes the following arguments:

  • data: Data is passed to the fit function in the form of a vector, which can either be one-dimensional or n-dimensional (tuple of vectors of equal length).

  • weight: This is the optional argument. A WeightVec type can be passed as an argument if values have different weights. The default weight of values is 1.

  • edges: This is a vector used to give the edges of the bins along each dimension.

It also takes a keyword argument, nbins, which is used to define the number of bins that the histogram should use along each side:

In this example, we used two random value generators...

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 ₹800/month. Cancel anytime