Load .Rdata

load(file = "D:/Penelitian/Output/env_6 Cluster.RData")

2 Cluster Confusion Matrix

Signifikansi Parameter 2 Cluster
library(flexmix)
## Loading required package: lattice
summary(sign_par)
## $Comp.1
##              Estimate Std. Error z value Pr(>|z|)   
## (Intercept)  7.905055   4.162193  1.8993 0.057531 . 
## X1          -7.875130   3.295167 -2.3899 0.016853 * 
## X2           4.273495   1.619794  2.6383 0.008332 **
## X3           3.187577   1.676637  1.9012 0.057279 . 
## X5          -0.094602   0.042595 -2.2209 0.026355 * 
## X6           0.582451   1.221574  0.4768 0.633502   
## X7          -0.198651   0.067048 -2.9628 0.003048 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## $Comp.2
##               Estimate Std. Error z value Pr(>|z|)  
## (Intercept) -241.21387  121.71668 -1.9818  0.04751 *
## X1            30.76040   28.09193  1.0950  0.27352  
## X2           -17.88971   14.77444 -1.2109  0.22595  
## X3            -4.22680    9.93696 -0.4254  0.67057  
## X5             0.14564    0.18111  0.8041  0.42132  
## X6            56.95453   26.50663  2.1487  0.03166 *
## X7             2.97991    1.44129  2.0675  0.03868 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Train
train_cm
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction    0    1
##          0  957   74
##          1   43 1026
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##    0.944285714    0.888475330    0.933600812    0.953707947    0.523809524 
## AccuracyPValue  McnemarPValue 
##    0.000000000    0.005545667 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##            0.9570000            0.9327273            0.9282250 
##       Neg Pred Value            Precision               Recall 
##            0.9597755            0.9282250            0.9570000 
##                   F1           Prevalence       Detection Rate 
##            0.9423929            0.4761905            0.4557143 
## Detection Prevalence    Balanced Accuracy 
##            0.4909524            0.9448636 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"
Test
test_cm
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction   0   1
##          0 558  29
##          1 344  24
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   6.094241e-01   1.881850e-02   5.776590e-01   6.405122e-01   9.445026e-01 
## AccuracyPValue  McnemarPValue 
##   1.000000e+00   1.950640e-59 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##           0.61862528           0.45283019           0.95059625 
##       Neg Pred Value            Precision               Recall 
##           0.06521739           0.95059625           0.61862528 
##                   F1           Prevalence       Detection Rate 
##           0.74949631           0.94450262           0.58429319 
## Detection Prevalence    Balanced Accuracy 
##           0.61465969           0.53572773 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"

3 Cluster Confusion Matrix

Train
train_cm3
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction   0   1
##          0 350 339
##          1 650 761
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   5.290476e-01   4.241782e-02   5.074327e-01   5.505814e-01   5.238095e-01 
## AccuracyPValue  McnemarPValue 
##   3.233003e-01   6.366009e-23 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##            0.3500000            0.6918182            0.5079826 
##       Neg Pred Value            Precision               Recall 
##            0.5393338            0.5079826            0.3500000 
##                   F1           Prevalence       Detection Rate 
##            0.4144464            0.4761905            0.1666667 
## Detection Prevalence    Balanced Accuracy 
##            0.3280952            0.5209091 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"
Test
test_cm3
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction   0   1
##          0 624  38
##          1 278  15
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   6.691099e-01  -8.043504e-03   6.382570e-01   6.989158e-01   9.445026e-01 
## AccuracyPValue  McnemarPValue 
##   1.000000e+00   3.302958e-41 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##           0.69179601           0.28301887           0.94259819 
##       Neg Pred Value            Precision               Recall 
##           0.05119454           0.94259819           0.69179601 
##                   F1           Prevalence       Detection Rate 
##           0.79795396           0.94450262           0.65340314 
## Detection Prevalence    Balanced Accuracy 
##           0.69319372           0.48740744 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"

4 Cluster Confusion Matrix

