@Override public double[][] rankedAttributes() throws Exception {
  if (m_rankedAtts == null || m_rankedSoFar == -1) {
    throw new Exception("Search must be performed before attributes " + "can be ranked.");
  }
  m_doRank=true;
  search(m_ASEval,null);
  double[][] final_rank=new double[m_rankedSoFar][2];
  for (int i=0; i < m_rankedSoFar; i++) {
    final_rank[i][0]=m_rankedAtts[i][0];
    final_rank[i][1]=m_rankedAtts[i][1];
  }
  resetOptions();
  m_doneRanking=true;
  if (m_numToSelect > final_rank.length) {
    throw new Exception("More attributes requested than exist in the data");
  }
  if (m_numToSelect <= 0) {
    if (m_threshold == -Double.MAX_VALUE) {
      m_calculatedNumToSelect=final_rank.length;
    }
 else {
      determineNumToSelectFromThreshold(final_rank);
    }
  }
  return final_rank;
}

@ Override public double [ ] [ ] rankedAttributes ( ) throws Exception { if ( m_rankedAtts == null || m_rankedSoFar == - 1 ) { throw new Exception ( "Search must be performed before attributes " + "can be ranked." ) ; } m_doRank = true ; search ( m_ASEval , null ) ; double [ ] [ ] final_rank = new double [ m_rankedSoFar ] [ 2 ] ; for ( int i = 0 ; i < m_rankedSoFar ; i ++ ) { final_rank [ i ] [ 0 ] = m_rankedAtts [ i ] [ 0 ] ; final_rank [ i ] [ 1 ] = m_rankedAtts [ i ] [ 1 ] ; } resetOptions ( ) ; m_doneRanking = true ; if ( m_numToSelect > final_rank . length ) { throw new Exception ( "More attributes requested than exist in the data" ) ; } if ( m_numToSelect <= 0 ) { if ( m_threshold == - Double . MAX_VALUE ) { m_calculatedNumToSelect = final_rank . length ; } else { determineNumToSelectFromThreshold ( final_rank ) ; } } return final_rank ; }
produces a ranked list of attributes . search must have been performed prior to calling this function . search is called by this function to complete the traversal of the the search space . a list of attributes and merits are returned . the attributes a ranked by the order they are added to the subset during a forward selection search . individual merit values reflect the merit associated with adding the corresponding attribute to the subset ; because of this , merit values may initially increase but then decrease as the best subset is " passed by " on the way to the far side of the search space .
