Skip to content

Commit

Permalink
Fix/remove reviews with rating = 0 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock authored Jul 28, 2023
1 parent 68d2c1b commit 23ef098
Show file tree
Hide file tree
Showing 2 changed files with 2 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 = "4.4.1"
version = "4.4.2"
readme = "README.md"
dependencies = [
"matplotlib>=3.7.0",
Expand Down
1 change: 1 addition & 0 deletions src/fsrs_optimizer/fsrs_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ def cum_concat(x):
r_history = df.groupby('cid', group_keys=False)['r'].apply(lambda x: cum_concat([[i] for i in x]))
df['r_history']=[','.join(map(str, item[:-1])) for sublist in r_history for item in sublist]
df = df.groupby('cid').filter(lambda group: group['id'].min() > time.mktime(datetime.strptime(revlog_start_date, "%Y-%m-%d").timetuple()) * 1000)
df = df[df['r'] != 0].copy()
df['y'] = df['r'].map(lambda x: {1: 0, 2: 1, 3: 1, 4: 1}[x])

def remove_outliers(group: pd.DataFrame) -> pd.DataFrame:
Expand Down

0 comments on commit 23ef098

Please sign in to comment.