Questions tagged [binning]

binning is the process of grouping data into "bins" used in statistics and data analysis

Binning is the process of grouping data into "bins" used in statistics and data analysis. For details see also Data binning - Wikipedia, the free encyclopedia

684 questions
0
votes
1 answer

Binned Barplot in R

I want to make a barplot with binned data on the x axis and a corresponding probability on the y axis. Each bin should contain 100 observations. Here's a snapshot of my working data frame: head(covs) y Intercept slope temp heatload…
Jason Matney
  • 552
  • 6
  • 24
0
votes
1 answer

Binning values and using the binning labels to refer to the index of another dataframe

I am struggling with this task: What I did so far:I have 8760 values in which I binned them according to certain intervals. The number of intervals is 10.Then I grouped the values. Problem:Now I have to refer each of the 'levels' of this…
vinoth mannan
  • 43
  • 1
  • 5
0
votes
3 answers

Bin formation in a R data.frame

I have a data.frame with two columns: category quantity a 20 b 30 c 100 d 10 e 1 f 23 g 3 h 200 I need to write a function with two parameters: dataframe, bin_size which runs a…
user1766682
  • 400
  • 3
  • 14
0
votes
3 answers

how to bin computed data by percentile in an R data frame

I have a data frame that contains a large number of symbols, dates, and values date symbol value 2014-01-03 A 2.5 2014-01-04 A 3.1 2014-01-06 A 4.5 2014-01-03 B 2.6 2014-01-05 B 3.2 2014-01-06 …
0
votes
2 answers

How to catch the index of immediate greater number in other matrix?

Consider example a=rand(5,1) b=rand(5,1); bs=sum(b); B=b./bs; cB=cumsum(B) %OUTPUT a = 0.7803 0.3897 0.2417 0.4039 0.0965 cB = 0.0495 0.4030 0.7617 0.9776 1.0000 now i want the position of the number in cB which is immediately greater than…
Misha
  • 173
  • 1
  • 6
0
votes
1 answer

Manually Weight a Binned Variable in R Logistic Regression

I am looking to do credit scoring using logistic regression in R and I am stumped on this... If I have a categorical variable "Residence" with factors "Own", "Rent" and "Other" and I want to set the weight of "Other" to zero so that it is neutral in…
Dirk Calloway
  • 2,569
  • 4
  • 23
  • 34
0
votes
1 answer

Plotting occurrences for values higher than a threshold in Python

I have a non-uniform array 'A'. A = [1,3,2,4,..., 12002, 13242, ...] I want to explore how many elements from the array 'A' have values above certain threshold values. For example, there are 1000 elements that have values larger than 1200, so I…
Victor
  • 1,014
  • 1
  • 9
  • 11
0
votes
1 answer

gaussian binning of data

I just have a simple question of how to do gaussian binning for a data point. Lets say that at X = 100 I detect 5000 electrons but my FWHM is like 4 points. Is it possible in matlab to bin the 5000 electrons with a gaussian centered at X = 100. Like…
0
votes
2 answers

Separate rows of data by 0 values in R

I have a large time series (in data frame form) (n=>6000) that looks like this: time, precip 1 2005-09-30 11:45:00, 0.08 2 2005-09-30 23:45:00, 0.72 3 2005-10-01 11:45:00, 0.01 4 2005-10-01 23:45:00, 0.08 5 …
0
votes
1 answer

Using Ranges Against a Dataset

I am having a spot of trouble with a seemingly simple problem. I have a list of atom coordinates in the format X,Y,Z. I have used numpy.linspace() to make a list of 'bins' from the Z coordinates. The Z coordinates are such that the difference…
pioneer903
  • 171
  • 1
  • 1
  • 12
-1
votes
1 answer

How to plot the graph using hist() function of matplotlib for "binned data"

I am new in matplotlib. I have data binned data. Level Quantity 0 (199.533, 271.74] (10.213, 39.4] 1 (199.533, 271.74] (10.213, 39.4] 2 (54.903, 127.327] (10.213, 39.4] 3 (127.327, 199.533] (10.213,…
-1
votes
3 answers

Split a list into n equal parts

Given a sorted list, and a variable n, I want to break up the list into n parts. With n = 3, I expect three lists, with the last one taking on the overflow. I expect: 0,1,2,3,4,5, 6,7,8,9,10,11, 12,13,14,15,16,17 If the number of items in the list…
Ivan
  • 7,448
  • 14
  • 69
  • 134
-1
votes
2 answers

Binning two columns of data frame together in R

I would like to bin two columns of a dataset simultaneously to create one common binned column. The simple code is as follows x <- sample(100) y <- sample(100) data <- data.frame(x, y) xbin <- seq(from = 0, to = 100, by = 10) ybin <- seq(from = 0,…
Harsh Krishna
  • 83
  • 1
  • 4
-1
votes
1 answer

Remove nan from pandas binner

I have created the following pandas dataframe called train: import pandas as pd import numpy as np import statsmodels.api as sm import statsmodels.formula.api as smf import scipy.stats as stats ds = { 'matchKey' : [621062, 622750, 623508,…
Giampaolo Levorato
  • 1,055
  • 1
  • 8
  • 22
-1
votes
1 answer

Dotplot 'binning/grouping' in R

I'm trying to create a dotplot in R, similar to the following plot, where each group is distinctly separated from the rest: http://www.sthda.com/english/wiki/ggplot2-dot-plot-quick-start-guide-r-software-and-data-visualization The data I have…
Samer Baslan
  • 29
  • 1
  • 7