0
$\begingroup$

I have labeled text data from two different classes. I have calculated tfidf feature representation of all the sentences in question. I have a huge matrix where rows are sentences and columns are tfidf scores for each word in them. Using these features I have implemented a random forest classifier to classify the two classes and achieved reasonable accuracy. But the initial hypothesis that I started with was: Is there some n-dimensional space where my text data separate out? Or do the sentences belonging to each class cluster in some n-dimensional space? Can you suggest some way of doing that?


I thought of it this way: I will take two feature vectors at random and calculate the pairwise similarity. The pairs will be from either $(+1,+1)$,$(-1,-1)$, or $(+1,-1)$. (Given I have two classes $+1$ and $-1$). Repeat this multiple times. Now I will get three distributions. From that, we will be able to say how much $+1$ is different from $-1$.

$\endgroup$
0
$\begingroup$

There are techniques to find the linear projection where classes best separate. That would be worth a try, because you can actually study the projection in terms of word influence.

Look for the classic

  • Fisher's Linear Discriminant Analysis (LDA buy not the Dirichlet one)
  • Large Margin Nearest Neighbors (LMNN)

And probably some more recent developments, too.

$\endgroup$

Your Answer

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

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