== K-MEANS == k terpilih : 8 Pencarian k: inertia : 4=4160.11, 5=3494.98, 6=2972.06, 7=2541.55, 8=2141.07 silhouette : 4=0.368, 5=0.350, 6=0.367, 7=0.369, 8=0.394 calinski : 4=2658.4, 5=2567.1, 6=2558.2, 7=2607.7, 8=2761.7 Centroid per cluster: cluster recency_days log_frequency log_monetary frequency monetary 0 699.778816 0.718410 11.010419 1.05 60500.0 1 703.092269 0.693147 13.149041 1.00 513518.0 2 1560.513957 0.708460 10.904130 1.03 54400.0 3 1512.601351 1.205905 13.769502 2.34 955033.0 4 605.430233 1.904308 14.915879 5.71 3005271.0 5 1577.125000 0.693577 12.484633 1.00 264244.0 6 628.852273 1.214016 13.861391 2.37 1046948.0 7 1527.439597 0.693147 13.990922 1.00 1191735.0 Profil per cluster: cluster n recency frequency monetary 0 321 694.0 1.06 21590425.0 1 802 704.5 1.00 554630000.0 2 609 1570.0 1.04 34125000.0 3 296 1515.0 2.40 416650000.0 4 172 495.0 6.03 637190000.0 5 944 1597.0 1.00 261405000.0 6 352 596.5 2.41 486940011.0 7 596 1556.5 1.00 893885000.0 == RANDOM FOREST == Akurasi (test) : 0.9922 Cross-val (5-fold): [0.7729, 0.9744, 0.9768, 0.9866, 0.7017] | mean=0.8825 Classification report: precision recall f1-score support 0 1.00 1.00 1.00 80 1 0.99 0.99 0.99 201 2 0.99 1.00 1.00 152 3 0.99 0.96 0.97 74 4 0.93 0.98 0.95 43 5 1.00 1.00 1.00 236 6 1.00 1.00 1.00 88 7 0.99 0.99 0.99 149 accuracy 0.99 1023 macro avg 0.99 0.99 0.99 1023 weighted avg 0.99 0.99 0.99 1023 Feature importance: feature gini_importance permutation_importance monetary 0.388409 0.509775 recency_days 0.303139 0.467644 frequency 0.308453 0.291202