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

Final Model Output Unit Test - Stats Test - SI units #45

Open
kyle-messier opened this issue Sep 19, 2023 · 3 comments
Open

Final Model Output Unit Test - Stats Test - SI units #45

kyle-messier opened this issue Sep 19, 2023 · 3 comments
Labels
models Related to base or meta learner fitting test-driven development

Comments

@kyle-messier
Copy link
Collaborator

No description provided.

@kyle-messier
Copy link
Collaborator Author

related to "reasonable mean" - the value should be within the expected for the SI unit. Could also have a field/variable name that specifies the SI units

@sigmafelix
Copy link
Collaborator

As briefly discussed in #44 , the inclusion of SI units into field/variable names needs to be considered in relation to other discussion points including:

  1. If we keep the full covariate list with SI units as a RDS file in the package, short names will be fine for the covariate data frame.
  2. We can include a separate slot for metadata inside NetCDF files.
  3. units package, which leverages udunit2 and is usually used with sf, is a good tool to keep units with the covariate values
library(units)
#> udunits database from /Users/songi2/Library/R/arm64/4.3/library/units/share/udunits/udunits2.xml
# length
(distance_km = set_units(15, "km"))
#> 15 [km]
(distance_mi = set_units(distance_km, "mi"))
#> 9.320568 [mi]

# complex units
(thermal_kj = set_units(1e4, "kJ*km^-2"))
#> 10000 [kJ/km^2]
(thermal_calories = set_units(thermal_kj, "kcal*mi^-2"))
#> 6186.08 [kcal/mi^2]

# basically dimensionless; but we can keep this unit with values
(moisture_kgkg = set_units(0.25, "kg*kg^-1"))
#> 0.25 [kg/kg]
is.numeric(moisture_kgkg)
#> [1] TRUE

Created on 2023-09-19 with reprex v2.0.2

@mitchellmanware mitchellmanware added the models Related to base or meta learner fitting label Jan 27, 2025
@mitchellmanware
Copy link
Collaborator

still need performance-based unit tests for base and meta learners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
models Related to base or meta learner fitting test-driven development
Projects
None yet
Development

No branches or pull requests

3 participants