Gender identification task on instance or user level? I'm working on a task which is gender identification. Given a user account (e.g. Twitter account) with its documents (e.g. 100 tweets), the user should be classified as a male or a female.

The dataset that I have contains around 500 users for each class (label).

There are 2 different ways to approach this task, but I don't know which one is "more correct":

1) I aggregate the documents of each user into one large document, and then feed the final document into a classifier.

2) I project the user label (class) into her/his documents, and then feed each single document of the user into a classifier. At the prediction time, I apply averaging on the probabiltities of the users' documents to get the labels of the users (e.g. larger or smaller than 0.5).

Probably an answer to this question could be that both ways are task-dependent, but I want to know if there is a scientific explanation behind any of the solutions, especially in my task.

BTW, some of the documents for many users are not important (e.g. Hello all :D!).
This depends heavily on your intended use case:

When 1) is better

If you want to identify the gender as best as you can while always having access to a data set containing multiple documents/tweets then this is the way to go.

There are multiple features that you can only engineer from the full data set (like average length of tweets, tweet frequency, etc.) that might be very predictive.

When 2) is better

If however your use case is to predict the gender of user based on a single tweet (maybe even without knowing the id/origin of the tweet, only the tweet text) then you need to train a model that can make a prediction out of a single tweet.

In this case I would also encourage you to get a diversified data set which contains more tweets from several different users instead of a large class of tweets from few users.