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

chore(histogram): display number for Y-axis instead of probability #430

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

iwatake2222
Copy link
Contributor

@iwatake2222 iwatake2222 commented Nov 13, 2023

Description

Why this change is needed

  • Current implementation for histogram graph uses Probability for Y-axis. However, Probability (density=True) calculated by numpy.histogram is a little confusing. According to the reference, the sum of the histogram values will not be equal to 1 unless bins of unity width are chosen . So in our usage, the sum doesn't become 1. We can see the trend of Histogram but Y-axis value itself is useless
  • I propose using the number of samples so that a viewer can see the meaningful value. Also, a viewer can judge if the graph is created with enough samples or not

Before

bokeh_plot
bokeh_plot(1)

After

bokeh_plot(2)
bokeh_plot(3)

Related links

None

Notes for reviewers

  • It's just my suggestion. Please give me your feedback if you think we should keep using Probability
  • Only Y-axis changes

Pre-review checklist for the PR author

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR has been properly tested.
  • The PR has been reviewed.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • (Optional) The PR has been properly tested with CARET_report verification.
  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@iwatake2222 iwatake2222 changed the title chore(histogram): display number instead of probability chore(histogram): display number for Y-axis instead of probability Nov 14, 2023
Signed-off-by: takeshi.iwanari <[email protected]>
Copy link
Contributor

@rokamu623 rokamu623 left a comment

Choose a reason for hiding this comment

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

LGTM!

@rokamu623
Copy link
Contributor

👍
image

@iwatake2222 iwatake2222 merged commit e14022e into main Nov 14, 2023
10 checks passed
@iwatake2222 iwatake2222 deleted the chore_histogram_use_number_instead_of_probability branch November 14, 2023 06:34
xygyo77 pushed a commit to xygyo77/caret_analyze that referenced this pull request Nov 17, 2023
…ier4#430)

* chore(histogram): display number instead of probability

Signed-off-by: takeshi.iwanari <[email protected]>

* fix: change hover label

Signed-off-by: takeshi.iwanari <[email protected]>

---------

Signed-off-by: takeshi.iwanari <[email protected]>
xygyo77 added a commit that referenced this pull request Dec 11, 2023
* create_response_time_timeseries_plot() API for sim_time.

Signed-off-by: ISP akm <[email protected]>

* Add support sim_time to histogram APIs.

Signed-off-by: ISP akm <[email protected]>

* fix: unified graph captions. (#410)

* Unified graph captions.

Signed-off-by: emb4 <[email protected]>

* Unified conditional branching of graph captions.

Signed-off-by: emb4 <[email protected]>

* Fixed flake8 errors.

Signed-off-by: emb4 <[email protected]>

* Point corrected.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected the points pointed out.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

---------

Signed-off-by: emb4 <[email protected]>

* chore(histogram): display number for Y-axis instead of probability (#430)

* chore(histogram): display number instead of probability

Signed-off-by: takeshi.iwanari <[email protected]>

* fix: change hover label

Signed-off-by: takeshi.iwanari <[email protected]>

---------

Signed-off-by: takeshi.iwanari <[email protected]>

* Add sim_time support to create_response_time_stacked_bar_plot() API

Signed-off-by: ISP akm <[email protected]>

* Histogram legends click policy is set to "hide"

Signed-off-by: ISP akm <[email protected]>

* Skip invalid records that are involved in sim_time conversion but are invalid.

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* chore: spell miss coverter->converter

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* fixed pytest errors

Signed-off-by: ISP akm <[email protected]>

* add test codes

Signed-off-by: ISP akm <[email protected]>

* Reflection of PR comments (Part 1)

Signed-off-by: ISP akm <[email protected]>

* spelling convert->round_convert

Signed-off-by: ISP akm <[email protected]>

* Supported removal of _convert_timeseries_records_to_sim_time().

Signed-off-by: ISP akm <[email protected]>

* ci(pre-commit): autofix

* Add sim_time support to StackedBarPlot.to_dataframe.

Signed-off-by: ISP akm <[email protected]>

* Fixed pytest error.

Signed-off-by: ISP akm <[email protected]>

* Fixed pytest error.

Signed-off-by: ISP akm <[email protected]>

* Fixed pytest error.

Signed-off-by: ISP akm <[email protected]>

* Reflection of PR comments (Part 2)

Signed-off-by: ISP akm <[email protected]>

* Reflection of PR comments (Part 3)

Signed-off-by: ISP akm <[email protected]>

---------

Signed-off-by: ISP akm <[email protected]>
Signed-off-by: emb4 <[email protected]>
Signed-off-by: takeshi.iwanari <[email protected]>
Co-authored-by: emori-ctc <[email protected]>
Co-authored-by: iwatake <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
isp-uetsuki added a commit to isp-uetsuki/CARET_analyze that referenced this pull request Dec 27, 2023
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.

2 participants