-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code reorganization #183
Open
aosojnik
wants to merge
41
commits into
Waikato:master
Choose a base branch
from
aosojnik:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Code reorganization #183
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Multitarget into master
Conflicts: moa/src/main/java/moa/classifiers/core/conditionaltests/NumericAttributeBinaryTest.java moa/src/main/java/moa/classifiers/multilabel/LocalMultiTargetClassifier.java moa/src/main/java/moa/classifiers/multilabel/meta/MTOzaBag.java moa/src/main/java/moa/classifiers/multilabel/trees/ISOUPTree.java moa/src/main/java/moa/classifiers/trees/FIMTDD.java moa/src/main/java/moa/classifiers/trees/ORTO.java moa/src/main/java/moa/tasks/EvaluatePrequentialMultiTarget.java
This reverts commit 02d2683.
This reverts commit 5dec8c1.
This reverts commit 4e3116a.
from the 2015.10 prerelease version, so the pom files were updated back to the 2014.04 version)
Update README.md
This reverts commit 02d2683.
This reverts commit 5dec8c1.
This reverts commit 4e3116a.
from the 2015.10 prerelease version, so the pom files were updated back to the 2014.04 version)
Waikato-master # Conflicts: # moa/src/main/java/com/yahoo/labs/samoa/instances/Attribute.java # moa/src/main/java/com/yahoo/labs/samoa/instances/InstanceImpl.java # moa/src/main/java/moa/classifiers/multilabel/MultilabelHoeffdingTree.java # moa/src/main/java/moa/classifiers/multilabel/trees/ISOUPTree.java # moa/src/main/java/moa/classifiers/trees/FIMTDD2.java # moa/src/main/java/moa/classifiers/trees/ORTO2.java # moa/src/main/java/moa/clusterers/clustree/ClusTree.java # moa/src/main/java/moa/tasks/EvaluatePeriodicHeldOutTest.java # moa/src/main/java/moa/tasks/EvaluatePrequentialMultiTarget.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reorganized learners
The learners are now grouped together in the learners package. It is further divided into clusterers and predictors. All tasks now have separate interfaces (Classifier, Regressor, MultiLabelClassifier, MultiTargetRegressor, as well as semi-supervised versions) which all extend the InstanceLearner interface - most of the methods have been moved here and have been standardized. In particular, there is only one Instance type (MultiLabelInstance has been merged into Instance) and all predictors return a Prediction object (getVotesForInstance has been replaced with getPredictionForInstance).
Predictions rework
Each predictive task now has its own prediction, all implement the Prediction interface. Predictions also have convenience methods to convert them to doubles or double arrays, whichever is appropriate.
Extracted abstract methods
Where applicable, I've extracted the abstract parts of classes - most notably for ensemble methods. For example, AbstractOzaBag now covers the logic of online bagging regardless of the task, while individual OzaBag classes fill in the missing details, e.g., combination of predictions. There are now more OzaBag classes, one for each task (classification, regression, etc.). They are organized in subpackages such that there is no need for OzaBagClassification or OzaBagRegression, etc. - this is also supposed to lead to a better user experience.
Reorganized tasks
In a similar way, I've also extracted abstract parts of the tasks - resulting in, e.g., AbstractEvaluatePrequential, which codes most of the behaviour of the prequential evaluation. Each learner type then has it's own implementation of the details. This is not very extensive as there are many classification-based tasks which have not yet been used for other predictive modelling tasks.
Core multi-label and multi-target classes reorganization
Many core multi-label and multi-target classes (such as attribute class observers, split criteria, etc.) had been located in the rules.multilabel subpackage. I moved them into the appropriate subpackages in the core package. Notably, a lot of these were tied directly to the implementation of AMRules, making them less reusable by other methods. I would urge the current maintainer of AMRules to make these classes more usable.
Merging of Instances and InstancesHeader
I merged the Instances and InstancesHeader classes as they mostly provided the same functionality, with one just omitting the actual reference to the Instances. An empty header can now be retrieved by using the getEmtpyHeader method.
ArffLoader rework
ArffLoader and ArffFileStream have reworked to allow for easier selection of input and output attributes. Multiple output attributes can now be selected as a list or a range. I also added support for shortcuts such as -1, -2, etc. By default all non-output attributes are selected, but the input attributes can also be fine tuned in the same way as the output attributes. InstanceInformation and AttributeInformation have been adjusted accordingly.