Neural Network with WEKA รวมปัญหาที่เกิดขึ้น

ในระหว่างที่ทำตาม Workshop: Neural Network with WEKA หลายๆคนอาจจะประสบปัญหาในระหว่างการทำงาน ผมเลยได้รวมรวมข้อมูลไว้ ดังนี้ครับ

  1. ปัญหา Train and test set are not compatible
    สาเหตุ: เกิดจากไฟล์ .arff ของเรามีส่วนการประกาศ attribute ที่ไม่เหมือนกัน หรืออาจะมี Character บางตัวแปลกปลอมอยู่ในไฟล์

    ฉบับภาษาอังกฤษ
      1.Make sure that the train and test sets have EXACTLY the same attributes (fields),including last entry:@attribute Class {MED,MGL,RHB,EPD,JPA}
      2.If the attribute descriptions appear to be identical but you still get the same error, you may have an invisible control character in one of the files. Remove the attribute descriptions from the test file and replace them with the attribute descriptions from the train file. That may help.
      3.You can also run Weka from the command line, e.g.java weka.classifiers.IB1 -t train_file.arff -T test_file.arff -p 0

    5_1

    วิธีแก้: ให้เปิดไฟล์ Customer_for_std_train.arff จากนั้นดูในส่วน Attribute Descriptions คัดลอก และไปวางในอีกไฟล์นึง เพราะคอม แต่ละเครื่องมัน Generate ออกมาได้ไม่เหมือนกัน และตรวจสอบถึงอักขระพิเศษที่แปลกปลอมอยู่ในไฟล์ โดยในที่นี้ใช้โปรแกรม Notepad++
    5_2

  2. ปัญหา nominal value not declare in header
    สาเหตุ: ค่าที่เป็น nominal ไม่ตรงกับค่าที่ประกาศที่ส่วนหัว >> attribute
    วิธีแก้: ไปลบช่องว่างออกให้หมด
    5_3

Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts to your email.