Matlab - transform continuous data to discrete data

半腔热情 提交于 2020-01-11 11:14:10

问题


Are there any techniques which are applied for transforming continuous data to discrete data?

By continuous data I am referring to output values generated by various functions. For example the value generated for entropy for different sets of data points.

If so, are there implementations available in Matlab of Mathworks File Exchange?


回答1:


A more precise answer is that you need to bin your data. This can be done with arbitrary splits or splits based on quantiles of the data itself. The base Matlab system provides support for quantiles (quantile) and you can watch a video on binning @ http://blogs.mathworks.com/videos/2009/01/07/binning-data-in-matlab/. In fact, that was inspired by another SO question.

Update: I forgot to mention that histograms (hist) will also bin the data. Personally, I have found that tbe binning in R (a major statistical environment) is preferable, especially using Freedman-Diaconis binning (i.e. the breaks = "FD" option in R for hist).




回答2:


Yes - sampling. This typically happens at the point of data-acquisition though - how can you have continuous data in Matlab? (I suppose one exception would be evaluating a function for discrete input points.)

If you need a more specific answer, you'll need to edit your question to be more specific.



来源:https://stackoverflow.com/questions/7013913/matlab-transform-continuous-data-to-discrete-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!