Learn R Programming

fastml (version 0.7.7)

validate_defaults_registry: Validate Defaults Registry Against Parsnip

Description

Compares the hardcoded parsnip default engines in fastml's registry against the actual defaults reported by parsnip::show_engines(). Returns a list of any mismatches found, which may indicate that parsnip has updated its defaults since fastml's registry was last updated.

Usage

validate_defaults_registry()

Arguments

Value

A list of mismatches. Each element is a list with components:

algorithm

The algorithm name.

fastml_default

The default engine recorded in fastml's registry.

parsnip_default

The actual default engine from parsnip.

Returns an empty list if no mismatches are found.

Details

This function queries parsnip for model specifications and compares against the hardcoded parsnip_defaults list in get_parsnip_default_engine(). Mismatches may occur when:

  • Parsnip updates its default engine for a model type

  • New engines are added to parsnip that become the new default

  • fastml's registry has not been updated after a parsnip release

This validation is intended for package maintenance and testing purposes.

Examples

Run this code
if (FALSE) {
mismatches <- validate_defaults_registry()
if (length(mismatches) > 0) {
  message("Found ", length(mismatches), " mismatch(es) with parsnip defaults")
}
}

Run the code above in your browser using DataLab