Skip to content
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

Redesign Data Input/Output Interface #6

Merged
merged 18 commits into from
Aug 15, 2018
Merged

Conversation

JasbirShah
Copy link
Collaborator

Changes

The current DataManager class was only designed with the prototype in mind, and so isn't suitable for meeting all of our requirements. It will need to be redesigned to support our final implementation as follows, Datasets will be stored as a Hashmap<String, Feature> where a Feature is a class containing the following:

  • ArrayList originalData - A list of each value in the dataset for the feature. Stores the original input data, does not change
  • ArrayList processedData - A list of each value in the dataset after selected transforms are applied
  • Normalise normalise - a class containing information about the max and min values to normalise between
  • Smoothing smoothing - a class containing information about how to smooth the data
  • Etc for the rest of the data preprocessing options
  • void process() - a function which will check each transform and apply them in a pre-defined order if they exist

This will allow us to store data by feature rather than by row, which will also make it much more efficient to access and modify. As two sets of data are stored for each feature: the original input, and the other with transformations applied, we'll be able to easily rollback/reverse transformations on-demand.

Going forward, users will also have to select whether their file has a header row. If there is one, the headers will be read in as is, other wise we'll generate a header row for them using A-Z, AA-ZZ, etc., in place of feature names.

JasbirShah and others added 14 commits May 27, 2018 23:47
Refactor: moved ExpressionChromosome to the expression package.
Feature: Added methods to TreeChromosome.
Feature: Added methods to LinearChromosome.
Refactor: Removed LinearExpressionChromosome.
Refactor: ExpressionChromosome now implements both TreeChromosome and LinearChromosome.
Refactor: Removed dead code from MeanSquaredError.
Feature: Implemented Cloneable for ExpressionChromosome.
Documentation: documented the 'Chromosome' and 'Expression' packages.
Documentation: made some minor style changes to the documentation of DefaultObjective and ErrorBasedObjective.
Feature: added a base factory class for producing chromosomes and a factory for expression chromosomes.
Refactor: changed existing classes to use chromosome factories.
Refactor: changed the method for adding functional primitives to a chromosome factory to accept a variable number of arguments.
Documentation: documented most of the ExpressionChromosomeFactory class
Refactor: changed ChromosomeFactory::addFunction to accept a list and refactored all users of the method.
Bugfix: ChromosomeFactory::addFunction was attempting to add functions to a clone instead of the actual class member.
Documentation: feeatures are like better features, but we're saving those for Iconic Plus.
Testing: ExpressionChromosomeFactory now has a test suite and ExpressionChromosome's test has been updated for easier reuse.
Documentation: added some brief documentation to all the tests.
…r from finished. More methods and refactoring will be required.
Bugfix: if containsHeader was set to false the statement to fill the header row wouldn't be executed.
Refactor: changed raw arrays to collection types.
Refactor: FeatureClass now keeps track of whether or not it's an expected output.
Refactor: Added a NumericFeatureClass subclass specifically for dealing with numeric types.
Refactor: Added a Preprocessor superclass for preprocessors.
Bugfix: Objectives and chromosomes now use the new input system. It probably works, but please add a regression suite.
Misc: commented out the code in the GUI workspace controller that enabled data normalisation. We're moving to preprocessors so we're better off rewriting it instead.
Warning: the changes to Objectives and Chromosomes are temporary workarounds to enable testing, they'll need to be changed later on.
@JasbirShah JasbirShah added enhancement New feature or request api Related to the application programming interface. labels Aug 12, 2018
@JasbirShah JasbirShah added this to the 0.2.0 milestone Aug 12, 2018
@ScottWalkerAU
Copy link
Collaborator

Remove WIP tag when you're ready for a merge

@JasbirShah JasbirShah changed the title WIP: Redesign Data Input/Output Interface Redesign Data Input/Output Interface Aug 15, 2018
@JasbirShah JasbirShah merged commit 86257eb into master Aug 15, 2018
@JasbirShah JasbirShah deleted the feature/newdatastruct branch August 15, 2018 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the application programming interface. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants