Multivariate rv_histogram distribution in OOP way.
n_features[integer] Number of features (dimensions)
law_[list] List of marginal distributions
new()Create a new mrv_histogram object.
mrv_histogram$new(...)...If a param `Y` is given, the fit method is called with `...`.
A new `mrv_histogram` object.
fit()Fit method for the histograms
mrv_histogram$fit(Y, bins = as.integer(100))Y[vector] Dataset to infer the histogram
bins[list or vector or integer] bins values
`self`
rvs()Generation sample from the histogram
mrv_histogram$rvs(n = 1)n[integer] Number of samples drawn
A matrix of samples
cdf()Cumulative Distribution Function
mrv_histogram$cdf(q)q[vector] Quantiles to compute the CDF
cdf values
sf()Survival Function
mrv_histogram$sf(q)q[vector] Quantiles to compute the SF
sf values
icdf()Inverse of Cumulative Distribution Function
mrv_histogram$icdf(p)p[vector] Probabilities to compute the CDF
icdf values
isf()Inverse of Survival Function
mrv_histogram$isf(p)p[vector] Probabilities to compute the SF
isf values
clone()The objects of this class are cloneable with this method.
mrv_histogram$clone(deep = FALSE)deepWhether to make a deep clone.
Used for a multivariate dataset, fit each marge
## Generate sample
X = matrix( stats::rnorm( n = 10000 ) , ncol = 4 )
## And fit it
rvX = mrv_histogram$new()
rvX$fit(X)
Run the code above in your browser using DataLab