Skip to content

Commit

Permalink
Fix/filter threshold (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock authored Jul 20, 2023
1 parent ea612f1 commit a6c62ff
Show file tree
Hide file tree
Showing 3 changed files with 339 additions and 336 deletions.
671 changes: 337 additions & 334 deletions fsrs4anki_optimizer.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package/fsrs4anki_optimizer/fsrs4anki_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def remove_outliers(group: pd.DataFrame) -> pd.DataFrame:
Q3 = group['delta_t'].quantile(0.75)
IQR = Q3 - Q1
threshold = Q3 + 1.5 * IQR
group = group[group['delta_t'] < threshold]
group = group[group['delta_t'] <= threshold]
return group

df[df['i'] == 2] = df[df['i'] == 2].groupby(by=['r_history', 't_history'], as_index=False, group_keys=False).apply(remove_outliers)
Expand Down
2 changes: 1 addition & 1 deletion package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fsrs4anki_optimizer"
version = "4.2.0"
version = "4.2.1"
readme = "README.md"
dependencies = [
"matplotlib>=3.7.0",
Expand Down

0 comments on commit a6c62ff

Please sign in to comment.