llnl / llnl/thicket

Unexpected output th.stats.std

Open
#140 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-stats priority-normal type-bug
Dominant language
JavaScript
Stars
18
Forks
10
PR merge metrics
No merged PRs in 30d

Description

There is an issue with the th.stats.std function where single profiled thicket results in Nan's value due to pandas use of sample standard deviation instead of population standard deviation.

A way to get around this issue is to use `lambda x: np.std(x)` in the aggregate function of th.stats.std.

i.e `df = thicket.dataframe[columns].reset_index().groupby("node").agg(lambda x: np.std(x))`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the th.stats.std entry point and inspect how its aggregate function handles a single profiled thicket result. Reproduce the NaN output, compare the current sample-standard-deviation behavior with population standard deviation, and verify that the result is finite for the single-profile case.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, pandas, python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.