OTHist {SBCK} | R Documentation |
Optimal Transport Histogram
Description
Histogram
Details
Just a generic class which contains two arguments, p (probability) and c (center of bins)
Public fields
p
[vector] Vector of probability
c
[matrix] Vector of center of bins, with nrow = n_samples and ncol = n_features
bin_width
[vector or NULL] A vector of lengths of the cells discretizing R^numbers of variables. If NULL, it is estimating during the fit
bin_origin
[vector or NULL] Coordinate of lower corner of one cell. If NULL, c(0,...,0) is used
Methods
Public methods
Method new()
Create a new OTHist object.
Usage
OTHist$new(p, c)
Arguments
p
[vector] Vector of probability
c
[matrix] Vector of center of bins, with nrow = n_samples and ncol = n_features
Returns
A new 'OTHist' object.
Method clone()
The objects of this class are cloneable with this method.
Usage
OTHist$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
## Build a random discrete probability distribution
p = stats::rnorm(100)
p = p / base::sum(p)
c = base::seq( -1 , 1 , length = 100 )
mu = OTHist$new( p , c )
[Package SBCK version 1.0.0 Index]