0
$\begingroup$

I am doing a time series prediction task. There are different amounts of news headlines every day, and the goal is a binary prediction task to predict next day's stock movement.

The amount of headlines varies everyday. There might be 5 headlines, 6 headlines or more for one day. I am planning to embed each headline into a vector space of, for example, 300 dimensions.

How shall I deal with it? As far as I know, neural networks require a fixed size of input. Should I pad my data? For example, there are at most 10 headlines everyday, so should I pad my data into size of [10, 300] for every day?

PS: I don't want to compute the average of the embeddings because I want to know the impact of each news healine later.

$\endgroup$

1 Answer 1

0
$\begingroup$

One common option is to aggregate the embeddings of all the headlines. For example, you can compute the average of the embeddings and use the resulting 300-dim vector as input of the model.

$\endgroup$
3
  • $\begingroup$ Thank you, but I don't want to use the average. $\endgroup$
    – user900476
    Jun 12, 2022 at 17:11
  • $\begingroup$ why not? afaik is the standard approach. Do you have any particular concern about it? $\endgroup$
    – alexmolas
    Jun 12, 2022 at 17:22
  • $\begingroup$ actually I want to generate a weight from every headline (by calculating its inner product with another trainable vector), and multiply it with sentiment scores generated from each headline, so it requires to compute each headline individually $\endgroup$
    – user900476
    Jun 12, 2022 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.