Lesson 5 In-Class Discussion

(ecdrid) #64

inheriting that class will do?

Also selecting the cat and non-cat …

(asaia) #65

My understanding: inherit the behavior/structure of the class. So…new objects take on the properties of existing objects. Maybe this resource may help: http://www.jesshamrick.com/2011/05/18/an-introduction-to-classes-and-inheritance-in-python/

(Abdelrahman Ahmed) #66

yeah you’re right… the output would be 2x2 matrix… would be great if @yinterian can ask this in class

(yinterian) #67

I just asked Jeremy to clarify this.


I opted into email notifications on GitHub for the fastai library, and it’s really interesting to see the pull requests that people are making for minor improvements to docs, adding new functionality in, etc.

Highly recommend for an easy way to get an intro into the fastai codebase (with low effort)


Notation as a tool of thought: http://www.jsoftware.com/papers/tot.htm

(Vikrant Behal) #71

I’m not sure if this is true for everyone but today’s lecture seems smooth for me. Maybe this is what’s good about Jeremy’s way of teaching?

(Karthik Ramesh) #72

Can we have different sizes for the embedding for users and movies ?

(yinterian) #73

Yes, of course.

(Pete Condon) #74

Is that assuming that there’s a fully connected layer to join them together?


you should git pull
the cell on github has this code:
data = ColumnarModelData.from_data_frame(path, val_idxs, x, y, [‘userId’, ‘movieId’], 64)

the preceeding cell defined x and y:
x = ratings.drop([‘rating’, ‘timestamp’],axis=1)
y = ratings[‘rating’]

(Abdelrahman Ahmed) #76

Would that nu+nm matrix be of size 10, or size of n_factors*2 ?

(Ravi Sekar Vijayakumar) #77

Are there any popular architectures for embedded neural nets ?

(ecdrid) #78
input dims is n_factors*2
Output dims is 10
class Linear(Module):
    r"""Applies a linear transformation to the incoming data: :math:`y = Ax + b`

        in_features: size of each input sample
        out_features: size of each output sample
        bias: If set to False, the layer will not learn an additive bias.
            Default: ``True``

(Louis Guthmann) #79

Do we/should we always use the same size for Embeddings dimension for Entities now that we use NN ?
it seems to me that we don’t need to keep the same dimensions anymore.

(Charin) #80

When you say adding new variables such as timestamp and genre, does it mean we treat them as movie and user and do yet another dot product?

(yinterian) #81

You are not using a dot product anymore.

(Yihui Ray Ren) #82

I think it is interesting to think about what to do when a new movie or new customer comes up. Maybe an unsupervised clustering algorithm to figure out the best initial embedding representation.

(Phani Srikanth) #83

Check out this nifty library built on top of PyTorch. It covers a few ideas /usecases in recommendation engines space - https://github.com/maciejkula/spotlight

(Pete Condon) #84

Why not train a neural net to watch the movie and determine the embeddings? :wink: