Data Mining And Machine Learning

randombroadAI and Robotics

Oct 15, 2013 (3 years and 2 months ago)

55 views

T
rain test report


read.matrix.csr
()

as.matrix
()

data.frame(label=train_y,train_x)


Naïve

Bayse:

command


> train <
-

read.matrix.csr('1000_train.r')

> traindata_x <
-

as.matrix(train$x)

> traindata_y <
-

as.matrix(train$y)

> traindata <
-

data.frame(label=tra
indata_y,traindata_x)

> model <
-

naiveBayes(label~.,traindata)

> test <
-

read.matrix.csr('1000_test.r')

> test_x <
-

as.matrix(test$x)

> test_y <
-

as.matrix(test$y)

> testresult <
-

predict(model,test_x)


> table(test_y,testresult)


/////////////////////////
/////////////////////////////////////

> temp_x <
-

as.matrix(part2_1000$x)

> temp_y <
-

as.matrix(part2_1000$y)

> traindata_x <
-

as.matrix(part3_1000$x)

> traindata_y <
-

as.matrix(part3_1000$y)

> traindata_x <
-

rbind(traindata_x,temp_x)

> traindata_y <
-

rbin
d(traindata_y,temp_y)


> test_x <
-

as.matrix(part2_1000$x)

> test_y <
-

as.matrix(part2_1000$y)

/////////////////////////////////////////////////////////////



e1071


package


naiveBayes(label~.,train_data)


function

“predict(model,test_data)”

function



F
eature 1000


part10 for test


testresult

test_y 0 1


0 242 0


1 49 0

A
cc:

0.83161512027491408934707903780069


P
art01 for test


testresult

test_y 0 1


0 241 0


1 48 0

A
cc:

0.83391003460207612456747404844291


P
art
02 for test


testresult

test_y 0 1


0 241 0


1 48 0

A
cc:

0.83391003460207612456747404844291


P
art03 for test


testresult

test_y 0 1


0 241 0


1 48 0

A
cc:

0.83391003460207612456747404844291


P
art04 for test


testresult

test_y 0 1


0 241 0


1 48 0

A
cc:

0.83391003460207612456747404844291


P
art05 for test


testresult

test_y 0 1


0 242 0


1 48 0

A
cc:

0.83448275862068965517241379310345


P
art06 for test


testresult

test_y

0 1


0 241 0


1 48 0

A
cc:

0.83391003460207612456747404844291


P
art07 for test


testresult

test_y 0 1


0 241 0


1 48 0

A
cc:

0.83391003460207612456747404844291


P
art08 for test


testresult

test_y 0 1


0 241

0


1 48 0

A
cc:

0.83391003460207612456747404844291


P
art09 for test


testresult

test_y 0 1


0 241 0


1 48 0

A
cc:

0.83391003460207612456747404844291


////////////////////////////////////////////////////////////////////////////
////////////////

F
eature 100


P
art10 for test


testresult

test_y 0 1


0 193 49


1 15 34

A
cc:

0.78006872852233676975945017182131


P
art01 for test


testresult

test_y 0 1


0 217 24


1 9 39

A
cc:

0.8858131487889273356401
384083045


P
art02 for test


testresult

test_y 0 1


0 201 40


1 6 42

A
cc:

0.84083044982698961937716262975779


P
art03 for test


testresult

test_y 0 1


0 206 35


1 10 38

A
cc:

0.84429065743944636678200692041522


P
art04
for test


testresult

test_y 0 1


0 209 32


1 12 36

A
cc:

0.84775086505190311418685121107266


P
art05 for test


testresult

test_y 0 1


0 212 30


1 23 25

A
cc:

0.81724137931034482758620689655172


P
art06 for test


tes
tresult

test_y 0 1


0 220 21


1 9 39

A
cc:

0.89619377162629757785467128027682


P
art07 for test


testresult

test_y 0 1


0 211 30


1 13 35

A
cc:

0.8512110726643598615916955017301


P
art08 for test


testresult

test_y 0

1


0 207 34


1 15 33

A
cc:

0.83044982698961937716262975778547


P
art09 for test


testresult

test_y 0 1


0 210 31


1 11 37

A
cc:

0.85467128027681660899653979238754




////////////////////////////////////////////////////////////
/////////////


F
eature 10


P
art10 for test


testresult

test_y 0 1


0 195 47


1 24 25



/////////////////////////////////////////////////////////////////////////

F
eature 3_1000


P
art10 for test


testresult

test_y 0 1


0 242

0


1 49 0




/////////////////////////////////////////////////////////////////////////


F
eature 3_100


P
art10 for test


testresult

test_y 0 1


0 241 1


1 48 1

A
cc:

0.83161512027491408934707903780069


P
art01 for test


tes
tresult

test_y 0 1


0 227 14


1 19 29

A
cc:

0.8858131487889273356401384083045


P
art02 for test


testresult

test_y 0 1


0 240 1


1 45 3

A
cc:

0.84083044982698961937716262975779


P
art03 for test


testresult

test_y 0

1


0 214 27


1 18 30

A
cc:

0.84429065743944636678200692041522


P
art04 for test


testresult

test_y 0 1


0 240 1


1 44 4

A
cc:

0.84429065743944636678200692041522


P
art05 for test


testresult

test_y 0 1


0 221 21


1 30 18

A
cc:

0.82413793103448275862068965517241


P
art06 for test


testresult

test_y 0 1


0 222 19


1 17 31

A
cc:

0.87543252595155709342560553633218


P
art07 for test


testresult

test_y 0 1


0 222 19


1 24 24

A
c
c:

0.8512110726643598615916955017301


P
art08 for test


testresult

test_y 0 1


0 219 22


1 32 16

A
cc:

0.81314878892733564013840830449827


P
art09 for test


testresult

test_y 0 1


0 221 20


1 21 27

A
cc:

0.85813148788927
335640138408304498



//////////////////////////////////////////////////////////////////////////////



F
eature 3_10


P
art10 for test


testresult

test_y 0 1


0 202 40


1 31 18



///////////////////////////////////////////////////


F
eature

5_100


P
art01 for test


testresult

test_y 0 1


0 241 0


1 48 0


P
art02 for test