tensorrec
tensorrec copied to clipboard
It's hard for user who first use TensorRec
All of the examples are coming from the data generated. Could you post an example which use own dataset to train it?
Hey @Vbubblery !
I agree that learning to use TensorRec is difficult right now. There are a few efforts underway to improve the examples and documentation.
There are a few examples that do not use generated data: https://github.com/jfkirk/tensorrec/blob/master/examples/attention_example.py https://github.com/jfkirk/tensorrec/blob/master/examples/keras_example.py
These examples use the MovieLens / Book Crossing datasets, which are public datasets for training recommender systems.
Are these what you're looking for?
Yes, I already checked it, but it needs to transform the data. We cannot directly use Numpy array or pandas to do it. So, if we want to use our own data, we need to go to
test.datasets import get_movielens_100k
to find how to transform the data, it's not a good behavior for apprentices.
I think what OP is looking for (and me too!) is an example giving details on how to prepare a dataset, as the input format is not entirely trivial. For instance, could use help understanding the dimensions of item_features
and user_features
objects.
Users and adopters want to be able to apply to dataset of interest with minimal lift.
I too agree that if there's a clear example on how to use raw data with tensorrec, it would be great. Certainly, everyone has different types of raw data, but if there's a standard format for tensorrec so that everyone can follow, I think it'd be easier for beginners (like myself) to jump start. On a side note @jfkirk , I currently have a raw data file under this format:
msQe1u7Z_XuqjGoqhB0J5g atVh8viqTj-sqDJ35tAYVg 2
NhOc64RsrTT1Dls50yYW8g UBv8heCQR0RPnUQG0zkXIQ 1
hxqo4NyJFfeOmuoVi--s1A f5O7v_X_jCg2itqacRfxhg 5
Each line is created with user_id
, business_id
and rating
. Would you mind to show me how to convert this dataset to train a model with tensorrec? It'd be much appreciated if you can show me a quick example of saving and loading the model to predict as well.
I too agree that if there's a clear example on how to use raw data with tensorrec, it would be great. Certainly, everyone has different types of raw data, but if there's a standard format for tensorrec so that everyone can follow, I think it'd be easier for beginners (like myself) to jump start. On a side note @jfkirk , I currently have a raw data file under this format:
msQe1u7Z_XuqjGoqhB0J5g atVh8viqTj-sqDJ35tAYVg 2 NhOc64RsrTT1Dls50yYW8g UBv8heCQR0RPnUQG0zkXIQ 1 hxqo4NyJFfeOmuoVi--s1A f5O7v_X_jCg2itqacRfxhg 5
Each line is created with
user_id
,business_id
andrating
. Would you mind to show me how to convert this dataset to train a model with tensorrec? It'd be much appreciated if you can show me a quick example of saving and loading the model to predict as well.
+1. I normally use a collaborative filtering algorithm but it consumes a lot of resources. It would be cool to compare it with this lib but I only have "userId", "productId" and "rating" and I don't know how to properly transform it.
Also... It looks like ratings are transformed into 1 or 0. Is this necessary? Can't it be a range between 0 and 1?
Agreed on all counts -- when I wrote up the examples I thought things were more self-explanatory than they are, and I see that now. I'm going to write up a "getting started with TensorRec" that takes us from data input through model construction and fitting.
@luiscastro193 regarding ratings, TensorRec won't change the ratings for you, but whether-or-not you should convert your ratings to a given range depends what kind of loss function you want to lose. You can read a bit more here: https://github.com/jfkirk/tensorrec/wiki/Loss-Graphs
Agreed on all counts -- when I wrote up the examples I thought things were more self-explanatory than they are, and I see that now. I'm going to write up a "getting started with TensorRec" that takes us from data input through model construction and fitting.
@luiscastro193 regarding ratings, TensorRec won't change the ratings for you, but whether-or-not you should convert your ratings to a given range depends what kind of loss function you want to lose. You can read a bit more here: https://github.com/jfkirk/tensorrec/wiki/Loss-Graphs
Thanks a lot @jfkirk . Do you have an estimated timeline for this docs release? I've prepared some raw data and had the urge to try this lib with a small dataset to see the results in comparison with other libs that I have tried so far.
I would want to know if this has been worked out, or if maybe if it could be marked with a label of help is wanted.
@jfkirk