-
Notifications
You must be signed in to change notification settings - Fork 131
/
raccoon.js
46 lines (39 loc) · 833 Bytes
/
raccoon.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const config = require('./config.js'),
algo = require('./algorithms.js'),
input = require('./input.js'),
stat = require('./stat.js');
class Raccoon {
constructor(args) {
}
}
const inputProtoMethods = {
liked,
disliked,
unliked,
undisliked,
updateSequence
} = input;
const statProtoMethods = {
recommendFor,
bestRated,
worstRated,
bestRatedWithScores,
mostLiked,
mostDisliked,
usersWhoLikedAlsoLiked,
mostSimilarUsers,
leastSimilarUsers,
likedBy,
likedCount,
dislikedBy,
dislikedCount,
allLikedFor,
allDislikedFor,
allWatchedFor
} = stat;
const recProtoMethods = {
predictFor: algo.predictFor
} = algo;
Raccoon.prototype = Object.assign(Raccoon.prototype, { config, stat },
inputProtoMethods, statProtoMethods, recProtoMethods);
module.exports = exports = new Raccoon();