Description Usage Arguments Value Author(s) References See Also Examples
This function transforms quantitative variable into histogram-valued variable.
1 | PrepHistogram(X, Z = NULL, k = 3,group=NULL)
|
X |
|
Z |
|
k |
|
group |
Data group |
Returns a list including :
mido |
return the class centres of class and the min and the max of histograms |
Vhistogram |
dataframe containing the relative frequency of histogram variables |
Brahim Brahim Brahim Brahim <brahim.brahim@bigdatavisualizations.com> and Sun Makosso-Kallyth <makosso.sun@gmail.com>
Makosso-Kallyth, Sun; Diday, Edwin. Adaptation of interval PCA to symbolic histogram variables. Advances in Data Analysis and Classification. Volume 6. n 2. 2012. pages 147-159. Springer.
http://www.ivisualizations.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ### example1 from iris data
## preparation of histogram-valued variables (k= 3 bins)
Sepal.LengthHistogram=PrepHistogram(X=iris[,1],Z=iris[,5])$Vhistogram
Sepal.WidthHistogram=PrepHistogram(X=iris[,2],Z=iris[,5])$Vhistogram
Petal.LengthHistogram=PrepHistogram(X=iris[,3],Z=iris[,5])$Vhistogram
Petal.WidthHistogram=PrepHistogram(X=iris[,4],Z=iris[,5])$Vhistogram
############################ Hitsogram PCA #################################
HistPCA(Variable=list(Sepal.LengthHistogram,Sepal.WidthHistogram,
Petal.LengthHistogram,Petal.WidthHistogram),
Row.names=names(table(iris[,5])),
Col.names=colnames(iris)[1:4])
### example2 from iris data
## preparation of histogram-valued variables (k= 4 bins)
Sepal.LengthHistogram=PrepHistogram(X=iris[,1],Z=iris[,5],k=2)$Vhistogram
Sepal.WidthHistogram=PrepHistogram(X=iris[,2],Z=iris[,5],k=2)$Vhistogram
Petal.LengthHistogram=PrepHistogram(X=iris[,3],Z=iris[,5],k=2)$Vhistogram
Petal.WidthHistogram=PrepHistogram(X=iris[,4],Z=iris[,5],k=2)$Vhistogram
############################ Hitsogram PCA #################################
HistPCA(Variable=list(Sepal.LengthHistogram,Sepal.WidthHistogram,
Petal.LengthHistogram,Petal.WidthHistogram),
Row.names=names(table(iris[,5])),Col.names=colnames(iris)[1:4])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.