correction and split agreement into 2 functions#94
Open
MaelleTtrt wants to merge 1 commit intoProject-OSmOSE:mainfrom
Open
correction and split agreement into 2 functions#94MaelleTtrt wants to merge 1 commit intoProject-OSmOSE:mainfrom
MaelleTtrt wants to merge 1 commit intoProject-OSmOSE:mainfrom
Conversation
mathieudpnt
requested changes
Feb 4, 2026
|
|
||
| bar_kwargs = { | ||
| "width": bar_width.total_seconds() / 86400, | ||
| "width": (bar_width.total_seconds() / 86400), |
Collaborator
There was a problem hiding this comment.
why parenthesis here ?
| "id": "6a230b00c14cc64e", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "metadata": { |
Collaborator
There was a problem hiding this comment.
Make sure you dete all outputs of notebooks before if you push it to the repo
Also, i think this file has nothing to do with your edits so you should take it out of your PR
| It also fits and plots a linear regression line and displays the coefficient | ||
| of determination (R²) on the plot. | ||
| ) -> DataFrame: | ||
| """Counts the number of detections in df within bin_size timeframe. |
Collaborator
There was a problem hiding this comment.
"""Count the number of detections in an APLOSE dataframe within bin_size time bin.```
Ruff D401: First line of docstring should be in imperative mood
| Matplotlib axes object where the scatterplot and regression line will be drawn. | ||
| Returns | ||
| ------- | ||
| df_hist: Dataframe with columns = annotators and lines = number of detections |
Collaborator
There was a problem hiding this comment.
df_hist: DataFrame
A Dataframe with columns correposnding to the annotators
and lines corresponding to the number of detections
|
|
||
| # scatter plot | ||
| n_annot_max = bin_size.total_seconds() / df["end_time"].iloc[0] | ||
|
|
Collaborator
There was a problem hiding this comment.
delete this empty line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I split the
agreementinto 2 functions1-
count_detections_within_timeframethat returns a dataframe containing counts of detections within a timeframe2 - plot the R²
I also corrected the function
agreementso that the last bin encompassed properly the dataset