Lesson 5 In-Class Discussion

inheriting that class will do?

Also selecting the cat and non-cat …

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/

2 Likes

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

1 Like

I just asked Jeremy to clarify this.

3 Likes

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)

20 Likes

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

4 Likes

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?

5 Likes

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

Yes, of course.

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’]

1 Like

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

Are there any popular architectures for embedded neural nets ?

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`

    Args:
        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``
1 Like

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.

1 Like

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?

1 Like

You are not using a dot product anymore.

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.

1 Like

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

6 Likes

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

9 Likes