What is Nostr?
aritter / Adam Ritter | rbr.bio
npub1dcl…x5ey
2023-04-18 23:10:16

aritter on Nostr: Another update on ranking: I optimized the logistic regression a bit (it's about 8ms ...

Another update on ranking:

I optimized the logistic regression a bit (it's about 8ms / iteration on 1000 events x 10 features). It could be made much faster, but I think it's fast enough, as Newton-Raphson method converges well.

I also added the API for groups, so now the model learns if a user likes some event that somebody usually likes, and the user likes some event that a somebody publishes (experimenting with adding a ,,self like'' automatically would be interesting as well).

Next steps are feature / model evaluation without using time, and then adding the time component (which is always a bit hacky, there's no real elegant solution).

Also I separated ranking to a function so that it's easy to include into clients later:

https://github.com/adamritter/light-nostr-client/blob/master/src/lib/ranking.ts

The current function call is this:

function processEventForLogisticRegression(
event: Event,
logisticRegressor: LogisticRegressor,
loggedInUser: string,
parentEvent?: Event
)

(the model can be trained and predictions for events retrieved later)
Author Public Key
npub1dcl4zejwr8sg9h6jzl75fy4mj6g8gpdqkfczseca6lef0d5gvzxqvux5ey