Questions tagged [classification]

An instance of supervised learning that identifies the category or categories which a new instance of dataset belongs.

Filter by
Sorted by
Tagged with
222
votes
11answers
296k views

How to set class weights for imbalanced classes in Keras?

I know that there is a possibility in Keras with the class_weights parameter dictionary at fitting, but I couldn't find any example. Would somebody so kind to ...
34
votes
4answers
15k views

Quick guide into training highly imbalanced data sets

I have a classification problem with approximately 1000 positive and 10000 negative samples in training set. So this data set is quite unbalanced. Plain random forest is just trying to mark all test ...
20
votes
1answer
24k views

How is a splitting point chosen for continuous variables in decision trees?

I have two questions related to decision trees: If we have a continuous attribute, how do we choose the splitting value? Example: Age=(20,29,50,40....) Imagine that we have a continuous attribute $f$...
31
votes
4answers
32k 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 ...
12
votes
1answer
4k views

Using a pre trained CNN classifier and apply it on a different image dataset

How would you optimize a pre-trained neural network to apply it to a separate problem? Would you just add more layers to the pre-trained model and test it on your ...
2
votes
1answer
173 views

Can a decision in a node of a decision tree be based on comparison between 2 columns of the dataset?

Assume the features in the dataframe are columns - A,B,C and my target is Y Can my decision tree have a decision node which looks for say, ...
9
votes
1answer
3k views

Can The linearly non-separable data be learned using polynomial features with logistic regression?

I know that Polynomial Logistic Regression can easily learn a typical data like the following image: I was wondering whether the following two data also can be ...
14
votes
2answers
23k views

How to calculate VC-dimension?

Im studying machine learning, and I would like to know how to calculate VC-dimension. For example: $h(x)=\begin{cases} 1 &\mbox{if } a\leq x \leq b \\ 0 & \mbox{else } \end{cases} $, with ...
1
vote
4answers
6k views

Exceptionally high accuracy with Random Forest, is it possible?

I need your help to find a flaw in my model, since it's accuracy (95%) is not realistic. I'm working on a classification problem using Randomforest, with around 2500 positive case and 15000 negative ...
1
vote
1answer
93 views

Class imbalance strategies

When dealing with the class imbalance problem in a binary classifier, there are three ways I know of to address it: over-sampling, under-sampling and using cost-sensitive methods. Are there any ...
4
votes
2answers
1k views

For imbalanced classification, should the validation dataset be balanced?

