mrv_histogram: mrv_histogram

mrv_histogramR Documentation

mrv_histogram

Description

Multivariate rv_histogram distribution in OOP way.

Details

Used for a multivariate dataset, fit each marge

Public fields

n_features

[integer] Number of features (dimensions)

law_

[list] List of marginal distributions

Methods

Public methods


Method new()

Create a new mrv_histogram object.

Usage
mrv_histogram$new(...)
Arguments
...

If a param 'Y' is given, the fit method is called with '...'.

Returns

A new 'mrv_histogram' object.


Method fit()

Fit method for the histograms

Usage
mrv_histogram$fit(Y, bins = as.integer(100))
Arguments
Y

[vector] Dataset to infer the histogram

bins

[list or vector or integer] bins values

Returns

'self'


Method rvs()

Generation sample from the histogram

Usage
mrv_histogram$rvs(n = 1)
Arguments
n

[integer] Number of samples drawn

Returns

A matrix of samples


Method cdf()

Cumulative Distribution Function

Usage
mrv_histogram$cdf(q)
Arguments
q

[vector] Quantiles to compute the CDF

Returns

cdf values


Method sf()

Survival Function

Usage
mrv_histogram$sf(q)
Arguments
q

[vector] Quantiles to compute the SF

Returns

sf values


Method icdf()

Inverse of Cumulative Distribution Function

Usage
mrv_histogram$icdf(p)
Arguments
p

[vector] Probabilities to compute the CDF

Returns

icdf values


Method isf()

Inverse of Survival Function

Usage
mrv_histogram$isf(p)
Arguments
p

[vector] Probabilities to compute the SF

Returns

isf values


Method clone()

The objects of this class are cloneable with this method.

Usage
mrv_histogram$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## Generate sample
X = matrix( stats::rnorm( n = 10000 ) , ncol = 4 )

## And fit it
rvX = mrv_histogram$new()
rvX$fit(X)


ROOPSD documentation built on Sept. 11, 2023, 9:06 a.m.

Related to mrv_histogram in ROOPSD...