Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. C45ModelSelection.java
  2.  
  3. ...
  4.  
  5. // Find "best" attribute to split on.
  6. minResult = 0;
  7. for (i=0;i<data.numAttributes();i++){
  8. if ((i != (data).classIndex()) &&
  9. (currentModel[i].checkModel()))
  10.  
  11. // Use 1E-3 here to get a closer approximation to the original
  12. // implementation.
  13. if ((currentModel[i].infoGain() >= (averageInfoGain-1E-3)) &&
  14. Utils.gr(currentModel[i].gainRatio(),minResult)){
  15. bestModel = currentModel[i];
  16. minResult = currentModel[i].gainRatio();
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement