Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/explain pred #158

Merged
merged 21 commits into from
Jan 18, 2024
Merged

Feature/explain pred #158

merged 21 commits into from
Jan 18, 2024

Conversation

BaxterEaves
Copy link
Contributor

@BaxterEaves BaxterEaves commented Dec 14, 2023

Added

  • Added plot.state function in pylace to render PCC states
  • Added analysis.explain_prediction in pylace to explain predictions
  • Added plot.prediction_explanation in pylace to render prediction explanations
  • Added analysis.held_out_uncertainty in pylace
  • Added analysis.attributable_[neglogp | inconsistrncy | uncertainty] in pylace to quantify the amount of surprisal (neglogp), inconsistency, and uncertainty attributable to other features

Changed

  • Updated all packages to have the correct SPDX for the Business Source License
  • Removed internal implimentation of logsumexp in favor of rv::misc::logsumexp
  • Update to rv 0.16.2
  • Impute and prediction uncertainty are the mean total variation distance between each state's distribution and the average distribution divided by the potential max: (n-1) / n, where n is the number of states. This normalization is meant to ensure that the interpretation is the same regardless of the number of states -- zero is lowest, one is highest.

Fixed

  • Fixed issue that would cause random row order when indexing pylace Engines by a single (column) index, e.g., engine['column'] would return the columns in a different order every time the engine was loaded

@BaxterEaves BaxterEaves requested a review from a team as a code owner December 14, 2023 16:29
@BaxterEaves BaxterEaves changed the title DRAFT: Feature/explain pred Feature/explain pred Jan 15, 2024
.chain(f2.components().iter())
.map(|cpnt| (cpnt.mu(), cpnt.sigma()))
.collect::<Vec<_>>();
params.sort_unstable_by(|(a, _), (b, _)| a.total_cmp(b));
Copy link
Contributor

Choose a reason for hiding this comment

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

I learned something here! I didn't know about f64::total_cmp. Thanks!

Copy link
Contributor

@Swandog Swandog left a comment

Choose a reason for hiding this comment

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

I didn't see anything that looked like a problem, so LGTM!

Copy link
Contributor

@schmidmt schmidmt left a comment

Choose a reason for hiding this comment

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

😅 Done! Looks great!

@BaxterEaves BaxterEaves force-pushed the feature/explain-pred branch 3 times, most recently from 9b5bdcc to ac4a303 Compare January 17, 2024 22:01
@BaxterEaves BaxterEaves merged commit edc1ac3 into master Jan 18, 2024
26 checks passed
@schmidmt schmidmt deleted the feature/explain-pred branch May 6, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants