Vectors and matrices with randomly distributed values

The breeze.stats.distributions package supplements the random number generator that is built into Scala. Scala's default generator just provides the ability to get the random values one by one using the "next" methods. Random number generators in Breeze provide the ability to build vectors and matrices out of these generators. In this recipe, we'll briefly see three of the most common distributions of random numbers.

In this recipe, we will cover at the following sub-recipes:

  • Creating vectors with uniformly distributed random values
  • Creating vectors with normally distributed random values
  • Creating vectors with random values that have a Poisson distribution
  • Creating a matrix with uniformly random ...

Get Scala: Guide for Data Science Professionals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.