Questions tagged [text-classification]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
2answers
3k views

What is purpose of the [CLS] token and why its encoding output is important?

I am reading this article on how to use BERT by Jay Alammar and I understand things up until: For sentence classification, we’re only only interested in BERT’s output for the [CLS] token, so we ...
4
votes
1answer
82 views

How to include categorical fields to enhance a text classification

I would have a question on how to add more categorical fields in a classification problem. My dataset had initially 4 fields: ...
3
votes
1answer
16 views

Doubt on scope of text classification problem

I have a dataset that describes the sellers who are selling various brands. I need to identify the source (where did he buy those brands he is selling from) of those sellers. (Dimension of dataset 11,...
3
votes
1answer
43 views

Classifying one particular class of documents from the rest

I am trying to build a classifier that would classify if a document is a document about sports or not. I have enough samples of sports document to train a classifier on, however I can't imagine how I ...
3
votes
1answer
127 views

How to use ndcg metric for binary relevance

I am working on a ranking problem to predict the right single document based on the user query and use the NDCG metric to measure the model. Given the details : Queries ( Q ), Result Document ( D ),...
3
votes
0answers
35 views

Bag of words: Prediction on new (out-of-sample) data

I'm working with a bag of words in R: library(tm) corpus = VCorpus(textsource) dtm = DocumentTermMatrix(corpus) dtm = as.matrix(dtm) I use the matrix ...
2
votes
1answer
27 views

Classify text as logical/ not logical

Can some one advise me direction where to look in.Or some resources. Here is a task: User leaves feed back-text with min 50 characters. I need to check if it's normal human sentences/ word ...
2
votes
1answer
19 views

Interpreting confidence interval results for datasets

I have created a dataset automatically and wanted to clarify my interpretation of the amount of noise using the confidence interval. I selected a random sample and manually annotated the sample and ...
2
votes
2answers
38 views

Text Classification : Classifying N classes vs rest of the classes

Apologies if this is naive, I am fairly new to the domain. I have a requirement where I am trying to classify 2 types of text data, i.e, I have got 2 classes to classify my data upon. I am able to get ...
2
votes
2answers
46 views

Which kind of model is better for keyword-set classification?

There exists a similar task that is named text classification. But I want to find a kind of model that the inputs are keyword set. And the keyword set is not from a sentence. For example: ...
2
votes
1answer
37 views

Any useful tips on transfer learning for a text classification task

I am doing a supervised binary text classification task. I want to classify the texts from site A, site B, and site C. The in-domain performance looks OK for texts of each site. (92%-94% accuracy). ...
2
votes
1answer
44 views

Is there any way to plot ROC curve for Ensemble hard voting classifier?

I am working on a multi-class text classification problem and performing an Ensemble learning for text classification. I chose hard voting as ensemble technique. I tried to plot ROC curve for my ...
2
votes
2answers
26 views

How to identify text similarity based on training data?

I have a set of documents (1 to 11) for which the labeling is done. Lets Assume: ...
2
votes
1answer
23 views

How to use ontologies for text classification?

I am new to machine learning and want to classify sentences using ontologies (taxonomies/ knowledge graphs) and supervised learning methods (I have an annotated training dataset). My question is how ...
2
votes
1answer
43 views

Text classification based on n-grams and similarity

I have tried to cluster hundred texts using k-means clustering. I would like to consider other algorithms to group text based on their content and try to spot news not related to other news (topic ...
2
votes
1answer
19 views

Text vectorizer that capture feature offset in the text?

I'm using sklearn Tfifdfvectorizer to extract feature from text towards text classification. I believe the information I need tends to be in the beginning of the document, so I would like to somehow ...
1
vote
2answers
46 views

How many layers should I replace in transfer learning CNN

I am designing a convolutional neural network that I believe requires transfer learning to function in practice. The network will be a character level CNN for text classification, more specifically, ...
1
vote
2answers
122 views

Text classification into thousands of classes

Could somebody point me to a paper or code that is about classifying texts into potentially thousands of categories (topics)? I do have data based on Wikipedia and the number of categories is really ...
1
vote
1answer
33 views

Which insights a data scientist could derive from text-analysis? [closed]

I have many texts and I am trying to analyse them. After tokenising them, studying words frequency, spotting any typos, studying punctuations, I have been working on POS tagging. Since it is my first ...
1
vote
2answers
29 views

Thematic clustering of text

Please advise on starting points, research (papers,frameworks) related to thematic clustering of text. In particular on a system with two levels of clustering where second level has a temporal nature....
1
vote
2answers
25 views

Problem of continuous training - Supervised learning

I am sure this is a most common problem, but would like to know by experts on how to tackle it. Note that, I mostly deal with textual data (NLP problems). When a supervised learning model is created, ...
1
vote
1answer
27 views

Identifying templates from SMS text

I am building an app where I identify information from the SMS, something similar to expense management apps. I have a parser which reads all the SMS of user, identifies SMS of interest and parses ...
1
vote
1answer
20 views

Text classification: accuracy [closed]

I would like to understand how to compute the accuracy of cluster analysis. I have hundred of texts. The dataset looks like as follows: ...
1
vote
1answer
24 views

Does it make sense to use a tfidf matrix for a model which expects to see new text?

I'm training a model to classify tweets right now. Most of the text classification examples I have seen convert the tweets into tf-idf document term matrices as input for the model. However, this ...
1
vote
1answer
440 views

Using Trainable=True in Keras Embedding obtained better performance

It is suggested by the author of Keras [1] to use Trainable=False when using the embedding layer in Keras to prevent the weights from being updated during training. ...
1
vote
1answer
185 views

Difference between SVM and GD/SGD?

My colleague mentioned that a data science project is using SGD classifier. So I started reading about GD/SGD and came across a nice article about Text classification using SVM and GD. In the end of ...
1
vote
1answer
38 views

Creating a valid dataset for obtaining results

I have created a domain-specific dataset, lets say it is relating to python programming topic posts. I have taken data from various places specific to this topic to create positive examples in my ...
1
vote
1answer
45 views

Text classification with Word2Vec on a larger corpus

I am working on a small project and I would like to use the word2vec technique as a text representation method. I need to classify patents but I have only a few of them labelled and to increase the ...
1
vote
2answers
26 views

Confusion with using different classes in neural networks (training vs testing)

I am new to deep learning and I am confused about having a neural network trained on certain classes and tested on different ones. Suppose I want to have a convolutional neural network that learns ...
1
vote
0answers
22 views

Spam/ham classification

I am exploring the use of lime for spam/ham categorisation. specifically I have a data frame having list of messages. I would need to identify which messages are spam and which ones are ham by using a ...
1
vote
1answer
34 views

How to deal with imbalanced text data

I am working on a problem where I have to classify products into multiple classes (more than one) based on product descriptions. For instance: "Tresemme shampoo and conditioner - sulfate-free" = ...
1
vote
1answer
22 views

Building a text classification model from scratch

I do not know if this is the right place to post my question. I am a beginner in data science and machine learning techniques. I would need to build a modem that can allow me to classify texts and run ...
1
vote
1answer
13 views

What are some of the available methods for handling multi-label classification for longer sequences of text

I am looking to solve a multi-class classification problem with long sequences of text with some rows having 1000's of tokens. Some of the state of the art methods such as BERT have a token limit and ...
1
vote
0answers
19 views

Detecting low-quality, user-created text content

I run a website that allows visitors to publish text content. It is very similar to a forum in terms of functionality. I'd like to automatically exclude or flag, submitted text content that is "spammy"...
1
vote
1answer
76 views

TF Keras Text Processing - Classification Model

I'm trying to put together a script that classifies comments into either adequate or inadequate. I put a question up here earlier with all my code, but I think I've isolated the problem down into the ...
1
vote
0answers
26 views

How to classify unseen text data?

I am training an text classifier for addresses such that if given sentence is an address or not. ...
0
votes
1answer
486 views

Overfitting with text classification using Transformers

I am trying to make a binary text classification model by using the encoder part of the transformer and then using its output to feed into an LSTM network. However, I am not able to achieve good ...
0
votes
3answers
34 views

Distinguish randomly generated texts from reasonable for human texts [closed]

I have strings short texts of 2 types: '23jd2032n0d2mn', 'fn830n30rn83', 'fhui29n4ok', 'qn4foml', ... and ...
0
votes
4answers
56 views

Clusters: how to improve results for text classification

I am trying to classify texts using kmeans, TfidfVectorizer, PCA. However, it seems that many texts are not correctly classified as you can see: I have texts in cluster2 that should be in Cluster 0 or ...
0
votes
2answers
29 views

k-means and LDA for text classification: how to test accuracy?

I have many tweets that I would like classify based on their similarity. Unfortunately I am not quite familiar with text-classification and nlp, so I had to read a lot of documents before having an ...
0
votes
1answer
32 views

How can a ML algorithm learn to classify fake news? [duplicate]

I am new in Machine learning techniques and in fake news detection by using these algorithms (SVM, nn, logistic regression,..). I would like to understand how an algorithm can learn from a training ...
0
votes
1answer
36 views

Classifiers and accuracy

I would like to ask you how to use classifier and determine accuracy of models. I have my dataset and I already cleaned the text (remove stopwords, punctuation, removed empty rows,...). Then I split ...
0
votes
1answer
20 views

(Serious) Dataset of paedophilic Youtube comments (or similar)? [closed]

I think it would be useful to create a model that tries to predict whether a youtube comment is paedophilic - maybe the model should also take into account the channel name/description/front image. It'...
0
votes
2answers
16 views

Need for Dense layer in Text Classifcation

While creating a model for text classification, what is the need for a Dense Layer? I noticed in multiple examples the following is the structure. A softmax is what required right instead of the Dense ...
0
votes
1answer
21 views

Text Classification on a very small data set with a lot of classes

I have a data set consisting of 455 rows spread over 21 different classes. The data set is imbalanced as well as you can see below. ...
0
votes
1answer
18 views

text classification : comparing classification reports

I have a 4-leabelled text classification problem. Could someone help me choose among the below text classifiers ? I was advised to select the second one ( the one which uses both unigrams and ...
0
votes
1answer
24 views

How to handle such a large class imbalance in text data?

I am working on a multi class text classifier. The total number of class that are there is 265 and total number of rows is 20,000. The class with largest number of occurrences has 6000 samples and ...
0
votes
1answer
23 views

SciKit-Learn: predict values sometimes different from top predict_proba entries?

I noticed that in my text classification problem, I get significantly worse results when I use the max of predict_proba's output as compared to the straight ...
0
votes
2answers
75 views

Training a classifier with text and numerical features - what is the state of the art?

I'm trying to build a binary classifier where the features are mostly numerical (about 20) and there are a couple of unstructured short text fields as well. What is currently considered the state of ...
0
votes
1answer
22 views

Clustering with TF-IDF and Cosine Similarity [closed]

I'm trying to cluster tf-idf vectors based on their cosine similarity, as such, I was experimenting with taking a given vector, calculating the mean cosine similarity with other vectors in the cluster,...