Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Forest vs tree#2

Open
deepakpandita57 wants to merge 13 commits into
google-research:mainfrom
Homan-Lab:forest_vs_tree
Open

Forest vs tree#2
deepakpandita57 wants to merge 13 commits into
google-research:mainfrom
Homan-Lab:forest_vs_tree

Conversation

@deepakpandita57

Copy link
Copy Markdown

Summary of the changes:

  • Support for multiprocessing to run trials in parallel and compression to save storage space
  • Support for categorical responses and associated metrics
  • Methods used to run experiments reported in the Forest vs Tree paper and the EACL paper
  • Some minor changes to replace sklearn mean_squared_error() with root_mean_squared_error() as the former method is deprecated

Comment thread cat_machine_contest_metrics.py
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Added missing docstrings, cleaned up irrelevant docstrings, and split code into multiple lines to avoid exceeding 80 chars.
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics.py Outdated
Comment thread cat_machine_contest_metrics_test.py Outdated
@tripperroc

tripperroc commented Feb 26, 2026 via email

Copy link
Copy Markdown

Comment thread categorical_sample.py
_COMPUTE_ACTUAL_P_VALUES = flags.DEFINE_boolean(
"compute_actual_p_values",
False,
"If true use categorical params directly to compute metrics and p-values.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Give a pointer to the formula that would be used to compute an "actual" (analytic?) p-value.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This does not refer to the analytic p-values. Here it means that the categorical parameters sampled are directly used for p-value calculation.

Comment thread categorical_sample.py Outdated
Comment thread categorical_sample.py Outdated
Comment thread categorical_sample_lib.py Outdated
Comment thread categorical_sample_lib.py
Comment thread categorical_sample_lib.py
Comment thread categorical_sample_lib.py
n_items: int = 1000,
k_responses: int = 5,
m_categories: int = 3,
alpha: List[float] = [0.6, 0.1, 0.3],

@pk-at-g pk-at-g Mar 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why these default values? Note: they're different from the _ALPHA flag default values.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No particular reason, except this is the fraction of categories in the DICES dataset. I have changed the flag values to match these, but I'm open to your suggestions.

Comment thread parameterized_sample_lib.py Outdated
Comment thread parameterized_sample_lib.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants