Skip to content

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

Merged
rouson merged 7 commits into
mainfrom
tensor-map
Aug 12, 2024
Merged

Refactor tensor_map_m to improve nomenclature & move phase_space_bin_t to cloud-microphysics#192
rouson merged 7 commits into
mainfrom
tensor-map

Conversation

@rouson

@rouson rouson commented Aug 12, 2024

Copy link
Copy Markdown
Contributor

No description provided.

rouson added 7 commits August 11, 2024 15:04
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
@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