Questions tagged [classification]

Statistical classification is the problem of identifying the sub-population to which new observations belong, where the identity of the sub-population is unknown, on the basis of a training set of data containing observations whose sub-population is known. Therefore these classifications will show a variable behavior which can be studied by statistics.

Filter by
Sorted by
Tagged with
14
votes
8answers
7k views

Train a Neural Network to distinguish between even and odd numbers

Question: is it possible to train a NN to distinguish between odd and even numbers only using as input the numbers themselves? I have the following dataset: ...
14
votes
3answers
15k views

Choice of neural net hidden activation function

I have read elsewhere that one's choice of hidden layer activation function in a NN should be based on one's need, i.e. if you need values in the range -1 to 1 use tanh and use sigmoid for the range 0 ...
14
votes
5answers
3k views

Which statistical classification algorithm can predict true/false for a sequence of inputs?

Given a sequence of inputs, I need to determine whether this sequence has a certain desired property. The property can only be true or false, that is, there are only two possible classes that a ...
14
votes
2answers
6k views

Why does the random forest OOB estimate of error improve when the number of features selected are decreased?

I am applying a random forest algorithm as a classifier on a microarray dataset which are split into two known groups with 1000s of features. After the initial run I look at the importance of the ...
14
votes
3answers
12k views

Weighting more recent data in Random Forest model

I'm training a classification model with Random Forest to discriminate between 6 categories. My transactional data has approximately 60k+ observations and 35 variables. Here's an example of how it ...
14
votes
2answers
12k views

How does Naive Bayes work with continuous variables?

To my (very basic) understanding, Naive Bayes estimates probabilities based on the class frequencies of each feature in the training data. But how does it calculate the frequency of continuous ...
14
votes
5answers
3k views

How to do one-class text classification?

I have to deal with a text classification problem. A web crawler crawls webpages of a certain domain and for each webpage I want to find out whether it belongs to only one specific class or not. That ...
14
votes
1answer
12k views

Machine learning classifiers big-O or complexity

To evaluate the performance a new classifier algorithm, I'm trying to compare the accuracy and the complexity (big-O in training and classifying). From Machine Learning: a review I get a complete ...
14
votes
1answer
13k views

RandomForest - MDS plot interpretation

I used randomForest to classify 6 animal behaviours (eg. Standing, Walking, Swimming etc.) based on 8 variables (different body postures and movement). The MDSplot in the randomForest package gives ...
14
votes
4answers
6k views

Checking whether accuracy improvement is significant

Suppose I have an algorithm that classifies things into two categories. I can measure the accuracy of the algorithm on say 1000 test things -- suppose 80% of the things are classified correctly. Lets ...
14
votes
1answer
5k views

When over/under-sampling unbalanced classes, does maximizing accuracy differ from minimizing misclassification costs?

First of all, I would like to describe some common layouts that Data Mining books use explaining how to deal with Unbalanced Datasets. Usually the main section is named Unbalanced Datasets and they ...
14
votes
1answer
11k views

The difference between logistic regression and support vector machines?

I know that logistic regression finds a hyperplane that separates the training samples. I also know that Support vector machines finds the hyperplane with the maximum margin. My question: is the ...
14
votes
2answers
19k views

Is accuracy = 1- test error rate

Apologies if this is a very obvious question, but I have been reading various posts and can't seem to find a good confirmation. In the case of classification, is a classifier's accuracy = 1- test ...
14
votes
1answer
5k views

Using LASSO on random forest

I would like to create a random forest using the following process: Build a tree on a random samples of the data and features using information gain to determine splits Terminate a leaf node if it ...
14
votes
1answer
4k views

Why use Normalized Gini Score instead of AUC as evaluation?

Kaggle's competition Porto Seguro's Safe Driver Prediction uses Normalized Gini Score as evaluation metric and this got me curious about the reasons for this choice. What are the advantages of using ...
13
votes
4answers
53k views

How to interpret a ROC curve?

I applied logistic regression to my data on SAS and here are the ROC curve and classification table. I am comfortable with the figures in the classification table, but not exactly sure what the roc ...
13
votes
2answers
12k views

Mathematics behind classification and regression trees

Can anyone help explain some of the mathematics behind classification in CART? I'm looking to understand how two main stages happen. For instance I trained a CART classifier on a dataset and used a ...
13
votes
2answers
36k views

Using the caret package is it possible to obtain confusion matrices for specific threshold values?

I've obtained a logistic regression model (via train) for a binary response, and I've obtained the logistic confusion matrix via ...
13
votes
3answers
7k views

PCA on high-dimensional text data before random forest classification?

Does it make sense to do PCA before carrying out a Random Forest Classification? I'm dealing with high dimensional text data, and I want to do feature reduction to help avoid the curse of ...
13
votes
3answers
6k views

Restricted Boltzmann Machines for regression?

I'm following up on the question I'd asked earlier on RBMs. I see a lot of literature describing them but none that actually talks of regression (not even classification with labelled data). I get a ...
13
votes
1answer
3k views

Comparisson of two models when the ROC curves cross each other

One common measure used to compare two or more classification models is to use the area under the ROC curve (AUC) as a way to indirectly assess their performance. In this case a model with a larger ...
13
votes
2answers
15k views

How can a multiclass perceptron work?

I don't have any background in math, but I understand how the simple Perceptron works and I think I grasp the concept of a hyperplane (I imagine it geometrically as a plane in 3D space which seperates ...
13
votes
3answers
7k views

How can machine learning models (GBM, NN etc.) be used for survival analysis?

I know that traditional statistical models like Cox Proportional Hazards regression & some Kaplan-Meier models can be used to predict days till next occurrence of an event say failure etc. i.e ...
13
votes
1answer
22k views

How to train LSTM layer of deep-network

I'm using a lstm and feed-forward network to classify text. I convert the text into one-hot vectors and feed each into the lstm so I can summarise it as a single representation. Then I feed it to the ...
13
votes
4answers
4k views

Should one be concerned about multi-collinearity when using non-linear models?

Say we have a binary classification problem with mostly categorical features. We use some non-linear model (e.g. XGBoost or Random Forests) to learn it. Should one still be concerned about multi-...
13
votes
1answer
586 views

Reproducing table 18.1 from “Elements of Statistical Learning”

Table 18.1 in the Elements of Statistical Learning summarizes the performance of several classifiers on a 14 class data set. I am comparing a new algorithm with the lasso and elastic net for such ...
12
votes
2answers
6k views

When is logistic regression suitable?

I'm currently teaching myself how to do classification, and specifically I'm looking at three methods: support vector machines, neural networks, and logistic regression. What I am trying to understand ...
12
votes
2answers
18k views

Why is n-gram used in text language identification instead of words?

In two popular language identification libraries, Compact Language Detector 2 for C++ and language detector for java, both of them used (character based) n-grams to extract text features. Why is a bag-...
12
votes
2answers
4k views

How to calculate Fisher criterion weights?

