Skip to content

Commit

Permalink
Gets rounded values for discrete features.
Browse files Browse the repository at this point in the history
shared.Instance#getDiscrete(int i) should not flatten double-valued
features. Rounding is more appropriate.
  • Loading branch information
shashir committed Mar 24, 2014
1 parent 9745ce1 commit 4f26aa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ ABAGAIL.jar
*.war
*.ear
manifest.mf
/bin
2 changes: 1 addition & 1 deletion src/shared/Instance.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public double getContinuous(int i) {
* @return the value
*/
public int getDiscrete(int i) {
return (int) data.get(i);
return (int) Math.round(data.get(i));
}

/**
Expand Down

0 comments on commit 4f26aa5

Please sign in to comment.