object

lasso_feature_selector

Regression feature selection by maximum absolute Lasso coefficient per original feature, with optional deterministic holdout regularization search. Search requires two usable rows.

Availability:
logtalk_load(lasso_feature_selector(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-10-07
Compilation flags:
static, context_switching_calls
Remarks:
(none)

Public predicates

(no local declarations; see entity ancestors if any)

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

usable_examples/3

Counts known numeric targets after shared dataset validation.

Compilation flags:
static
Template:
usable_examples(Examples,Dataset,Count)
Mode and number of proofs:
usable_examples(+list(compound),+object_identifier,-non_negative_integer) - one_or_error
Exceptions:
A known target is not numeric:
type_error(number,Target)
No known target remains:
domain_error(non_empty_examples,Dataset)

count_numeric_targets/2

Counts numeric targets while skipping unbound targets.

Compilation flags:
static
Template:
count_numeric_targets(Examples,Count)
Mode and number of proofs:
count_numeric_targets(+list(compound),-non_negative_integer) - one_or_error
Exceptions:
A known target is not numeric:
type_error(number,Target)

check_search_count/1

Requires at least two known numeric targets for holdout search.

Compilation flags:
static
Template:
check_search_count(Count)
Mode and number of proofs:
check_search_count(+non_negative_integer) - one_or_error
Exceptions:
Fewer than two usable rows remain:
domain_error(lasso_search_examples,Count)

group_scores/3

Consumes exact encoder blocks and returns original feature scores in encoder order.

Compilation flags:
static
Template:
group_scores(Encoders,Weights,Scores)
Mode and number of proofs:
group_scores(+list(compound),+list(float),-list(pair)) - zero_or_one

encoder_block/3

Returns an encoder name and its number of coefficient columns.

Compilation flags:
static
Template:
encoder_block(Encoder,Feature,Count)
Mode and number of proofs:
encoder_block(+compound,-atom,-positive_integer) - zero_or_one

block_maximum/5

Consumes a coefficient block and computes its maximum absolute weight.

Compilation flags:
static
Template:
block_maximum(Count,Weights,Maximum0,Maximum,Remaining)
Mode and number of proofs:
block_maximum(+non_negative_integer,+list(float),+float,-float,-list(float)) - zero_or_one

select_active/3

Applies the selection strategy only to groups strictly above the coefficient cutoff.

Compilation flags:
static
Template:
select_active(Scores,Options,Selected)
Mode and number of proofs:
select_active(+list(pair),+list(compound),-list(atom)) - one

active_scores/3

Retains scores strictly above the coefficient cutoff.

Compilation flags:
static
Template:
active_scores(Scores,Cutoff,Active)
Mode and number of proofs:
active_scores(+list(pair),+number,-list(pair)) - one

model_diagnostics/8

Builds counts, effective options, aggregation metadata, and complete nested learner diagnostics.

Compilation flags:
static
Template:
model_diagnostics(Regressor,Scores,Selected,OriginalCount,UsableCount,Options,SearchResult,Diagnostics)
Mode and number of proofs:
model_diagnostics(+compound,+list(pair),+list(atom),+positive_integer,+positive_integer,+list(compound),+term,-list(compound)) - one

valid_model/1

Checks the retained regressor and recomputes scores, selection, and metadata without binding a partial input.

Compilation flags:
static
Template:
valid_model(Selector)
Mode and number of proofs:
valid_model(+ground) - zero_or_one
Exceptions:
The retained regressor is invalid:
domain_error(regressor,Regressor)
A stored option is invalid:
domain_error(option,Option)
A generated regularization bound exceeds backend floating-point limits:
evaluation_error(float_overflow)
Stored options are not a list:
type_error(list,Options)
A stored option is not compound:
type_error(compound,Option)

store_regressor_options/3

Replaces the first nested options occurrence with the learner effective options, preserving later occurrences.

Compilation flags:
static
Template:
store_regressor_options(Options,RegressorOptions,Stored)
Mode and number of proofs:
store_regressor_options(+list(compound),+list(compound),-list(compound)) - one

complete_regressor_options/2

Checks that each learner default option indicator has an effective value.

Compilation flags:
static
Template:
complete_regressor_options(Defaults,Options)
Mode and number of proofs:
complete_regressor_options(+list(compound),+list(compound)) - zero_or_one

valid_regularization_grid/1

Checks an explicit penalty list or an increasing bounded linear grid with at least two candidates.

Compilation flags:
static
Template:
valid_regularization_grid(Grid)
Mode and number of proofs:
valid_regularization_grid(@term) - zero_or_one

regularization_grid_values/2

Expands a validated linear grid to floating-point penalties or preserves an explicit penalty list.

Compilation flags:
static
Template:
regularization_grid_values(Grid,Values)
Mode and number of proofs:
regularization_grid_values(+term,-list(number)) - one_or_error
Exceptions:
A generated bound exceeds backend floating-point limits:
evaluation_error(float_overflow)

Operators

(none)