Code Monkey home page Code Monkey logo

Comments (8)

lars76 avatar lars76 commented on September 2, 2024 1

Thank you for the information. I think a lot of feature engineering has to be done to get good results with direct modelling. For example, grouping similar users or cards. And then having only a single model. I will also do some experiments.

However, it would be easier for evaluating the performance by splitting the scripts some more. For datasets such as COCO, you have a single training and test dataset. You could just create a script that takes as input a single prediction csv file and outputs the metrics (like at Kaggle). While it is good to have a cross validation split, people might use different splits for their training.

from srs-benchmark.

L-M-Sherlock avatar L-M-Sherlock commented on September 2, 2024

The training process is very similar to GPT's next token prediction. Assuming you have 10 reviews belonging to the same cards, the optimizer will train FSRS in the 1st review and treat 2nd review as the target. Then 1-2 reviews are used as the feature and the 3rd review is the target, and so on.

from srs-benchmark.

lars76 avatar lars76 commented on September 2, 2024

I am still not 100% sure, maybe I can give an example.

card_id,review_th,delta_t,rating
6,22,-1,1
6,24,0,1
6,27,0,3
6,38,0,3
6,103,2,3
6,201,4,1

Let us say we simplify the rating from 2,3,4 to 1 and from 1 (again) to 0.

time series: [0 0 1 1 1 0]

Then the RNN could predict 0.8 as the next token. However, how do you know the number of days this 0.8 corresponds to?

Or are you converting delta_t to absolute days? Then let the RNN predict t+k tokens. Each k corresponds to a single day. Then we know the number of days for rescheduling?

from srs-benchmark.

L-M-Sherlock avatar L-M-Sherlock commented on September 2, 2024

time series: [0 0 1 1 1 0]

The real time series is [(0, 0), (2, 1), (4, 0)] because the short-term reviews are removed in current model.

srs-benchmark/other.py

Lines 1051 to 1057 in 51c6021

outputs, _ = self.model(sequences)
stabilities = outputs[
seq_lens - 1,
torch.arange(real_batch_size, device=device),
0,
]
retentions = self.model.forgetting_curve(delta_ts, stabilities)

The RNN doesn't predict the probability of recall directly. It outputs the stability, and the last delta_t will be used to calculate the probability.

For example, [(0, 0), (2, 1)] are the inputs of RNN, and then RNN will output the stability, e.g. 5. The last delta_t 4 and the predicted stability 5 are used to calculate the probability in the forgetting_curve function.

from srs-benchmark.

lars76 avatar lars76 commented on September 2, 2024

Thank you, this makes it much clearer. Have you also tried directly modelling the problem without relying on this curve?

from srs-benchmark.

L-M-Sherlock avatar L-M-Sherlock commented on September 2, 2024

The DASH-series models can predict the probability directly.

srs-benchmark/other.py

Lines 1020 to 1029 in 51c6021

if isinstance(self.model, ACT_R):
outputs = self.model(sequences)
retentions = outputs[
seq_lens - 2, torch.arange(real_batch_size, device=device), 0
]
elif isinstance(self.model, DASH_ACTR):
retentions = self.model(sequences)
elif isinstance(self.model, DASH):
outputs = self.model(sequences.transpose(0, 1))
retentions = outputs.squeeze(1)

from srs-benchmark.

L-M-Sherlock avatar L-M-Sherlock commented on September 2, 2024

Have you also tried directly modelling the problem without relying on this curve?

Without the curve, the general model like RNN, LSTM and GRU may make some weird predictions. For example, the forgetting curve generated from them would not decay over time.

from srs-benchmark.

L-M-Sherlock avatar L-M-Sherlock commented on September 2, 2024

Our benchmark doesn't have cross validation split. It only uses time-series-split to avoid data leakage.

from srs-benchmark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.