Why Tensorflow cannot be used for Recommender Systems

# TensorFlow implementation of collaborative filtering

Andrew explain an the end that Collaborative filtering algorithm and its cost Function does not fit well with TensorFlow , Can some one expand more on why it does not fit well.

When TensorFlow can do linear and logistic regression well, isn’t this just an extension with a complex cost Fn?


1 Like

@Venkat_Subramani I honestly have not taken this particular class so can’t speak to what Prof. Ng is saying here (I took my ML classes elsewhere)-- But my guess is perhaps he means the cost function you have been using thus far. For example SVD (Singular Value Decomposition) and Matrix Factorization methods tend to work better on the sparse (think ‘swiss cheese’) structure of recommender systems than other linear methods.

So, otherwise you can do recommenders with TF. They even have a library for it.

See: TensorFlow Recommenders: Quickstart


I think you may have misunderstood something Andrew said.

The practice lab for Recommender Systems (in C3 W2) does use TensorFlow.

1 Like


The videos talk about using TF tools for AutoDiff for calculating the derivatives.
In the last part of video , Andrew tells traditional tf.fit and tf.predict are not used .
10:00 min of this video:

Interestingly @Nevermnd pasted a TF link which use fit and predict.
Fair Warning: I looked at the code, not fully grasped it.

You are misunderstanding his statement.

He’s talking about the structure of this model: TensorFlow doesn’t have a standard layer for this specific method.

So you “can’t just use a Dense layer followed by fit and predict” - you have to create a custom model (before you use fit and predict).