726168136e
Records mode is already a feature matrix: a row is one coordinate tuple and
each measure is its own column (gotcha 1). `dataset::feature_table` enumerates
the same rows against the user's own view and lays them out as the string
table `gp_tree::data::preprocess` reads; `dataset::dataset` runs it through
preprocess so one-hot expansion, imputation and the feature ranges stay in
gp-tree.
Four selection rules settled here, each recorded on the module:
* rows are scoped by `View::filtering_cats()` (Page union Filter), not by
`categories_on(Axis::Page)` -- gotcha 27's trap, and the one that fails
silently.
* hidden items scope the rows and the feature columns ("fit what I can see");
an explicitly named target is exempt.
* every regular category is a feature whatever axis it sits on, including
Axis::None, because a coordinate is part of what makes a record distinct --
dropping it leaves two rows with equal feature vectors and different
targets. Label categories are excluded, as in records mode, by not being
`is_regular`.
* no formula-derived value enters the matrix at all: a formula target is not a
feature, and is refused *as* the target. One rule covers both halves of the
ticket's "the target, or a formula depending on it", with no dependency
analysis to get wrong.
Records are sorted by coordinate tuple: `DataStore::matching_cells` walks a
HashSet, so an unsorted table would make a seeded fit reproducible only within
one process. Numbers reach the table via `f64::to_string`, never `format_f64`
(gotcha 8). Nothing prints; skipped records come back in `warnings` (gotcha
37).
improvise-gp gains improvise-core as a real dependency (it was already a
dev-dependency).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EoW5BB87ZZdm96SvBTWawH
15 lines
405 B
TOML
15 lines
405 B
TOML
[package]
|
|
name = "improvise-gp"
|
|
version = "0.1.0-rc2"
|
|
edition = "2024"
|
|
description = "Bridge between gp-tree's fitted decision trees and improvise formulas"
|
|
license = "Apache-2.0"
|
|
repository = "https://github.com/fiddlerwoaroof/improvise"
|
|
|
|
[dependencies]
|
|
gp-tree = { path = "../gp-tree" }
|
|
improvise-core = { path = "../improvise-core" }
|
|
improvise-formula = { path = "../improvise-formula" }
|
|
anyhow = "1"
|
|
|