Beruflich Dokumente
Kultur Dokumente
Algoritma
Flow chart
Input Data
x1<-c(27.3,28,27.8,27.6,27.3,26,25.9,25.7,26.4,27,27,26.8)
x2<-c(48.8,72.8,64.4,66.6,64.2,33.9,40.6,43,60.9,62.4,64.9,45)
x3<-c(1010,1011,1010.8,1010.4,1009.4,1011.5,1010.9,1011.5,1009.7,1008.7,1008.4,1006.3)
x4<-c(81,78,81,83,87,90,90,91,88,86,85,85)
x5<-c(4.6,4.2,3.8,3.8,3.5,3.3,3.3,3.5,3.5,3.6,3.6,3.6)
data=data.frame(x1,x2,x3,x4,x5)
summary(data)
x1 x2 x3 x4 x5
Min. :25.70 Min. :33.90 Min. :1006 Min. :78.00 Min. :3.300
1st Qu.:26.30 1st Qu.:44.50 1st Qu.:1009 1st Qu.:82.50 1st Qu.:3.500
Median :27.00 Median :61.65 Median :1010 Median :85.50 Median :3.600
Mean :26.90 Mean :55.62 Mean :1010 Mean :85.42 Mean :3.692
3rd Qu.:27.38 3rd Qu.:64.53 3rd Qu.:1011 3rd Qu.:88.50 3rd Qu.:3.800
Max. :28.00 Max. :72.80 Max. :1012 Max. :91.00 Max. :4.600
Mencari Matriks Korelasi
cor(data)
x1 x2 x3 x4 x5
cov(data)
x1 x2 x3 x4 x5
Melakukan standarisasi karena data yang digunakan memiliki perbedaan yang cukup jauh
data[]
x1 x2 x3 x4 x5
eigen(cov(data))
eigen() decomposition
$values
$vectors
pca=prcomp(data,center=TRUE,scale.=TRUE)
pca
Rotation (n x k) = (5 x 5):
Importance of components:
plot(pca,type="l")