Cho mình hỏi về predict qua cây sinh ra từ ID3.
Mình đã sinh ra cây từ thuật toán ID3 nhưng đến phần predict thì lại ko chạy được. Phần thuộc tính NameIsSecret
phải xử lí như thế nào? Đưa vào thì không thể đọc được NameIsSecret
do animalname
không có giá trị này. Nếu chuyển sang ?
thì lại không predict được (5 bộ đều bị lỗi).
Mọi người xử lí như thế nào?
@relation ID3_zoo_predict
@attribute animalname {aardvark, antelope, bear, boar, buffalo, calf, cavy, cheetah, deer, dolphin, elephant, fruitbat, giraffe, girl, goat, gorilla, hamster, hare, leopard, lion, lynx, mink, mole, mongoose, opossum, oryx, platypus, polecat, pony, porpoise, puma, pussycat, raccoon, reindeer, seal, sealion, squirrel, vampire, vole, wallaby, wolf, chicken, crow, dove, duck, flamingo, gull, hawk, kiwi, lark, ostrich, parakeet, penguin, pheasant, rhea, skimmer, skua, sparrow, swan, vulture, wren, pitviper, seasnake, slowworm, tortoise, tuatara, bass, carp, catfish, chub, dogfish, haddock, herring, pike, piranha, seahorse, sole, stingray, tuna, frog, newt, toad, flea, gnat, honeybee, housefly, ladybird, moth, termite, wasp, clam, crab, crayfish, lobster, octopus, scorpion, seawasp, slug, starfish, worm}
@attribute hair {0,1}
@attribute feathers {0,1}
@attribute eggs {0,1}
@attribute milk {0,1}
@attribute airborne {0,1}
@attribute aquatic {0,1}
@attribute predator {0,1}
@attribute toothed {0,1}
@attribute backbone {0,1}
@attribute breathes {0,1}
@attribute venomous {0,1}
@attribute fins {0,1}
@attribute legs {0,2,4,5,6,8}
@attribute tail {0,1}
@attribute domestic {0,1}
@attribute catsize {0,1}
@attribute type {1,2,3,4,5,6,7}
@data
NameIsSecret,1,0,0,1,0,0,0,1,1,1,0,0,4,1,0,1,?
NameIsSecret,0,1,1,0,1,0,0,0,1,1,0,0,2,1,1,0,?
NameIsSecret,0,0,1,0,0,0,1,1,1,1,1,0,0,1,0,0,?
NameIsSecret,0,0,1,0,0,1,1,1,1,0,0,1,0,1,0,0,?
NameIsSecret,0,0,1,0,0,1,1,1,1,1,0,0,4,1,0,0,?