Using some Java8 features on DecisionTreeLearner and DataSet by AdrianBZG · Pull Request #296 · aimacode/aima-java

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@AdrianBZG

Copy link Copy Markdown

@AdrianBZG AdrianBZG commented

Mar 31, 2017

edited

Loading

Just a few changes, using Java8 features:

  • Check allExampleHaveSameClassification: DecisionTreeLearner.java (L139-L143) and chooseAttribute (L122-L137) on commit f20a270

  • Check calculateGainFor on DataSet.java (L101-114)

@AdrianBZG AdrianBZG force-pushed the AIMA3e branch 2 times, most recently from 016942b to 55fc621 Compare

March 31, 2017 12:20

@ctjoreilly

Copy link Copy Markdown

Contributor

ctjoreilly commented

Mar 31, 2017

edited

Loading

Hi,

The AIMA4e branch is the intended target for introducing JDK 8 features. While AIMA3e is now based on JDK 8 as well these types of changes to its source base are unnecessary. Also, switching to streams() for the sake of using streams() is not necessarily a good idea. See the discussion here:

https://blog.jooq.org/2015/12/08/3-reasons-why-you-shouldnt-replace-your-for-loops-by-stream-foreach/

If you can just fix the glitch and test case in a clean/separate pull request I'll re-review.

Best

Ciaran

@ctjoreilly ctjoreilly closed this

Mar 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@AdrianBZG @ctjoreilly