Questions tagged [multiclass-classification]

Multi-class classification is when you have a classification problem with multiple classes, specifically 3 or more classes. Many classifications are binary by design, therefore the additional nomenclature of multi-class classification was defined to describe algorithms capable of classifying datasets with more than 2 classes.

Filter by
Sorted by
Tagged with
263 votes
8 answers
314k views

Micro Average vs Macro average Performance in a Multiclass classification setting

I am trying out a multiclass classification setting with 3 classes. The class distribution is skewed with most of the data falling in 1 of the 3 classes. (class labels being 1,2,3, with 67.28% of the ...
user avatar
36 votes
6 answers
40k views

Unbalanced multiclass data with XGBoost

I have 3 classes with this distribution: Class 0: 0.1169 Class 1: 0.7668 Class 2: 0.1163 And I am using xgboost for ...
user avatar
  • 525
4 votes
2 answers
4k views

Encode multi-class response variable

In a classification problem when the response variable has multi-class, e.g., "sunny","rainy","cloudy", how should we encode it? I know that for predictors like this, usually we do One Hot Encoding, ...
user avatar
  • 525
4 votes
4 answers
4k views

Scikit Learn Missing Data - Categorical values

I have a dataset containing categorical features, which has 4 labels, and 4 features. (It is a meta classifier, so outputs from base classifier serve as input into this classifier) ...
user avatar
  • 297
0 votes
1 answer
117 views

Learning curves

I am working on a multiclass classification problem. I want to know whether my model is overfitting or underfitting. I am learning how to plot learning curves and have 4 doubts. 1.) Is the ordering of ...
user avatar
  • 1,263
9 votes
2 answers
22k views

weighted cross entropy for imbalanced dataset - multiclass classification

I am trying to classify images to more then a 100 classes, of different sizes ranged from 300 to 4000 (mean size 1500 with std 600). I am using a pretty standard CNN where the last layer outputs a ...
user avatar
  • 129
3 votes
1 answer
3k views

F1_score(average='micro') is equal to calculating accuracy for multiclasification

Is f1_score(average='micro') always the same as calculating the accuracy. Or it is just in this case? I have tried with different values and they gave the same answer but I don't have the analytical ...
user avatar
3 votes
1 answer
1k views

Transform multi-label problem to multi-class problem

What are the downsides of modelling a multi-label problem as a multi-class problem with a single classifier? Let my clarify what I mean. There at least two ways that one multi-label problem can be ...
user avatar
  • 997
10 votes
5 answers
23k views

How does Sigmoid activation work in multi-class classification problems

I know that for a problem with multiple classes we usually use softmax, but can we also use sigmoid? I have tried to implement digit classification with sigmoid at the output layer, it works. What I ...
user avatar
11 votes
3 answers
18k views

What is the best method for classification of time series data? Should I use LSTM or a different method?

I am trying to classify raw accelerometer data x,y,z to its corresponding label. What is the best architecture for best results? Or, does anyone have any suggestions on LSTM architectures built on ...
user avatar
  • 143
14 votes
2 answers
10k views

Keras Multiple “Softmax” in last layer possible?

Is it possible to implement mutiple softmaxes in the last layer in Keras? So the sum of Nodes 1-4 = 1; 5-8 = 1; etc. Should I go for a different network design?
user avatar
4 votes
3 answers
21k views

Multi-class neural net always predicting 1 class after optimization

During training, the neural net settles into a place where it always predicts 1 of the 5 classes. My train and test sets are distributed as such: ...
user avatar
  • 59
2 votes
1 answer
262 views

ML - Service Desk classification

I'm trying to explore an use-case in ML but stuck at a point. May i please request your advise please. Have a service desk web application for logging tickets, which is essentially a form having ...
user avatar
  • 431
2 votes
3 answers
3k views

Handling large imbalanced data set

I have an imbalanced data set consisting of some 10's of millions text strings, each with thousands of features created by uni- and bigrams, and additionally I have also the string length and entropy ...
user avatar
  • 171
6 votes
1 answer
1k views

SPARK, ML: Naive Bayes classifier often assigns 1 as probability prediction

Hi I am using Spark ML to optimise a Naive Bayes multi-class classifier. I have about 300 categories and I am classifying text documents. The training set is balanced enough and there is about 300 ...
user avatar
  • 564
4 votes
3 answers
7k views

Appropriate algorithm for string (not document) classification?

I am trying to classify a large-ish number of small strings (millions) into about 10 disjunct categories. Examples of classes and strings for each class include: ...
user avatar
3 votes
3 answers
1k views

Evaluation methods for multi-class classification

I am looking for single-number evaluation method that can be used in multi-class classification tasks that take into account imbalanced data-sets. For instance, ...
user avatar
  • 5,674
2 votes
1 answer
2k views

Balancing XGboost still skews towards the majority class

I have unbalanced dataset for multiclass classification and I tried to use the class weights option in XGboost and the classifier still tends to favor the majority class. I am not sure if I need to ...
user avatar
  • 41
2 votes
1 answer
440 views

Confusion between precision and recall

I have a machine learning model that try to fingerprint the functions in a binary file with a corpus. Final output of upon inputing a binary file is a table with one to one mapping between the binary ...
user avatar
  • 131
0 votes
1 answer
710 views

LSTM Multi-class classification for large number of classes

I want to build a model that classifies 473 classes -product categories-, but I'm facing a problem with loss not decreasing. Data I have almost 3,000 data points for each class -473 classes- (data ...
user avatar
  • 103
8 votes
3 answers
13k views

Good performance metrics for multiclass classification problem besides accuracy?

I am trying to solve a multiclass classification problem. The dataset is balanced. I have been using accuracy as a performace metric till now. Are there any other good performance metrics for this ...
user avatar
5 votes
1 answer
3k views

Micro Average vs Macro Average for Class Imbalance

I have a dataset consisting of around 30'000 data points and 3 classes. The classes are imbalanced (around 5'000 in class 1, 10'000 in class 2 and 15'000 in class 3). I'm building a convolutional ...
user avatar
  • 234
3 votes
2 answers
223 views

Does Sampling size matters in Multi classification Model

I am working on a multi class classification model where few of the class are with less data compare to other classes. I used random sampling technique to create a sample from the population keeping ...
user avatar
3 votes
1 answer
2k views

Should estimated probabilities from multi class classification sum to 1

I am using a neural network with sigmoid activation function $h(z) = 1 / {(1+e^{-z})} $ in order to classify image data into 6 categories. When running the trained neural network over new image data, ...
user avatar
3 votes
1 answer
2k views

Activation method and Loss function for multilabel multiclass classification

I am using CNN for Sentence Classification code by Yoonkim. This is used for text classification. I noticed that he uses softmax layer and negative log likelihood error. This is optimal for single ...
user avatar
  • 2,296
1 vote
1 answer
5k views

Sklearn classification report is not printing the micro avg score for multi class classification model

There are 6 class labels encoded as 0,1,2,3,4,5 While executing classification report score it outputs accuracy,macro avg,weighted avg .The micro average score is missing in the output . Im not ...
user avatar
  • 1,201
1 vote
2 answers
526 views

A robust metric in the presence of class imbalance

When evaluating the performance of a multiclass classification problem, on a highly imbalanced dataset, what is the most robust metric for this purpose? I read a paper that states: "Average ...
user avatar
  • 571
1 vote
1 answer
631 views

Naive bayes, all of the elements in predict_proba output matrix are less than 0.5

I've created a MultinomialNB classifier model by which I'm trying to label some test texts: ...
user avatar
  • 257
1 vote
1 answer
895 views

Multiclass classification in a balanced dataset with one high-priority label

I have a balanced dataset for a multiclass classification problem with one high-priority label (this ought to be classified properly at all costs). How do I go about creating a workflow for this ...
user avatar
0 votes
1 answer
68 views

Transform multi-class problem to multi-label problem

I found this question but I need an answer to the other direction. Example: Let's say we want to predict if a person with a certain profile wants to buy product A and/or B. So we have 2 binary classes ...
user avatar
0 votes
2 answers
663 views

Non-mutal exclusive classification task examples

I am reading the excellent Hands-on Machine Learning with Scikit-Learn and TensorFlow and in chapter 10, the author says: "For the output layer, the softmax activation function is generally a ...
user avatar
0 votes
1 answer
786 views

How is calculated the error with multiple output neurons in neural network?

Machine Learning books generally explains that the error calculated for a given sample $i$ is: $e_i = y_i - \hat{y_i}$ Where $\hat{y}$ is the target output and $y$ is the actual output given by the ...
user avatar