~ubuntu-branches/ubuntu/raring/weka/raring

« back to all changes in this revision

Viewing changes to weka/classifiers/meta/CVParameterSelection.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner, Soeren Sonnenburg, Torsten Werner
  • Date: 2008-08-10 21:27:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080810212705-tr8etpnkdx2ziktp
Tags: 3.5.8-1
[ Soeren Sonnenburg ]
* Bump Standards Version to 3.8.0.
* Remove references to non-free Java in debian/copyright.

[ Torsten Werner ]
* new upstream release
* Switch to openjdk-6.
* Move package to main.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import weka.core.Instances;
32
32
import weka.core.Option;
33
33
import weka.core.OptionHandler;
 
34
import weka.core.RevisionHandler;
 
35
import weka.core.RevisionUtils;
34
36
import weka.core.Summarizable;
35
37
import weka.core.TechnicalInformation;
36
38
import weka.core.TechnicalInformationHandler;
111
113
 * Options after -- are passed to the designated sub-classifier. <p>
112
114
 *
113
115
 * @author Len Trigg (trigg@cs.waikato.ac.nz)
114
 
 * @version $Revision: 1.35 $ 
 
116
 * @version $Revision: 1.37 $ 
115
117
*/
116
118
public class CVParameterSelection 
117
119
  extends RandomizableSingleClassifierEnhancer
125
127
   * cross-validation search parameter
126
128
   */
127
129
  protected class CVParameter 
128
 
    implements Serializable {
 
130
    implements Serializable, RevisionHandler {
129
131
    
130
132
    /** for serialization */
131
133
    static final long serialVersionUID = -4668812017709421953L;
227
229
      }
228
230
      return result;
229
231
    }
 
232
    
 
233
    /**
 
234
     * Returns the revision string.
 
235
     * 
 
236
     * @return          the revision
 
237
     */
 
238
    public String getRevision() {
 
239
      return RevisionUtils.extract("$Revision: 1.37 $");
 
240
    }
230
241
  }
231
242
 
232
243
  /**
275
286
      CVParameter cvParam = (CVParameter)m_CVParams.elementAt(i);
276
287
      double paramValue = cvParam.m_ParamValue;
277
288
      if (cvParam.m_RoundParam) {
278
 
        paramValue = (double)((int) (paramValue + 0.5));
 
289
        //      paramValue = (double)((int) (paramValue + 0.5));
 
290
        paramValue = Math.rint(paramValue);
279
291
      }
280
292
      if (cvParam.m_AddAtEnd) {
281
293
        options[--end] = "" + 
822
834
  }
823
835
  
824
836
  /**
 
837
   * Returns the revision string.
 
838
   * 
 
839
   * @return            the revision
 
840
   */
 
841
  public String getRevision() {
 
842
    return RevisionUtils.extract("$Revision: 1.37 $");
 
843
  }
 
844
  
 
845
  /**
825
846
   * Main method for testing this class.
826
847
   *
827
848
   * @param argv the options