Next, get a list of random people to make up the dataset. Fortunately, Hot or Not provides an API call that returns a list of people with specified criteria. In this exam-
ple, the only criteria will be that the people have “meet me” profiles, since only from
these profiles can you get other information like location and interests. Add this
function to hotornot.py: (查看原文)
What Does This Have to Do with the Articles Matrix?
So far, what you have is a matrix of articles with word counts. The goal is to factorize
this matrix, which means finding two smaller matrices that can be multiplied
together to reconstruct this one. The two smaller matrices are:
The features matrix
This matrix has a row for each feature and a column for each word. The values
indicate how important a word is to a feature. Each feature should represent a
theme that emerged from a set of articles, so you might expect an article about a
new TV show to have a high weight for the word “television.”
The weights matrix
This matrix maps the features to the articles matrix. Each row is an article and
each column is a feature. The values state how much each feature applies to each
articl... (查看原文)
还没人写过短评呢
还没人写过短评呢