I am building a binary classification model for imbalanced data (e.g., 90% Pos class vs 10% Neg Class). I already balanced my training dataset to reflect a a 50/50 class split, while my holdout (...
3
votes
4answers
500 views

What is the difference between classification and regression?

I understand classification....a discrete response or category, like animal is dog or cat. The author says..."Regression techniques predict continuous changes such as the change in temperature, power ...
2
votes
2answers
1k views

Explain Binary Classification with output 0.5 (True)

What is the interpretation of output 0.5 of a typical classifier? I made a prediction and the probability of that data point being from the True class is 0.5.
64
votes
7answers
39k views

Cosine similarity versus dot product as distance metrics

It looks like the cosine similarity of two features is just their dot product scaled by the product of their magnitudes. When does cosine similarity make a better distance metric than the dot product? ...
14
votes
3answers
17k views

When should we consider a dataset as imbalanced?

I'm facing a situation where the numbers of positive and negative examples in a dataset are imbalanced. My question is, are there any rules of thumb that tell us when we should subsample the large ...
16
votes
4answers
53k views

Train, test split of unbalanced dataset classification

I have a model that does binary classification. My dataset is highly unbalanced, so I thought that I should balance it by undersampling before I train the model. So balance the dataset and then ...
6
votes
3answers
9k views

How to deal with categorical feature of very high cardinality?

I would like to train a binary classifier on feature vectors. One of the features is categorical feature with string, it is the zip codes of a country. Typically, there is thousands of zip codes, and ...
11
votes
2answers
936 views

When do we say that the dataset is not classifiable?

I have many times analysed a dataset on which I could not really do any sort of classification. To see whether I can get a classifier I have usually used the following steps: Generate box plots of ...
6
votes
2answers
1k views

Machine Learning - Where is the difference between one-class, binary-class and multinominal-class classification?

Where is the difference between one-class, binary-class and multinominal-class classification? If I like to classify text in lets say four classes and also want the system to be able to tell me that ...
4
votes
2answers
12k views

How to classify and cluster this time series data [duplicate]

I have post already the question few months ago about my project that I'm starting to work on. This post can be see here: Human activity recognition using smartphone data set problem Now, I know ...
10
votes
4answers
3k views

Skewed multi-class data

I have a dataset which contains ~100,000 samples of 50 classes. I have been using SVM with an RBF kernel to train and predict new data. The problem though is the dataset is skewed towards different ...
6
votes
3answers
1k views

Classifying transactions as malicious

I have a big data set of fake transactions for a company. Each row contains the username, credit card number, time, device used, and amount of money in the transaction. I need to classify each ...
11
votes
6answers
9k views

What are helpful annotation tools (if any)

I'm looking for tools that would help me and my team annotate training sets. I work in an environment with large sets of data, some of which are un- or semi-structured. In many cases there are ...
8
votes
1answer
2k views

Binary classification of every time series step based on past and future values

I'm currently facing a Machine Learning problem and I've reached a point where I need some help to proceed. I have various time series of positional (x, ...
4
votes
2answers
6k views

How to further improve the kaggle titanic submission accuracy?

I am working on the Titanic dataset. So far my submission has 0.78 score using soft majority voting with logistic regression and random forest. As for the features, I used Pclass, Age, SibSp, Parch, ...
3
votes
1answer
313 views

ANN on Pattern Recognition

I have been trying to apply a simple neural network using keras to predict a sequence of numbers and the rule is if the input integer is odd it should be 4 and if its even it should be 2. Yet the ...
7
votes
2answers
1k views

Why are precision and recall used in the F1 score, rather than precision and NPV?

In binary classification problems it seems the F1 score is often used as a performance measure. As far as I've understood the idea is to find the best tradeoff between precision and recall. The ...
6
votes
4answers
694 views

What are the possible ways to detect skin while classifying diseases?

I am working on a skin disease classification problem where I have successfully created a classifier ( TensorFlow + Keras ) which can classify images of two skin diseases. The sample image needs to ...
3
votes
2answers
1k views

Cluster documents based on topic similarity

I have set of documents where I have assigned topics per each document. E.g., Topics of document 1 -> 1.0 Science, 1.0 politics, 0.8 History, 0. 8 Information and Technology Now I want to cluster ...
6
votes
3answers
8k views

Neural network for Multiple integer output

I have a data set that contains 135 input features and 132 output values to be predicted. The input features are all numeric floating point values and each output value would be an integer between [0,...
4
votes
1answer
196 views

Fine-tuning a CNN for recognizing two classes, but also being able to tell if none of them is present in an image

I need to fine-tune a CNN to classify two classes: dogs and cats, for example. However, I want the CNN to be able to tell if ...
3
votes
1answer
1k views

What to report in the build model, asses model and evaluate results steps of CRISP-DM?

I would greatly appreciate if you could let me know what to report in the following steps of CRISP-DM? Build Model: what should be reported for parameter settings, models and model description? I ...
2
votes
1answer
8k views

How Does Weighted KNN Work?

I am reading notes on using weights for KNN and I came across an example that I don't really understand. Suppose we have K = 7 and we obtain the following: Decision set = {A, A, A, A, B, B, B} If ...
2
votes
1answer
54 views

How much imbalance in a training set is a problem?

In a simple binary classification problem, at what point does majority class to minority class become significant become significant? Intuitively, I would expect a 3:1 ratio to not be an issue, maybe ...
6
votes
1answer
744 views

How to detect overfitting of a stock screener

The project I am working on allows users to create Stock Screeners based on both technical and fundamental criteria. Stock Screeners are then "backtested" by simulating the results of applying in ...
6
votes
1answer
19k views

Validation loss increases and validation accuracy decreases

I have an issue with my model. I'm trying to use the most basic Conv1D model to analyze review data and output a rating of 1-5 class, therefore the loss is categorical_crossentropy. Model structure is ...
5
votes
2answers
127 views

Confused AUC ROC score

I am working on binary classification problem, I try to evaluate the performance of some classification algorithms (LR,Decission Tree , Random forest ...). I am using a cross validation technique (to ...
3
votes
1answer
273 views

Is the activation function the only difference between logistic regression and perceptron?

As far as I know, logistic regression can be denoted as: $$ f(x) = \sigma(w \cdot x + b) $$ A perceptron can be denoted as: $$ f(x) = \operatorname{sign} (w \cdot x + b) $$ It seems that the only ...
3
votes
2answers
342 views

Time series binary classificaiton with labelling issues

My situation is quite complicated so I will give a similar example from a simpler domain. Suppose we want to try to predict WHEN a mobile game users will make a purchase if given a sale. Almost every ...
2
votes
2answers
37 views

Low scale ML/statistical techniques for data poor settings

I have two separate problems. One is logistic regression and other is time series prediction. But both suffer from paucity of data problems a) For logistic regression, I have tiny dataset with 10 ...
0
votes
1answer
26 views

How to compare models and which settings to keep constant? [closed]

I already posted this in another forum but no response. So, posting it here. Currently, in clinical practice, clinicians use a score (as a single feature) to predict the mortality of a patient. Now in ...
29
votes
4answers
28k views

What algorithms should I use to perform job classification based on resume data?

Note that I am doing everything in R. The problem goes as follow: Basically, I have a list of resumes (CVs). Some candidates will have work experience before and some don't. The goal here is to: ...
28
votes
5answers
43k views

When would one use Manhattan distance as opposed to Euclidean distance?

I am trying to look for a good argument on why one would use the Manhattan distance over the Euclidean distance in machine learning. The closest thing I found to a good argument so far is on this MIT ...
28
votes
5answers
41k views

Are decision tree algorithms linear or nonlinear

Recently a friend of mine was asked whether decision tree algorithms are linear or nonlinear algorithms in an interview. I tried to look for answers to this question but couldn't find any satisfactory ...
17
votes
1answer
17k views

What's the difference between Sklearn F1 score 'micro' and 'weighted' for a multi class classification problem?

I have a multi-class classification problem with class imbalance. I searched for the best metric to evaluate my model. Scikit-learn has multiple ways of calculating the F1 score. I would like to ...
23
votes
2answers
35k views

How to interpret classification report of scikit-learn?

As you can see, it is about a binary classification with linearSVC. The class 1 has a higher precision than class 0 (+7%), but class 0 has a higher recall than class 1 (+11%). How would you interpret ...
17
votes
3answers
3k views

One-Class discriminatory classification with imbalanced, heterogenous Negative background?

I'm working on improving an existing supervised classifier, for classifying {protein} sequences as belonging to a specific class (Neuropeptide hormone precursors), or not. There are about 1,150 known ...
12
votes
1answer
18k views

How does the naive Bayes classifier handle missing data in training?

Naive Bayes apparently handles missing data differently, depending on whether they exist in training or testing/classification instances. When classifying instances, the attribute with the missing ...
11
votes
3answers
17k 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 ...
8
votes
1answer
4k views

Why doesn't class weight resolve the imbalanced classification problem?

I know that in imbalanced classification, the classifier tends to predict all the test labels as larger class label, but if we use class weight in loss function, it would be reasonable to expect the ...