Skip to content

Use Kalman feature subset for model training - #20

Open
holguinmora123 wants to merge 1 commit into
mainfrom
codex/check-model-training-in-notebook-e0x7ez
Open

Use Kalman feature subset for model training#20
holguinmora123 wants to merge 1 commit into
mainfrom
codex/check-model-training-in-notebook-e0x7ez

Conversation

@holguinmora123

Copy link
Copy Markdown
Owner

Summary

  • Dynamically select training features from kal_3 onward while keeping label as the target
  • Align meta-model and inference routines with new kal_3+ feature set
  • Convert non-numeric feature columns (e.g. datetimes, categories) to numeric values before training or inference

Testing

  • pytest

https://chatgpt.com/codex/tasks/task_e_68c34b642520832892e0355dfbc2b8c1

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +4910 to +4913
"lab.loc[valid & (lab[result_field] > 0.5) & (lab[result_field] <= 1.0), 'label'] = 1\n",
"lab.loc[valid & (lab[result_field] > 1.0), 'label'] = 2\n",
"\n",
"# --- Mantene

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Avoid NameError when running inference standalone

The new inference helpers now call _ensure_numeric_df to coerce feature dtypes, but this function is only defined earlier in the notebook’s training section. When a user loads the saved models and runs the inference cells in a fresh session—as the code is intended to support—the first call to apply_base_model_to_test raises NameError: name '_ensure_numeric_df' is not defined. Previously these cells were self‑contained and did not depend on the training helpers. Consider copying the helper into the inference block or importing it so that inference works without re‑running the training notebook.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant