0
$\begingroup$

Well my question is a general question. I tried to find some relevant information before posting my question here, but no success!.

I am working on 20 newsgroup data set, which as you may know it contains 20 category and in each category there are 100 documents.

for feeding this data set into an machine learning model, we may have several options(correct me if Im wrong please):

  1. matrix in which rows are the number of all docs and the columns are number of features(for example we decide to extract 1000 features overall). so it will be doc - word matrices . (2000,1000). this case in topic modeling approaches

  2. when I use Scikit-learn library it will give me dimension as (11314,1000) again here 11314 is probably number of samples and 1000 is number of extracted features as column. so probably I can call it word feature matrix. this case in classification.

  3. we may have a matrix (11314,20). in this case 11314 are probably number of samples or unique words, and 20 is number of classes (20 news group has 20 classes). I have seen this format when we want to calculate Information Gain which makes sense as we want information gain for each sample in the corpus correspond to each label.

So lets talk about my confusion part:

  1. does it make any difference if I feed my machine learning model with any of these matrices?

  2. I have seen the case 1 and 2 to be used in the machine learning model, does matrix 3 (number of samples, number of classes) does not make sense to be fed to machine learning model?

(when we are using Information gain the matrix I am using is (number of samples, number of classes), when I want to change to machine learning model it will change to either (documents, features) or (number of samples, features), I am confused when should I use which one).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.