public static void prepareData(Instances data) throws Exception {
  String doptions[]=null;
  try {
    doptions=MLUtils.getDatasetOptions(data);
  }
 catch (  Exception e) {
    throw new Exception("[Error] Failed to Get Options from @Relation Name",e);
  }
  try {
    int c=(Utils.getOptionPos('C',doptions) >= 0) ? Integer.parseInt(Utils.getOption('C',doptions)) : Integer.parseInt(Utils.getOption('c',doptions));
    if (c < 0) {
      c=-c;
      data=F.mulan2meka(data,c);
    }
    data.setClassIndex(c);
  }
 catch (  Exception e) {
    throw new Exception("Failed to parse options stored in relation name; expected format for relation name:\n" + "  'name: options'\n" + "But found:\n"+ "  '" + data.relationName() + "'\n"+ "Format example:\n"+ "  'Example_Dataset: -C 3 -split-percentage 50'\n"+ "'-C 3' specifies the number of target attributes to be 3. See tutorial for more information.",e);
  }
}

public static void prepareData ( Instances data ) throws Exception { String doptions [ ] = null ; try { doptions = MLUtils . getDatasetOptions ( data ) ; } catch ( Exception e ) { throw new Exception ( "[Error] Failed to Get Options from @Relation Name" , e ) ; } try { int c = ( Utils . getOptionPos ( 'C' , doptions ) >= 0 ) ? Integer . parseInt ( Utils . getOption ( 'C' , doptions ) ) : Integer . parseInt ( Utils . getOption ( 'c' , doptions ) ) ; if ( c < 0 ) { c = - c ; data = F . mulan2meka ( data , c ) ; } data . setClassIndex ( c ) ; } catch ( Exception e ) { throw new Exception ( "Failed to parse options stored in relation name; expected format for relation name:\n" + "  'name: options'\n" + "But found:\n" + "  '" + data . relationName ( ) + "'\n" + "Format example:\n" + "  'Example_Dataset: -C 3 -split-percentage 50'\n" + "'-C 3' specifies the number of target attributes to be 3. See tutorial for more information." , e ) ; } }
prepares the class index of the data .