Train
train_cm4
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction    0    1
##          0 1000    1
##          1    0 1099
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##      0.9995238      0.9990455      0.9973497      0.9999879      0.5238095 
## AccuracyPValue  McnemarPValue 
##      0.0000000      1.0000000 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##            1.0000000            0.9990909            0.9990010 
##       Neg Pred Value            Precision               Recall 
##            1.0000000            0.9990010            1.0000000 
##                   F1           Prevalence       Detection Rate 
##            0.9995002            0.4761905            0.4761905 
## Detection Prevalence    Balanced Accuracy 
##            0.4766667            0.9995455 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"
Test
test_cm4
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction   0   1
##          0  56   2
##          1 846  51
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   1.120419e-01   2.866402e-03   9.273414e-02   1.337779e-01   9.445026e-01 
## AccuracyPValue  McnemarPValue 
##   1.000000e+00  2.910744e-184 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##           0.06208426           0.96226415           0.96551724 
##       Neg Pred Value            Precision               Recall 
##           0.05685619           0.96551724           0.06208426 
##                   F1           Prevalence       Detection Rate 
##           0.11666667           0.94450262           0.05863874 
## Detection Prevalence    Balanced Accuracy 
##           0.06073298           0.51217420 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"

5 Cluster Confusion Matrix

Train
train_cm5
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction    0    1
##          0  510    0
##          1  490 1100
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   7.666667e-01   5.216179e-01   7.479738e-01   7.846122e-01   5.238095e-01 
## AccuracyPValue  McnemarPValue 
##  8.841445e-117  3.877458e-108 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##            0.5100000            1.0000000            1.0000000 
##       Neg Pred Value            Precision               Recall 
##            0.6918239            1.0000000            0.5100000 
##                   F1           Prevalence       Detection Rate 
##            0.6754967            0.4761905            0.2428571 
## Detection Prevalence    Balanced Accuracy 
##            0.2428571            0.7550000 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"
Test
test_cm5
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction   0   1
##          0 441  23
##          1 461  30
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   4.931937e-01   1.123913e-02   4.610244e-01   5.254051e-01   9.445026e-01 
## AccuracyPValue  McnemarPValue 
##   1.000000e+00   8.400260e-88 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##            0.4889135            0.5660377            0.9504310 
##       Neg Pred Value            Precision               Recall 
##            0.0610998            0.9504310            0.4889135 
##                   F1           Prevalence       Detection Rate 
##            0.6456808            0.9445026            0.4617801 
## Detection Prevalence    Balanced Accuracy 
##            0.4858639            0.5274756 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"

6 Cluster Confusion Matrix

Train
train_cm6
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction    0    1
##          0 1000    0
##          1    0 1100
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##      1.0000000      1.0000000      0.9982449      1.0000000      0.5238095 
## AccuracyPValue  McnemarPValue 
##      0.0000000            NaN 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##            1.0000000            1.0000000            1.0000000 
##       Neg Pred Value            Precision               Recall 
##            1.0000000            1.0000000            1.0000000 
##                   F1           Prevalence       Detection Rate 
##            1.0000000            0.4761905            0.4761905 
## Detection Prevalence    Balanced Accuracy 
##            0.4761905            1.0000000 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"
Test
test_cm6
## $positive
## [1] "0"
## 
## $table
##           Reference
## Prediction   0   1
##          0 763  49
##          1 139   4
## 
## $overall
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   8.031414e-01  -4.370371e-02   7.764806e-01   8.279175e-01   9.445026e-01 
## AccuracyPValue  McnemarPValue 
##   1.000000e+00   8.527294e-11 
## 
## $byClass
##          Sensitivity          Specificity       Pos Pred Value 
##           0.84589800           0.07547170           0.93965517 
##       Neg Pred Value            Precision               Recall 
##           0.02797203           0.93965517           0.84589800 
##                   F1           Prevalence       Detection Rate 
##           0.89031505           0.94450262           0.79895288 
## Detection Prevalence    Balanced Accuracy 
##           0.85026178           0.46068485 
## 
## $mode
## [1] "sens_spec"
## 
## $dots
## list()
## 
## attr(,"class")
## [1] "confusionMatrix"