Questions tagged [binning]

Binning means grouping a continuous variable into discrete categories. It is particularly used in reference to histograms, but could also be used more generally in the sense of coarsening.

Filter by
Sorted by
Tagged with
0
votes
2answers
47 views

Is it justified to discretize / bin a skewed variable in a classification problem?

How would a skewed variable impact a classification problem (logistic regression, tree model)? Is it justified to bin the skewed variable ? My data set comprises of younger demographic and fewer older ...
0
votes
0answers
23 views

Converting Continuous variable to Categorical [duplicate]

When should one consider converting continuous variable into categorical variable ? Are there guidelines ? Is it justified to bin skewed variable ? How should I determine the range / binning when I do ...
1
vote
1answer
16 views

Can you use clustering models such as k-mean or knn to do feature binning?

I currently working with a financial dataset in Python which contains a feature (among many others) called "interest rate", which represents the interest rate that a certain loan would have. ...
2
votes
2answers
88 views

Should discretized continous varibles be treated as numeric or ordinal (in a GLM)?

I am uncertain about how to treat a discretized / binned continuous variable in the glm() function in R. I see two possible ways of feeding it to the glm. Either I ...
0
votes
0answers
24 views

Increase in SVM Classifier performance after binning

I've been working on a classification problem, and I ran into something rather strange. The original problem has continuous features and three labels. I then mapped the continuous features to binary ...
0
votes
0answers
13 views

Inferring truncated distribution and mortality rates from age-binned population data

