-
Notifications
You must be signed in to change notification settings - Fork 17
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
Data storage objects #102
Merged
Merged
Data storage objects #102
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
ilopezgp
reviewed
Feb 18, 2021
ilopezgp
reviewed
Feb 19, 2021
ilopezgp
approved these changes
Feb 19, 2021
bors r+ |
Build succeeded: |
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.
Purpose
Fixes #90
This PR adds
DataStorage.jl
containing objects to store singleton, or paired, data samples. The idea is to help ensure dimensionally consistent data (as these always store a 2D array where the samples are columns, so if in doubt - the data are columns), which has lead to numerous issues in the past. They also ensure that your input-output pairs for the emulator are safeguarded (e.g it checks consistent dimensions of samples).Users will need to specify orientation when they provide arrays (as to whether the data stored as a list of rows, or a list of columns), then internally they are arranged always as columns. Effectively therefore we are really just adding more rigid constructors for data arrays.
Contains:
DataContainer
object stores data as columnsPairedDataContainer
object stores 2DataContainer
objects, one for input data, one for output data. The number of samples is checked to be the same length in inputs and outputs, while the data dimensions can differ.src/Utilities
there is aget_training_points
function which returns aPairedDataContainer
PairedDataContainer
nowAlso...
vcat([X.first, X.last]...)
type lines in GP setup and replaced with interpretable loopConstruction example
DataContainer
To create a Data container simply create an array, and specify whether you consider data within as a list of columns, or not. e.g for 2D data and 10 samples
or for 10D data and 2 samples
Remember, the data is always stored as columns so
returns
true
PairedDataContainer
Can be constructed from 2
DataContainer
s of the same sample size.Or from arrays themselves, (so long as they have the same "samples" dimension)
and,
PairedDataContainer(column_store,column_store2)
throws a dimension mismatch error.