Generate J-quantile cut expressions for a continuous variable
Source:R/get_FSdata_helpers.R
cut_var_jq.RdFor a continuous variable, returns J cut expressions of the
form "X <= qj(X, k, J + 1)" for k = 1, ..., J. These
J cut points are placed at the (k/(J+1))-th empirical
quantiles of X and partition its range into J + 1
non-overlapping intervals
$$[\min(X), c_1),\ [c_1, c_2),\ \ldots,\ [c_J, \max(X)]$$
where \(c_k\) is the (k/(J+1))-th quantile of X. Note the cut
expressions themselves are nested half-spaces (each is a subset of
the next); ForestSearch consumes them as binary candidate factors
and combines them via intersection during the search.
Details
Expressions are emitted in deferred form (with literal qj(...)
calls inside the string) so that they are correctly recomputed when
the same expression is processed against a different data subset
(e.g., a bootstrap replicate). They are subsequently resolved to
literal numerics by process_conf_force_expr().