Questions tagged [discretization]

Discretization concerns the process of transferring continuous models and equations into discrete counterparts. This process is usually carried out as a first step toward making them suitable for numerical evaluation and implementation on digital computers.

Discretization is used everywhere in DSP (digital signal processing) to represent analog data, e.g. sound, in binary format to allow computer processing and editing.

131 questions
1
vote
1 answer

Quantile sorting in Matlab

I have an n-by-1 vector where n = 20000. I would like to do a decile ranking for the data in this vector, which is basically replacing the value of each element by its corresponding decile. I am currently doing it this way: deciles =…
Tulkkas
  • 973
  • 3
  • 10
  • 22
1
vote
1 answer

How to set arbitrary number of values for variables in Banjo

I'm using Banjo (BAyesian Network inference with Java Objects) to analyze a set of data. I want each variable to take a range of more than 7 values (Banjo put this limit in the amount of values a variable can take), without using Banjo…
1
vote
1 answer

Discretization of continuous attributes using np.histogram - how to apply on a new data point?

continuing How to do discretization of continuous attributes in sklearn? After I "learned" my bins from train data, using np.histogram(A['my_var']) how do I apply it on my test set? as in which bin is the my_var attribute of each data point? Both…
ihadanny
  • 4,377
  • 7
  • 45
  • 76
1
vote
1 answer

WEKA cross validation discretization

I'm trying to improve the accuracy of my WEKA model by applying an unsupervised discretize filter. I need to decided on the number of bins and whether equal frequency binning should be used. Normally, I would optimize this using a training set.…
user3197231
  • 123
  • 3
  • 8
1
vote
1 answer

"Points" not available for .C() for package "dprep"

I want to perform discretization in order to perform mutual information based feature selection for supervised learning R. library(dprep) data(iris) iris.discme=disc.mentr(my.iris,1:5) I am getting following error: Error in .C("Points",…
kravi
  • 747
  • 1
  • 8
  • 13
1
vote
0 answers

Categorize continuous variable in R with cut but elements fall into wrong category

I am realtively new to R and I am trying to split a continuous variable into two categories. Assume the following: y = c(6.3, 6.2, 6.2, 5.5, 6.9, 6.8, 5.3, 5.3, 5.4, 5.2, 7.2, 7.1, 8.1, 8.2, 8.2, 7.4, 6.7, 7.2, 7.9, 8.0, 6.5, 6.6, 6.5, 7.2, 7.2,…
Benscape
  • 11
  • 2
1
vote
2 answers

cut function and controlled frequency in the intervals

My question is pretty simple: the cut() function allows to choose the breaks along which I can divide the range of my vector into intervals. I would like to be able to control for the number of observations within the newly created interval, in a…
Chris. Z
  • 365
  • 1
  • 7
  • 17
1
vote
3 answers

Discretization of zip codes to US regions in R

I would like to discretize data with zip codes into regions I have character data sample: zip_code '45654' '12321' '99453' etc I have 6 categories with rules: region 1 - NE: 01000-19999 region 2 - SE: 20000-39999 region 3 - MW:…
Michal
  • 1,863
  • 7
  • 30
  • 50
1
vote
1 answer

Mutual information for continuous/numeric features

I have to compute mutual information for continuous/numeric features. I want to apply feature selection based on this. Feature set description is given below feature1: can assume any value between 1 - 10000 feature2: measures time spent on something…
alex
  • 1,421
  • 1
  • 16
  • 19
1
vote
1 answer

Function call different behavior in main and library

I met a very strange thing, two days ago I try to debug the code. I'm running the code on a Windows 7 64bit OS. In the main I calculate a mathematical model by knowing the input signal, which will be applied in the control algorithm SOOP. The…
Elod
  • 499
  • 9
  • 25
1
vote
2 answers

2nd order centered finite-difference approximation

This question may sound mathematical, but it's more of a programming question related to discretization, so I decided to ask it here. The problem is to find a 2nd order finite difference approximation of the partial derivative uxy, where u is a…
1
vote
2 answers

Incorrect Square Wave Plot

I'm embarrassed to ask this as I believe I may be missing something obvious, but I just can't see where I am going wrong. As part of a larger program I am investigating the application of discretisation methods to approximate the convection equation…
Jimog
  • 35
  • 1
  • 4
1
vote
1 answer

Discretization data numeric and convert to a integer matrix?

I discretize a dataset using RWeka in R. library(RWeka) m2 <- Discretize(Species ~., data = iris) View(m2) But I want the output as an integer matrix. For example: all the outputs of the package Discretization in R are integer matrix.
clairsang
  • 125
  • 7
1
vote
2 answers

R calculate the average of one column corresponding to each bin of another column

I have these data that has two columns. As you can see in the graph, the data has too much noise. So, I want to discretize column "r" with size 5, and assign each row to its corresponding bin, then calculate the average of f for each bin. > dr …
Vahid Mirjalili
  • 6,211
  • 15
  • 57
  • 80
1
vote
0 answers

RWeka Discretize results

I'm trying to discretize a set of data using RWeka's Discretize filter. My dataset starts out at over a million records, but the returned set only has some 100k. The function looks like it's supposed to return the bins per record in the set, so I'm…
rhae66
  • 293
  • 1
  • 4
  • 8
1 2 3
8 9