Ultimate goal: compare age-specific and age-standardized mortality rates between two populations with different age distributions. The population data are in age bins (slightly different for each ...
0
votes
0answers
10 views

Freedmans rule to find number of bins

I have a data set that is 30162 rows long. I am trying to split age into bins but I am struggling to understand the concept of the rule with my data set. As a quick examples this is what I did: <...
2
votes
0answers
24 views

Derive summary statistic Grouped Data & Frequency Distribution Table

I have the following data from the 2018 American Community Survey for a number of census block groups: ...
0
votes
1answer
19 views

Probability as a function of age from observations over several years

Hoping someone can help me correct the flaws in my logic. I have a number of water tanks, which may leak. I want to model the probability a water tank leaks given that it has never leaked before as a ...
0
votes
0answers
26 views

How to define a spearman correlation on a subset of the data

I have two ways to rank items (i.e. assign p-values to some data), and I want to quantify how similar these two lists are, ordering-wise. Since they are ranked by significance, the bottom part of both ...
0
votes
0answers
41 views

Dependence of target variable as a function of only one predictor

I have trained a classifier with target variable y (= 1 or 0) and predictors x1, x2, x3, x4, x5 (all discrete or continuous numerical variables, not normally distributed - x2 continuous with values ...
0
votes
1answer
92 views

Smoothing a binned averages

I am trying to smooth some binned data. I have a discrete variable X which might best be thought of as time and a continuous variable Y. I want to know the average Y value for each value of X and this ...
1
vote
0answers
24 views

Does aggregating ordinal data destroy the signal?

In an university assignment we are being asked to perform ordinal regression on wine data, predicting the quality of wine on a scale of 1 to 3, where 1 = inferior, 2 = average, 3 = superior. So far ...
0
votes
1answer
132 views

variable lengths differ (found for 'EMI') [closed]

I'm getting this error "variable lengths differ ". Please suggest me how to solve it . there are no Gas in data set ...
0
votes
1answer
25 views

Drawing histograms and how size of a bar influences probability?

This is a question concerning the width of the bar in a histogram. Let's say we have frequency distribution like this: As far as I've learned when you define size of the bar for example 0.5, for each ...
1
vote
1answer
43 views

Right way to bin the data-Fitting Voigt profiles to spectroscopy data

I have some measurements of the rate of a physical process versus energy. For each energy I have a number of counts and a measurement time associated to it. However, the step (in energy) at which the ...
0
votes
1answer
40 views

When to use equal frequency binning and when equal width binning?

When transforming numerical variables into categorical variables I'm not aware of when should I use equal frequency binning and when equal width binning. Seems that each of them has their own ...
3
votes
0answers
18 views

Predicting binary outcomes for observations given statistics on binned data

SAT Verbal scores range from 200 to 800 in increments of 10. MIT says that for the class of 2023, the acceptance rates were, for various score ranges 750-800 10% = 677/6504 700-740 06% = 312/5039 ...
0
votes
0answers
18 views

Using Binning before Mann-Whitney for Temperature Data

I have daily temperature for 2 cities and I am trying to see if we can conclude that one city is warmer than the other. I could use a Mann-Whitney for a whole year or I can bin the temperature into ...
0
votes
1answer
43 views

How to fill the bins?

Consider 1 million people earning money, sorted in increasing order. The kth decile, i.e. the kth 100,000 of them has an income share of $f(k)$ with $f(k)<f(k+1)$ and $\sum_{k=1}^{10} f(k)=1$. Let ...
0
votes
0answers
38 views

Is the regression coefficient the same for all categories of a categorical variable?

Let's imagine I build a scorecard with a single binned variable that can only take two values. In the weight of reference framework I would replace the two possible values by their weight of evidence ...
1
vote
0answers
30 views

How to treat low frequency continuous variable in machine leanring

Hello I am working on machine learning model for count data, and I have various features that are highly skewed. The frequency table for one of the feature is given below. ...
3
votes
2answers
211 views

A data-independant transformation to discretize a range of values non-uniformly

I am sure this is trivial, but I am looking for a transformation that nonuniformly discretizes all values of a range into several bins. The bins should be variant and I'd like them to be smaller ...
0
votes
0answers
44 views

How to calculate errors for cumulative distribution function

I have some data points of the form $(x_i,y_i,\delta y_i)$, where $y$ are counts and the error associated to each $y_i = N$ is $y_i = \sqrt{N}$. I want to create the cumulative distribution of these ...
0
votes
1answer
35 views

Logistic regression interpretation in SPSS statistics

I observed a very strange behavior while doing logistic regression, univariance analysis and correlation analysis. I have dependent binary variable and several independent variables that should be ...
1
vote
0answers
51 views

How to properly bin the data for a fit

I am working on a spectroscopy project in which we adjust the wavelength of a laser and get some counts on the detector from some laser-atom interactions. The data that we have is in the form: $(\...
1
vote
2answers
158 views

Is binning of continuous data always bad for statistical tests? [duplicate]

I was always thinking that binning of data if data is naturally continuous is bad. However, here is the case. The goal of study was to find if there is an association between a biomarker and disease ...
2
votes
1answer
165 views

Regression to Classification and back to Regression

Is it reasonable to transform regression problem into classification by binning target variable into classes and construct regression curve separately on each class?\ Precisely, if my goal is to ...
3
votes
2answers
706 views

good number of bins for logarithmic bin width

I was wondering how to estimate a good number of bins for my histogram. I know quite certainly that my data is well approximated by a LogNormal distribution. Previous studies have used logarithmic ...
2
votes
1answer
20 views

How do you test for bias in a circular reference plane?

I've been trying to get my head around how to do hypothesis testing for a circular scale in hypothesis testing, but I am having a lot of trouble. I know well how to test for linear scales, but when it ...
0
votes
1answer
49 views

How to make SalePrice as a discrete value?

The target variable, Saleprice originally is a continuous value. I calculated ...
3
votes
2answers
48 views

How to model gender specific values/variables as a predictor variable in the regression model?

My research question is to check whether the Body fat is associated with Hypertension onset. I am using Body fat as a categorical variable (i.e according to the value of body fat, the person will be ...
0
votes
0answers
23 views

(How) Does different number of categories affect correlation?

I work with obesity in cats and many studies use a body condition score (BCS) to assess obesity. This is a somewhat subjective measure of how much fat covering an animal has. There are two commonly ...
2
votes
1answer
161 views

Combining categories by Weight of Evidence

When calculating Information Value and Weight of Evidence, it's possible to draw a chart of WoE for each variable to study its effect on the state of the target variable. Now, I know it's possible to ...
0
votes
0answers
77 views

problems in plotting decimal value distribution with bin width normalization in r using hist()

I am plotting data distribuiton. I get the expected plot with data which are only integer numbers. But I didn't get appropriate plot for decimal data sets. The code with integer numbers data as ...
1
vote
0answers
32 views

What is the name for bins derived from Quantiles? [duplicate]

It's so easy to talk about "deciles" as if they were groups of observations that fall between the actual deciles, i.e., "any of the nine values that divide the sorted data into ten equal parts." But ...
2
votes
1answer
28 views

Equivalent of Kaplan Meier for an unbounded number of sets

I have used Kaplan-Meier method several times before when I compared how group $A$ survived compared to group $B$ through a period of (say) 5 years. Now I face a somewhat different scenario: I have ...
10
votes
5answers
4k views

Why should binning be avoided at all costs?

So I've read a few posts about why binning should always be avoided. A popular reference for that claim being this link. The main getaway being that the binning points (or cutpoints) are rather ...
0
votes
3answers
443 views

statsmodels logistic regression with binned variables has large coefficients and standard error for some variables

I'm fitting a logistic regression (binary) using Python's statsmodels, and here's a snippet of summary from the model: I have noticed that the large coefficients ...
0
votes
1answer
337 views

Optimal multivariate binning where the cut-points must be the same for all observations

I have a large data set with many discrete and continuous variables. All the variables are present in every observation. I want to explain (the log of) one continuous variable using all the other ...
0
votes
0answers
72 views

Statistical test for binned proportion data in JMP / MATLAB

I have been trying to determine the proper statistical test for comparing binned proportional data between groups. My data set is individual subjects (4-5 per group) with 76-165 cells per individual. ...
1
vote
0answers
182 views

Data binning with error bars

I've got some measured data where each data point has an uncertainty associated with it i.e, Data $\mathbf{x} = (x_1,x_2,...,x_n)$ with uncertainties $\mathbf{\alpha}_x = (\alpha_1,\alpha_2,...,\...
1
vote
0answers
290 views

How to fit a distribution to binned values that come from administrative data?

Fitting a distribution to data (e.g. with maximum likelihood), or testing goodness of fit (e.g. with Kolmogorov-Smirnov) assumes that the data are randomly drawn from a population. But what if the ...
1
vote
0answers
59 views

How creating bins for a numeric feature can enables the model to learn nonlinear relationships within a single feature?

I understood How binning of numerical feature would help build correlations between the feature & the predictor. For example For a regression problem, we can bucketize "population" feature into ...
2
votes
1answer
99 views

Splitting range of independent variable to maximize prediction within the subranges

I have a dataset with two independent variables $X,Z \in \mathbb{R}$ and a dependent variable $Y \in \mathbb{R}$. This dataset has the following characteristics: given some number $z$ and a "small" $...
1
vote
1answer
569 views

Scott's and Freedman–Diaconis rules of the thumb for selecting bin width - disatvantages

Scott's and Freedman–Diaconis rules of the thumb are based on the following formula: In the article here it is stated that: While these appear to be useful estimates for unimodal densities ...
1
vote
1answer
74 views

Should one binarize qualitative variables before applying a random forest?

On which of theses two kinds of sample would a Random Forest (and more precisely sklearn RandomForest algorithm) give the best results ? (Y and other_features are continuous numerical variables, and ...
1
vote
0answers
106 views

Discretize values/binning for missing data

I’m running an experiment where pairs make ratings after answering questions. There are 15 minute intervals where they attempt to answer 12 questions, but each pair makes it through a different number ...
1
vote
0answers
32 views

Whether and how to bin data beyond a certain threshold

I've seen many admonishments against binning and agreed with them in general, but I wonder it's advisable to do so under certain circumstances. To adapt an example from my actual project, let's say ...
1
vote
1answer
836 views

Logarithmic binning and log-normal distribution

I've an Italian cities dataset. It's similar to those British ones used in literature, but has some differences, though. I decided to perform a logarithmic binning to avoid noise on the right end of ...