num_knots_generator: A default generator for the 'num_knots' argument for each...

View source: R/hal.R

num_knots_generatorR Documentation

A default generator for the num_knots argument for each degree of interactions and the smoothness orders.

Description

A default generator for the num_knots argument for each degree of interactions and the smoothness orders.

Usage

num_knots_generator(
  max_degree,
  smoothness_orders,
  base_num_knots_0 = 500,
  base_num_knots_1 = 200
)

Arguments

max_degree

interaction degree.

smoothness_orders

see fit_hal.

base_num_knots_0

The base number of knots for zeroth-order smoothness basis functions. The number of knots by degree interaction decays as base_num_knots_0/2^(d-1) where d is the interaction degree of the basis function.

base_num_knots_1

The base number of knots for 1 or greater order smoothness basis functions. The number of knots by degree interaction decays as base_num_knots_1/2^(d-1) where d is the interaction degree of the basis function.


hal9001 documentation built on Nov. 14, 2023, 5:08 p.m.