You are on page 1of 6

1. Diabetes lakukan klasifikasi dengan algoritma Naive Bayer dengan 10 cross validation ?

2. Bodyfat menggunakan Simple K_mean number Clusters 4 ?

JAWAB :
1. === Run information ===
Scheme:weka.class ifiers.bayes.NaiveBayes
Relation:

pima_diabetes

Instances: 768
Attributes: 9
PREG

SKIN

PEDI

PLASS

INSU

AGE

PRES

MASS

CLASS

Test mode:10-fold cross-validation

=== Classifier model (full training set) ===

Naive Bayes Classifier


Class
Attribute

tested_negative tested_positive
(0.65)

(0.35)

===============================================
preg
mean

3.4234

4.9795

std. dev.

3.0166

3.6827

weight sum
precision

500

268

1.0625

1.0625

mean

109.9541

141.2581

std. dev.

26.1114

31.8728

plas

weight sum
precision

500
1.4741

268
1.4741

pres
mean

68.1397

70.718

std. dev.

17.9834

21.4094

weight sum
precision

500

268

2.6522

2.6522

skin
mean
std. dev.

19.8356
14.8974

22.2824
17.6992

weight sum

500

268

precision

1.98

1.98

insu

mean

68.8507

100.2812

std. dev.

98.828

138.4883

weight sum

500

268

precision

4.573

4.573

30.3009

35.1475

mass
mean
std. dev.

7.6833

weight sum

500

precision

7.2537
268

0.2717

0.2717

0.4297

0.5504

pedi
mean
std. dev.
weight sum
precision

0.2986

0.3715

500

268

0.0045

0.0045

age
mean

31.2494

37.0808

std. dev.

11.6059

10.9146

weight sum
precision

500

268

1.1765

1.1765

Time taken to build model: 0.02 seconds

=== Strat if ied cross-validation ===


=== Summary ===

Correctly Classified Instances

586

76.3021 %

Incorrectly Classified Instances

182

23.6979 %

Kappa statistic

0.4664

Mean absolute error

0.2841

Root mean squared error

0.4168

Relative absolute error

62.5028 %

Root relative squared error

87.4349 %

Total Number of Instances

768

=== Detailed Accuracy By Class ===

TP Rate FP Rate Precision Recall F-Measure ROC Area Class


0.844

0.388

0.802

0.844

0.823

0.819

tested_negative

0.612

0.156

0.678

0.612

0.643

0.819

tested_positive

Weighted Avg.

0.763

0.759

0.763

0.307

=== Confusion Matrix ===

a b

<-- classified as

422 78 | a = tested_negative
104 164 | b = tested_positive

2. === Run information ===

0.76

0.819

Scheme:weka.clusterers.SimpleKMeans -N 4 -A "weka.core.EuclideanDistance -R first-last" -I


500 -S 10
Relation:

bodyfat.names

Instances: 252
Attributes: 15
Density
Age
Weight
Height
Neck

Chest
Ankle
Abdomen
Beceps
Hip
Foream
Thigh
Frist
Knee
Class
Test mode:evaluate on training data

=== Model and evaluation on training set ===


kMeans
======
Number of iterations: 11
Within cluster sum of squared errors: 39.77286179685367
Missing values globally replaced with mean/mode
Cluster centroids:
Cluster#
Attribute

Full Data
(252)

(49)

(94)

(77)

(32)

=====================================================================
Density

1.0556

1.0589

1.0699

1.0473

1.0282

Age

44.8849

33.1224

41.617

53.9481

50.6875

Weight

178.9244

198.2633

153.5771

178.7987

224.0719

Height

70.1488

72.1939

69.4415

69.9253

69.6328

Neck

37.9921

39.2612

36.0149

38.3805

40.9219

Chest

100.8242

104.1245

93.1649

102.3

114.7187

Abdomen

92.556

95.0184

82.9064

95.1883

110.7969

Hip

99.9048

104.1714

94.2223

99.4403

111.1813

Thigh

59.406

63.5959

55.484

58.8195

65.9219

Knee

38.5905

40.1755

36.7564

38.5

41.7687

Ankle

23.1024

24.3163

22.1543

22.9909

24.2969

Biceps

32.2734

34.5102

29.9628

32.2065

35.7969

Forearm

28.6639

30.1041

27.2287

28.8182

30.3031

Wrist

18.2298

18.7143

17.4936

18.4455

19.1312

class

19.1508

17.898

12.7096

22.7169

31.4094

Time taken to build model (full training data) : 0.03 seconds

=== Model and evaluation on training set ===


Clustered Instances

49 ( 19%)

94 ( 37%)

77 ( 31%)

32 ( 13%)

You might also like