knitr::opts_chunk$set(fig.path='figure/', warning=FALSE, message=FALSE, error=FALSE)
knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
In this document we describe the main features of the HistDAWass package. The name is the acronym for Histogram-valued Data analysis using Wasserstein metric. The implemented classes and functions are related to the analysis of data tables containing histograms in each cell instead of the classical numeric values.
In this document we describe the main features of the HistDAWass package. The name is the acronym for Histogram-valued Data analysis using Wasserstein metric. The implemented classes and functions are related to the anlysis of data tables containing histograms in each cell instead of the classical numeric values.
What is the L2 Wasserstein metric?
given two probability density functions $f$ and $g$, each one has a cumulative distribution function $F$ and $G$ and thei respectively quantile functions (the inverse of a cumulative distribution function) $Q_f$ and $Q_g$. The L2 Wasserstein distance is
$$d_W(f,g)=\sqrt{\int\limits_0^1{(Q_f(p) - Q_g(p))^2 dp}}$$
The implemented classes are those described in the following table
| Class | wrapper function for initializing | Description
|-----------------|-----------------------------------|------------------------
| distributionH
| distributionH(x,p)
| A class describing a histogram distibution
| MatH
| MatH(x, nrows, ncols,rownames,varnames, by.row )
|A class describing a matrix of distributions
| TdistributionH
| TdistributionH()
| A class derived from distributionH equipped with a timestamp or a time window
| HTS
| HTS()
| A class describing a Histgram-valued time series
library(HistDAWass) mydist=distributionH(x=c(0,1,2),p=c(0,0.3,1))
data2hist functions
mean
standard deviation
skewness
kurthosis
The average hisogram of a column
+ It is an average histogram that minimizes the sum of squared Wasserstein distances.
The standard deviation of a variable
+ It is a number that measures the dispersion of a set of histograms.
The covarince matrix of a MatH
+ It is a matrix that measures the covariances into a set of hitogram variables.
The correlation matrix of a MatH
+ It is a matrix that measures the correlation into a set of hitogram variables.
plot of a distributionH
plot of a MatH
plot of a HTS
Clustering
Kmeans
Adaptive distance based Kmeans
Fuzzy cmeans
Fuzzy cmeans based on adaptive Wasserstein distances
Kohonen batch self organizing maps
Kohonen batch self organizing maps with Wasserstein adaptive distances
Hierarchical clustering
Dimension reduction techniques
Principal components analysis of a single histogram variable
Principal components analysis of a set of histogram variables (using Multiple Factor Analysis)
Smoothing
Moving averages
Exponential smoothing
Predicting
A two component model for a linear regression using Least Square method
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.