Matlab - 将连续数据转换为离散数据 [英] Matlab - transform continuous data to discrete data

查看:24
本文介绍了Matlab - 将连续数据转换为离散数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何技术可用于将连续数据转换为离散数据?

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.

如果有,Mathworks File Exchange 的 Matlab 中是否有可用的实现?

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

推荐答案

更准确的答案是您需要对数据进行分箱.这可以通过任意拆分或基于数据本身的分位数拆分来完成.基础 Matlab 系统提供对分位数 (quantile) 的支持,您可以观看有关分箱的视频@http://blogs.mathworks.com/videos/2009/01/07/binning-data-in-matlab/.事实上,这是受到另一个 SO 问题的启发.

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.

更新:我忘了提到直方图 (hist) 也会对数据进行分类.就我个人而言,我发现在 R(一个主要的统计环境)中进行分箱是可取的,尤其是使用 Freedman-Diaconis 分箱(即 breaks = "FD" 在 R 中用于 hist).

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).

这篇关于Matlab - 将连续数据转换为离散数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