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 Data Analysis Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.