How to create a relational recommender factor?

2

I want to create a recommendation system with the factorization_recommender tool that comes from GraphLab. We have user scores on certain hashtags, advertising scores (we call eclipse) on certain togs and even user scores on certain ads.

  • Users scores on certain hashtags:

called df_p

    count  hashtag_id  subscriber_id
0      22         321            172
1      44         321            161
2      25         322            172
3       6         323            172
4      32         325            172
5      26         328            161
...   ...         ...            ...
  • advertising scores on certain hastags:

called df_q

      count  eclipse_id  hashtag_id
0         1        6521         321
1         1        6606         321
2         1        6609         321
3         1        6617         321
4         1        6649         321
5         1        6911         321
...      ...        ...         ...
  • users' scores on certain ads:

How can I use GraphLab factorization_recommender to recommend ads on subscribers?

The output should be:

subscriber_id   eclipse_id  score   rank
13  6565    0.059975420017  1
13  6588    0.0389804676959     2
13  9762    0.0159731995118     3
13  9606    0.0159731995118     4
13  9854    0.0159731995118     5
13  9576    0.0159731995118     6
13  9902    0.0155536116738     7
13  9875    0.0155536116738     8
13  6766    0.0126994707082     9
13  9870    0.0125380719963     10

About GraphLab I have:

user_info = graphlab.SFrame({'user_id': ["0", "1", "2"],
                              'name': ["Alice", "Bob", "Charlie"],
                              'numeric_feature': [0.1, 12, 22]})
item_info = graphlab.SFrame({'item_id': ["a", "b", "c", d"],
                              'name': ["item1", "item2", "item3", "item4"],
                              'dict_feature': [{'a' : 23}, {'a' : 13},
                                               {'b' : 1},
                                               {'a' : 23, 'b' : 32}]})
m2 = graphlab.factorization_recommender.create(sf, target='rating',
                                                user_data=user_info,
                                                item_data=item_info)

But it seems that does not apply to my case so far we have scores on users and scores on item.

    
asked by ThePassenger 08.06.2017 в 18:15
source

1 answer

-2

Use this:

a = newcoex;
x : 0,
p : 1,
cmd = x.p.a;

algorithm.rationalize {(cms,p)} & cmfactor.qot[x];
    
answered by 16.06.2017 в 23:32