ilusm.dev

rec

Recommender systems: collaborative filtering, content-based, hybrid.

Load with: use rec

Quick example

use rec

result = rcdds("value", "hello", "value")
prn(result)

Functions

Data model

recne()

Creates a new instance.

rcdds(r, uid, meta)

Performs the operation. Takes r, uid, meta.

rcddt(r, iid, meta)

Performs the operation. Takes r, iid, meta.

recnt(r, uid, iid, val, ts)

Performs the operation. Takes r, uid, iid, val, ts.

Collaborative filtering

reccf(r, k)

Performs the operation. Takes r, k.

rcpr0(m, uid, iid)

Performs the operation. Takes m, uid, iid.

rcrc0(m, uid, n)

Performs the operation. Takes m, uid, n.

Content-based

reccb(itms, featfn)

Performs the operation. Takes itms, featfn.

rcrcc(m, q, n)

Performs the operation. Takes m, q, n.

Matrix factorization

recmf(r, k, iters)

Performs the operation. Takes r, k, iters.

rcpr1(m, uid, iid)

Performs the operation. Takes m, uid, iid.

Hybrid

rchyb(cf, cb, wcf, wcb)

Performs the operation. Takes cf, cb, wcf, wcb.

rcprd(m, uid, iid, itmfeat)

Reads data. Takes m, uid, iid, itmfeat.

Deep learning (simplified)

recdp(r, layers)

Performs the operation. Takes r, layers.

Evaluation

recvl(pred, actual)

Validates. Takes pred, actual.

rechr(pred, k)

Performs the operation. Takes pred, k.

recmp(pred, actual)

Performs the operation. Takes pred, actual.

Cold start

rccld(r, itm, attr)

Performs the operation. Takes r, itm, attr.

Diversity

recdv(recs, simmtx)

Performs the operation. Takes recs, simmtx.

Serendipity

rcsrn(recs, usrhist, surp)

Performs the operation. Takes recs, usrhist, surp.

Explainability

rcxpl(m, uid, rec)

Performs the operation. Takes m, uid, rec.

rcxp0(cb, q, rec)

Performs the operation. Takes cb, q, rec.

Real-time updates

recpd(r, int)

Performs the operation. Takes r, int.

A/B testing integration

recab(usr, algs)

Performs the operation. Takes usr, algs.

Session-based

rcsss(sess, itms)

Performs the operation. Takes sess, itms.

Multi-armed bandit

recmb(itms, eps)

Performs the operation. Takes itms, eps.

Context-aware

rcctx(r, uid, ctx)

Performs the operation. Takes r, uid, ctx.

Export

rc2js(r)

Performs the operation. Takes r.

Notes

  • Record / struct helpers - create, clone, merge, diff.