Goto

Collaborating Authors

Text Classification


Text Classification with Machine Learning vs Deep Learning

#artificialintelligence

The preprocessing part of the pipeline is a very important step, as it can impact greatly the model's performance. Depending on which model will be used, the original text may need to be modified so it has the most appropriate format to feed the model. When using Bag of Words, we want all similar words (e.g. To do this, we will extract the lemma of every token in the text and remove all stop words and every symbol that won't contribute to the model, which translates into lemmatization and cleaning of the text. On the other hand, if the context of the text is what we aim to focus on, then different words should not be merged into a single base form.


Zero-shot Text Classification vs. Similarity-based Text Classification

#artificialintelligence

This post is based on our NLPIR 2022 paper "Evaluating Unsupervised Text Classification: Zero-shot and Similarity-based Approaches". You can read more details there. Unsupervised text classification approaches aim to perform categorization without using annotated data during training and therefore offer the potential to reduce annotation costs . Generally, unsupervised text classification approaches aim to map text to labels based on their textual description, without using annotated training data. To accomplish this, there exist mainly two categories of approaches. The first category can be summarized under similarity-based approaches.


Interpreting the Prediction of BERT Model for Text Classification

#artificialintelligence

Integrated gradients is a method to compute the attribution of each feature of a deep learning model based on the gradient of the model's output (prediction) with respect to the input. This method applies to any deep learning model for classification and regression tasks. As an example, let's say that we have a text classification model and we want to interpret its prediction. With integrated gradients, in the end, we will get the attribution score of each input word with respect to the final prediction. We can use this attribution score to find out which words play an important role in our model's final prediction.


NLP and Customer Funnel: Using PySpark to Weight Events

#artificialintelligence

The customer funnel, also known as the marketing funnel or sales funnel, is a conceptual model that represents the journey a customer goes through as they move from awareness of a product or service to the point of purchase. The funnel is usually depicted as a wide top that narrows as it progresses downward, with each stage representing a different phase in the customer's journey. Understanding the customer funnel can help businesses understand how to effectively market and sell their products or services and identify areas where they can improve the customer experience. TF-IDF, which stands for "term frequency-inverse document frequency," is a statistical measure that can be used to assign weights to words or phrases in a document. It is commonly used in information retrieval and natural language processing tasks, including text classification, clustering, and search. In the context of the customer funnel, TF-IDF could be used to weigh different events or actions that a customer takes as they move through the funnel.


Text classification on a custom dataset using Huggingface Trainer🤗

#artificialintelligence

By defining the TrainingArguments and instantiating the Trainer, we can create a model to fine-tune DistilBert on the prepared dataset. As part of fine-tuning with minimal changes to the DistilBert, we will be training the classifier(Feed-forward neural network softmax).


Text Classification using Watson NLP

#artificialintelligence

You can downsample the dataset in the data processing step to reduce the model training time. Some of the product categories have fewer instances compared to others. So, you can drop those categories before training the model. Finally, you can carry out the train-test split using the sampling method on the Pandas dataframe. One crucial step required here is to convert the dataframe into the JSON or CSV format as required by the Watson NLP classification algorithm.


Classify Finance Tweets Faster Using Sparsity - Neural Magic

#artificialintelligence

The world of finance and stock trading has changed in recent years. As more and more retail investors enter the market, the more important stories and social sentiment become. Think Tesla - one can argue that a lot of the company's value comes from successful social storytelling by its CEO Elon Musk. Social media has the power to turn a bull into a bear and a bear into a bull. Classifying finance tweets using NLP to understand social sentiment is increasingly more important.


Transfer learning for TensorFlow text classification models in Amazon SageMaker

#artificialintelligence

Dr. Vivek Madan is an Applied Scientist with the Amazon SageMaker JumpStart team. He got his PhD from University of Illinois at Urbana-Champaign and was a Post Doctoral Researcher at Georgia Tech. He is an active researcher in machine learning and algorithm design and has published papers in EMNLP, ICLR, COLT, FOCS and SODA conferences. João Moura is an AI/ML Specialist Solutions Architect at Amazon Web Services. He is mostly focused on NLP use-cases and helping customers optimize deep learning model training and deployment. He is also an active proponent of low-code ML solutions and ML-specialized hardware. Dr. Ashish Khetan is a Senior Applied Scientist with Amazon SageMaker built-in algorithms and helps develop machine learning algorithms. He got his PhD from University of Illinois Urbana Champaign. He is an active researcher in machine learning and statistical inference and has published many papers in NeurIPS, ICML, ICLR, JMLR, ACL, and EMNLP conferences.


Automated Classification of Intramedullary Spinal Cord Tumors and Inflammatory Demyelinating Lesions Using Deep Learning

#artificialintelligence

Accurate differentiation of intramedullary spinal cord tumors and inflammatory demyelinating lesions and their subtypes are warranted because of their overlapping characteristics at MRI but with different treatments and prognosis. The authors aimed to develop a pipeline for spinal cord lesion segmentation and classification using two-dimensional MultiResUNet and DenseNet121 networks based on T2-weighted images. A retrospective cohort of 490 patients (118 patients with astrocytoma, 130 with ependymoma, 101 with multiple sclerosis [MS], and 141 with neuromyelitis optica spectrum disorders [NMOSD]) was used for model development, and a prospective cohort of 157 patients (34 patients with astrocytoma, 45 with ependymoma, 33 with MS, and 45 with NMOSD) was used for model testing. In the test cohort, the model achieved Dice scores of 0.77, 0.80, 0.50, and 0.58 for segmentation of astrocytoma, ependymoma, MS, and NMOSD, respectively, against manual labeling. Accuracies of 96% (area under the receiver operating characteristic curve [AUC], 0.99), 82% (AUC, 0.90), and 79% (AUC, 0.85) were achieved for the classifications of tumor versus demyelinating lesion, astrocytoma versus ependymoma, and MS versus NMOSD, respectively.


How Document Classification works part3(Artificial Intelligence)

#artificialintelligence

Abstract: Recently, graph neural networks (GNNs) have been widely used for document classification. However, most existing methods are based on static word co-occurrence graphs without sentence-level information, which poses three challenges:(1) word ambiguity, (2) word synonymity, and (3) dynamic contextual dependency. To address these challenges, we propose a novel GNN-based sparse structure learning model for inductive document classification. Specifically, a document-level graph is initially generated by a disjoint union of sentence-level word co-occurrence graphs. Our model collects a set of trainable edges connecting disjoint words between sentences and employs structure learning to sparsely select edges with dynamic contextual dependencies.