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

Refactor tensor_map_m to improve nomenclature & move phase_space_bin_t to cloud-microphysics #192

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

rouson
Copy link
Contributor

@rouson rouson commented Aug 12, 2024

No description provided.

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.
@rouson rouson merged commit 710aeb7 into main Aug 12, 2024
6 checks passed
@rouson rouson deleted the tensor-map branch August 12, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant