46
votes
Accepted
Understanding predict_proba from MultiOutputClassifier
Assuming your target is (0,1), then the classifier would output a probability matrix of dimension (N,2).
The first index refers to the probability that the data belong to class 0, and the second ...
24
votes
What does it mean to "share parameters between features and classes"
I will try to answer this question through logistic regression, one of the simplest linear classifiers.
The simplest case of logistic regression is if we have a binary classification task ($y \in\{0,...
11
votes
How to use sklearn train_test_split to stratify data for multi-label classification?
Try this:
from skmultilearn.model_selection import iterative_train_test_split
X_train, y_train, X_test, y_test = iterative_train_test_split(x, y, test_size = 0.1)
...
10
votes
Accepted
What is the formula to calculate the precision, recall, f-measure with macro, micro, none for multi-label classification in sklearn metrics?
Generally, the scoring metrics you are looking at are defined as following (see for example Wikipedia):
$$precision = \frac{TP}{TP+FP}$$
$$recall= \frac{TP}{TP+FN}$$
$$F1 = \frac{2 \times precision \...
7
votes
Multi-class neural net always predicting 1 class after optimization
It could be a bug in your code, problems with your training set (maybe you don't have the file format quite right), or some other implementation issue.
Are you sure you want to use a sigmoid ...
7
votes
Understanding predict_proba from MultiOutputClassifier
In the MultiOutputClassifier, you're treating the two outputs as separate classification tasks; from the docs you linked:
This strategy consists of fitting one ...
6
votes
Accepted
Dealing with extreme values in softmax cross entropy?
Where exactly in the computations are these underflows manifesting? See here for a brief explanation around the extremes of the softmax.
Quick fixes could be to either increase the precision of your ...
5
votes
Multi-class neural net always predicting 1 class after optimization
You learn a lot by comparing to a naive model. A naive model is one without any features. As a default, it will always predict the most likely Target. Note that this is exactly what your model is ...
5
votes
Accepted
Deep Learning with Spectrograms for sound recognition
RNNs were not producing good enough results and are also hard to train so I went with CNNs.
Because a specific animal sound is only a few seconds long we can divide the spectrogram into chunks. I ...
5
votes
Accepted
Class weight degrades Multi Label Classification Performance
Adding class weight but not changing the way you measure performance will usually degrade overall performance as it is designed to allow increased loss on lower-weighted classes.
I would recommend ...
5
votes
How to use sklearn train_test_split to stratify data for multi-label classification?
The error you're getting indicates it cannot do a stratified split because one of your classes has only one sample. You need at least two samples of each class in order to put one in the training ...
5
votes
Accepted
Understanding `get_combination_wise_output_matrix` when investigating a multi-label classification problem
So order here means how many possible combinations of labels you want to compare (e.g., order=1 would by how often does each label appear, ...
5
votes
Accepted
Multiple classes present in one-hot encoding
Yes, it is possible to do it exactly as you describe it. This is called multilabel-classification.
If doing so, you would treat each element of the output as an independent prediction of a binary ...
4
votes
Deep Learning with Spectrograms for sound recognition
For automatic speech recognition (ASR), filter bank features perform as good as CNN on spectrograms Table 1. You can train a DBN-DNN system on fbank for classifying animals sounds.
In practice ...
4
votes
Multi target classification for different types of target variables
You have one classification task and one regression task, but sklearn's multioutput meta-estimators only support two tasks of the same type.
The best solution here is to train two models:
A binary ...
4
votes
Accepted
Where can I find freely available multi-label datasets online?
You can find a complete repository of around 80 multi-label datasets here :
4
votes
Accepted
Multi-label classification model in python?
First of all you would need to encode your target columns.We can use sklearn.preprocessing.MultiLabelBinarizer here:
...
4
votes
Accepted
What's the difference between multi label classification and fuzzy classification?
Multi-label classification (Wiki):
Given $K$ classes, find a map $f:X \rightarrow \{0, 1\}^K$.
Fuzzy classification (a good citation is needed!):
Given $K$ classes, find a map $p: X \rightarrow [0, ...
4
votes
Transform multi-label problem to multi-class problem
A multi-label problem is when an instance can have several labels, for instance a system which classifies news articles by topic could do this:
instance 1: politics, society
instance 2: sports
...
4
votes
How to get feature importance from RandomForest using scikit-multilearn library?
First, to directly answer your question, the easiest way to get Feature Importance using scikit learn is this, where model is the variable holding your classifier.
...
4
votes
Accepted
How to trust the labels generated using ML models?
So when we generate labels via machine learning models like clustering above, is it a recommended approach? Only if you can really make highly distinct 2 clusters/groups. This will be highy unlikely, ...
4
votes
How can I label (predict) an unseen set of data based on an existing model?
You need to use the same preprocessing elements (dictionary etc) that you used to create your tfidf matrix during training when you come to apply your model to unseen data.
Do not create a new ...
3
votes
Accepted
Using tensorflow for any type of dataset
TensorFlow is a general purpose library for numerical computation using data flow graphs. It is primarily used for neural networks but can be used for any mathematical operations on multidimensional ...
3
votes
Multi-class text classification with LSTM in Keras
After I read the source code, I find out that keras.datasets.imdb.load_data doesn't actually load the plain text data and convert them into vector, it just loads ...
3
votes
How do you calculate Precision and Recall using a confusion matrix in Matlab?
if yHat are your predictions and yval are your y true then
...
3
votes
Where can I find a crowdsourced dataset for multi-label classification with individual participant labels?
I'll think you'll find what you're looking for in this question on Open Data. I've checked the Pew Research Center data, and found this poll about cyber-security that seems to be something like what ...
3
votes
How to use Automated Labelling for documents?
Semi-supervised learning. You label 1% manually, let the algorithm learn, then it labels unknown data, learns from it and labels again.
3
votes
Accepted
Why does averaging a sentence's worth of word vectors work?
It works for the same reason why the good old bag-of-words + TF-IDF works. Despite loosing some word ordering information, a text can be still classified by the typical keywords. Since texts on ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
multilabel-classification × 324classification × 96
machine-learning × 92
multiclass-classification × 66
python × 53
deep-learning × 43
scikit-learn × 35
keras × 34
neural-network × 28
nlp × 24
tensorflow × 18
image-classification × 15
dataset × 13
class-imbalance × 13
random-forest × 12
labels × 12
lstm × 11
time-series × 10
accuracy × 10
machine-learning-model × 8
svm × 8
loss-function × 8
logistic-regression × 7
supervised-learning × 7
metric × 7