package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `Rv_generic
]
type t = [ `Object | `Rv_generic ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val create : ?seed:Py.Object.t -> unit -> t

Class which encapsulates common functionality between rv_discrete and rv_continuous.

val entropy : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> Py.Object.t

Differential entropy of the RV.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information). loc : array_like, optional Location parameter (default=0). scale : array_like, optional (continuous distributions only). Scale parameter (default=1).

Notes ----- Entropy is defined base `e`:

>>> drv = rv_discrete(values=((0, 1), (0.5, 0.5))) >>> np.allclose(drv.entropy(), np.log(2.0)) True

val freeze : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> Py.Object.t

Freeze the distribution for the given arguments.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution. Should include all the non-optional arguments, may include ``loc`` and ``scale``.

Returns ------- rv_frozen : rv_frozen instance The frozen distribution.

val interval : ?kwds:(string * Py.Object.t) list -> alpha:[> `Ndarray ] Np.Obj.t -> Py.Object.t list -> [> tag ] Obj.t -> Py.Object.t

Confidence interval with equal areas around the median.

Parameters ---------- alpha : array_like of float Probability that an rv will be drawn from the returned range. Each value should be in the range 0, 1. arg1, arg2, ... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information). loc : array_like, optional location parameter, Default is 0. scale : array_like, optional scale parameter, Default is 1.

Returns ------- a, b : ndarray of float end-points of range that contain ``100 * alpha %`` of the rv's possible values.

val mean : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> float

Mean of the distribution.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional location parameter (default=0) scale : array_like, optional scale parameter (default=1)

Returns ------- mean : float the mean of the distribution

val median : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> float

Median of the distribution.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional Location parameter, Default is 0. scale : array_like, optional Scale parameter, Default is 1.

Returns ------- median : float The median of the distribution.

See Also -------- rv_discrete.ppf Inverse of the CDF

val moment : ?kwds:(string * Py.Object.t) list -> n:[ `N_1 of Py.Object.t | `I of int ] -> Py.Object.t list -> [> tag ] Obj.t -> Py.Object.t

n-th order non-central moment of distribution.

Parameters ---------- n : int, n >= 1 Order of moment. arg1, arg2, arg3,... : float The shape parameter(s) for the distribution (see docstring of the instance object for more information). loc : array_like, optional location parameter (default=0) scale : array_like, optional scale parameter (default=1)

val rvs : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> [ `ArrayLike | `Ndarray | `Object ] Np.Obj.t

Random variates of given type.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information). loc : array_like, optional Location parameter (default=0). scale : array_like, optional Scale parameter (default=1). size : int or tuple of ints, optional Defining number of random variates (default is 1). random_state : None or int or ``np.random.RandomState`` instance, optional If int or RandomState, use it for drawing the random variates. If None, rely on ``self.random_state``. Default is None.

Returns ------- rvs : ndarray or scalar Random variates of given `size`.

val stats : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> Py.Object.t

Some statistics of the given RV.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional location parameter (default=0) scale : array_like, optional (continuous RVs only) scale parameter (default=1) moments : str, optional composed of letters 'mvsk' defining which moments to compute: 'm' = mean, 'v' = variance, 's' = (Fisher's) skew, 'k' = (Fisher's) kurtosis. (default is 'mv')

Returns ------- stats : sequence of requested moments.

val std : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> float

Standard deviation of the distribution.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional location parameter (default=0) scale : array_like, optional scale parameter (default=1)

Returns ------- std : float standard deviation of the distribution

val support : ?kwargs:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> Py.Object.t

Return the support of the distribution.

Parameters ---------- arg1, arg2, ... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information). loc : array_like, optional location parameter, Default is 0. scale : array_like, optional scale parameter, Default is 1. Returns ------- a, b : float end-points of the distribution's support.

val var : ?kwds:(string * Py.Object.t) list -> Py.Object.t list -> [> tag ] Obj.t -> float

Variance of the distribution.

Parameters ---------- arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional location parameter (default=0) scale : array_like, optional scale parameter (default=1)

Returns ------- var : float the variance of the distribution

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

val pp : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.