Refactor tensor_map_m to improve nomenclature & move phase_space_bin_t to cloud-microphysics#192
Merged
Conversation
The tensor_range_t derived type stores components minima_ & maxima_ for us in in type-bound procedures that map from the training-data tensor-component ranges to the unit interval [0,1] according to x_mapped = (x_unmapped - x_min)/(x_max - x_min) The case in which x_mapped = x_unmapped can be recovered by setting x_min = 0 and x_max = 1. In such a case, however, [x_min,x_max] no longer corresponds to the tensor-component range. This commit therefore replaces "tensor_range" with "tensor_map" throughout this repository.
Consistent with the previous commits that renamed the derived type tensor_range_t to tensor_map_t and renamed one of the type's components from mimima_ to intercept_, this commit renames another component, maxima_, to slope_ map_from_training_range employs the formula x_unmapped = intercept + slope*x_mapped this matches the previous formula under the definition slope = maxima - minima and where x_mapped lies on the closed interval [0,1]. The commit also adjusts map_to_training_range to apply the inverse function. This commit also finishes editing the JSON file format to use the new nomenclature, in which a tensor_map object has intercept and slope components rather than minima and maxima components.
This file contains hidden or 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
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.
No description provided.