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

Type hierarchy in Distributions.jl


The functions provided in Distributions.jl follow a hierarchy. Let's go through it to understand the capabilities of the package.

Understanding Sampleable

Sampleable is an abstract type that includes samplers and distributions from which one can draw samples. It is defined as follows:

The kinds of samples that can be drawn are defined by the two parameter types:

  • VariateForm:

    • Univariate: Scalar number

    • Multivariate: Numeric vector

    • Matrixvariate: Numeric matrix

  • ValueSupport:

    • Discrete: Int

    • Continuous: Float64

We can extract the information about the sample that the Sampleable object generates. An array can contain multiple samples depending on the variate form. We can use various functions to get the information (let's assume sampobj is the sampleable object):

  • length(sampobj): As the name suggests, it gives the length of the sample, which is 1 when the object is Univariate

  • size(sampobj): This returns the shape of the sample

  • nsamples(sampobj, X): This returns the...

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 $19.99/month. Cancel anytime