Skip to content

Commit

Permalink
Fix/set default weights in rmse_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock committed Dec 25, 2024
1 parent 4970509 commit eac51f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 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 = "FSRS-Optimizer"
version = "5.6.1"
version = "5.6.2"
readme = "README.md"
dependencies = [
"matplotlib>=3.7.0",
Expand Down
2 changes: 2 additions & 0 deletions src/fsrs_optimizer/fsrs_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2109,6 +2109,8 @@ def count_lapse(r_history, t_history):
else 0
)
)
if "weights" not in tmp.columns:
tmp["weights"] = 1
tmp = (
tmp.groupby(["delta_t", "i", "lapse"])
.agg({"y": "mean", "p": "mean", "weights": "sum"})
Expand Down

0 comments on commit eac51f9

Please sign in to comment.