Results 1 to 3 of 3
  1. #1
    aneuryzma is offline Member
    Join Date
    Aug 2008
    Posts
    46
    Rep Power
    0

    Default ArrayIndexOutOfBoundsException on classifyInstance, please help

    hi,

    I'm getting a java.lang.ArrayIndexOutOfBoundsException: 3

    at this line of my code: classifier.classifyInstance(unlabeled.instance(20) );

    I've a training data set train.arff and a dataset to label test.arff

    Since I'm quite stuck, and I don't understand where the issue is, I have some questions:

    - unlabeled.arff is supposed to have the class attributes ? Or should I remove it from the instances ?

    - My test.arff is exactly in the same format of training.arff. Same relation, etc... Should something be different instead ?

    - I'm applying to both files the same filter. So I really dunno what's wrong here. Please check the code for more details: #1726522 - Pastie

    and these are the files:
    train.arff #1726525 - Pastie
    test.arff #1726527 - Pastie

    thanks

    I'm quite stuck.
    thanks

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default

    Post the relevant code...most people won't click on downlaods.

    Then show us which line the error is occurring on.
    I have no idea what an arff file is, so a description of what the code you post is supposed to be doing might help.

  3. #3
    aneuryzma is offline Member
    Join Date
    Aug 2008
    Posts
    46
    Rep Power
    0

    Default

    i've solved, it was because of not correctly assigned filter to the test.arff

Similar Threads

  1. ArrayIndexOutOfBoundsException
    By er1c550n20 in forum New To Java
    Replies: 2
    Last Post: 04-07-2010, 06:50 PM
  2. ArrayIndexOutOfBoundsException
    By Corey in forum New To Java
    Replies: 5
    Last Post: 02-02-2010, 01:25 AM
  3. ArrayIndexOutOfBoundsException
    By flaskvacuum in forum New To Java
    Replies: 6
    Last Post: 07-14-2009, 05:36 PM
  4. ArrayIndexOutofBoundsException help
    By filly444 in forum New To Java
    Replies: 9
    Last Post: 09-03-2008, 05:16 PM
  5. ArrayIndexOutOfBoundsException
    By daredavil82 in forum New To Java
    Replies: 2
    Last Post: 12-14-2007, 09:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •