Lecture 6: Analysis
[Pages:218]Lecture 6: Analysis
Random number generation
Often, generating random numbers can be useful when developing code. the numpy library contains functions for doing this.
In [3]: import numpy as np
In [4]: help(np.random)
Help on package numpy.random in numpy:
NAME numpy.random
DESCRIPTION ======================== Random Number Generation ========================
==================== ==========================
===============================
Utility functions
===============================================
===============================
random_sample
Uniformly distributed floa
ts over ``[0, 1)``.
random
Alias for `random_sample`.
bytes
Uniformly distributed rand
om bytes.
random_integers
Uniformly distributed inte
gers in a given range.
permutation
Randomly permute a sequenc
e / generate a random sequence.
shuffle
Randomly permute a sequenc
e in place. seed
erator. choice
ay.
Seed the random number gen Random sample from 1-D arr
==================== ========================== ===============================
==================== ==========================
===============================
Compatibility functions
===============================================
===============================
rand
Uniformly distributed valu
es.
randn
Normally distributed value
s.
ranf
Uniformly distributed floa
ting point numbers.
randint
Uniformly distributed inte
gers in a given range.
==================== ==========================
===============================
==================== ==========================
===============================
Univariate distributions
===============================================
===============================
beta
Beta distribution over ``
[0, 1]``.
binomial
Binomial distribution.
chisquare
:math:`\chi^2` distributio
n.
exponential
Exponential distribution.
f
F (Fisher-Snedecor) distri
bution.
gamma
Gamma distribution.
geometric
Geometric distribution.
gumbel
Gumbel distribution.
hypergeometric
Hypergeometric distributio
n.
laplace
Laplace distribution.
logistic
Logistic distribution.
lognormal
Log-normal distribution.
logseries
Logarithmic series distrib
ution.
negative_binomial Negative binomial distribu
tion.
noncentral_chisquare Non-central chi-square dis
tribution.
noncentral_f
Non-central F distributio
n.
normal
Normal / Gaussian distribu
tion.
pareto
Pareto distribution.
poisson
Poisson distribution.
power
Power distribution.
rayleigh
Rayleigh distribution.
triangular
Triangular distribution.
uniform
Uniform distribution.
vonmises
Von Mises circular distrib
ution.
wald
Wald (inverse Gaussian) di
stribution.
weibull
Weibull distribution.
zipf
Zipf's distribution over r
anked data.
==================== ==========================
===============================
==================== ========================== ===============================
Multivariate distributions
===============================================
===============================
dirichlet
Multivariate generalizatio
n of Beta distribution.
multinomial
Multivariate generalizatio
n of the binomial distribution.
multivariate_normal Multivariate generalizatio
n of the normal distribution.
==================== ==========================
===============================
==================== ==========================
===============================
Standard distributions
===============================================
===============================
standard_cauchy
Standard Cauchy-Lorentz di
stribution.
standard_exponential Standard exponential distr
ibution.
standard_gamma
Standard Gamma distributio
n.
standard_normal
Standard normal distributi
on.
standard_t
Standard Student's t-distr
ibution. ==================== ==========================
===============================
==================== ==========================
===============================
Internal functions
===============================================
===============================
get_state
Get tuple representing int
ernal state of generator.
set_state
Set state of generator.
==================== ==========================
===============================
PACKAGE CONTENTS info mtrand setup tests (package)
FUNCTIONS beta(...) method of mtrand.RandomState instance beta(a, b, size=None)
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- comp 333 data analytics concordia university
- 데이터분석 python r
- numpy reference scipy
- the numpy array a structure for efficient numerical
- a common gpu n dimensional array for python and c
- numpy tutorial
- using the global arrays toolkit to reimplement numpy for
- numpy numeric python
- numpy westmont college
- numerical and scientific computing in python
Related searches
- marketing management pdf lecture notes
- strategic management lecture notes pdf
- strategic management lecture notes
- philosophy 101 lecture notes
- philosophy lecture notes
- philosophy of education lecture notes
- financial management lecture notes
- financial management lecture notes pdf
- business management lecture notes
- introduction to philosophy lecture notes
- business management lecture notes pdf
- introduction to management lecture notes