I am studying pattern recognition and machine learning, and I ran into the following question. Consider a two-class classification problem with equal prior class probability $$P(D_1)=P(D_2)= \frac{...
12
votes
2answers
13k views

Linear discriminant analysis and Bayes rule: classification

What is the relation between Linear discriminant analysis and Bayes rule? I understand that LDA is used in classification by trying to minimize the ratio of within group variance and between group ...
12
votes
1answer
2k views

Name of mean absolute error analogue to Brier score?

Yesterday's question Determine accuracy of model which estimates probability of event got me curious about probability scoring. The Brier score $$\frac{1}{N}\sum\limits _{i=1}^{N}(prediction_i - ...
12
votes
2answers
6k views

optimizing auc vs logloss in binary classification problems

I am performing a binary classification task where the outcome probability is fair low (aroung 3%). I am trying to decide whether to optimize by AUC or log-loss. As much as I have understood, AUC ...
12
votes
1answer
2k views

The relationship between the number of support vectors and the number of features

I ran an SVM against a given data set, and made the following observation: If I change the number of features for building the classifier, the number of resulting support vectors will also be changed. ...
12
votes
2answers
7k views

PCA and random forests

For a recent Kaggle competition, I (manually) defined 10 additional features for my training set, which would then be used to train a random forests classifier. I decided to run PCA on the dataset ...
12
votes
2answers
6k views

Applying machine learning for DDoS filtering

In Stanford's Machine Learning course Andrew Ng mentioned applying ML in IT. Some time later when I got moderate size(about 20k bots) DDoS on our site I decided to fight against it using simple Neural ...
12
votes
2answers
3k views

Why does increasing the number of features reduce performance?

I'm trying to gain an intuition as to why increasing the number of features could reduce performance. I'm currently using an LDA classifier which performs better bivariately among certain features ...
12
votes
1answer
25k views

How do I train HMM's for classification?

So I understand that when you train HMM's for classification the standard approach is: Separate your data sets into the data sets for each class Train one HMM per class On the test set compare the ...
12
votes
1answer
5k views

Does a sparse training set adversely affect an SVM?

I'm trying to classify messages into different categories using an SVM. I've compiled a list of desirable words/symbols from the training set. For each vector, which represents a message, I set the ...
12
votes
1answer
7k views

Which is a better cost function for a random forest tree: Gini index or entropy?

Which is a better cost function for a random forest tree: Gini index or entropy? I am trying to implement random forest in Clojure.
12
votes
3answers
14k views

Can the mean squared error be used for classification?

I know the mean squared error formula and how to compute it. When we talk about a regression we can compute the mean squared error. However can we talk about a MSE for a classification problem and how ...
12
votes
1answer
3k views

What classification algorithm should one use after seeing that t-SNE separates classes well?

Let's assume we have a classification problem and at first we want to get some insight from the data and we do t-SNE. The result of t-SNE separates classes very well. This implies that it is possible ...
12
votes
1answer
13k views

How to reduce number of false positives?

I'm trying to solve task called pedestrian detection and I train binary clasifer on two categories positives - people, negatives - background. I have dataset: number of positives= 3752 number of ...
12
votes
3answers
3k views

Naive Bayes feature probabilities: should I double count words?

I'm prototyping my own Naive Bayes bag o' words model, and I had a question about calculating the feature probabilities. Let's say I've got two classes, I'll just use spam and not-spam since that's ...
12
votes
2answers
7k views

Predicting multiple targets or classes?

Suppose I am building a predictive model where I am trying to predict multiple events (for instance, both the roll of a die and the toss of a coin). Most algorithms that I am familiar with work with ...
11
votes
5answers
1k views

Why we reject the null hypothesis at the 0.05 level and not the 0.5 level (as we do in the Classification)

Hypothesis testing is akin to a Classification problem. So say, we have 2 possible labels for an observation (subject) -- Guilty vs. Non-Guilty. Let Non-Guilty be the null Hypothesis. If we viewed the ...
11
votes
3answers
4k views

Why do we need to fit a k-nearest neighbors classifier?

As I understood, k-NN is a lazy learner algorithm and it doesn't need a training phase. So why do we need to use .fit() with sklearn and what happens when we use it?...
11
votes
4answers
139 views

Possible to get a better ANN by removing some connections?

I was wondering if there under some circumstances is possible for ANN's to perform better if you prune away some connections on them as for example: Constructing one ANN by taking two multi-layered ...
11
votes
2answers
7k views

Time-series classification - very poor results

I am working on a time series classification problem where the input is time series voice usage data (in seconds) for the first 21 days of a cell phone account. The corresponding target variable is ...
11
votes
3answers
1k views

The first principal component does not separate classes, but other PCs do; how is that possible?

I ran PCA on 17 quantitative variables in order to obtain a smaller set of variables, that is principal components, to be used in supervised machine learning for classifying instances into two classes....
11
votes
2answers
2k views

Compare classifiers based on AUROC or accuracy?

I have a binary classification problem and I experiment different classifiers on it: I want to compare the classifiers. which one is a better measure AUC or accuracy? And why? ...