今天,咱们来说一下在数据处理中,比较经常使用的两个函数,还有一个功能很强大的函数dom
Rescale函数
好了,第一个函数是Rescale,他可使数据归一化spa
工做原理: x - min/max - min.net
简单一点说就是能够把数字变到0--1之间code
咱们来看一个例子:orm
Rescale[{1, 2, 3, 4}, {0, 10}]
{1/10, 1/5, 3/10, 2/5}
Tally[{1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5}]
{{1, 2}, {2, 2}, {3, 3}, {4, 1}, {5, 3}}
x = NormalDistribution[1, 4]; data = Table[IntegerPart[Random[x]], 1000]; datause = Sort@Tally[data] BarChart[Labeled[#2, #1, Above] & @@@ datause, BarSpacing -> None]
Import["http://blog.csdn.net/WMN7Q/article/category/6357421","Elements"]
<span style="font-size:18px;">{"Data", "FullData", "Hyperlinks", "ImageLinks", "Images","Plaintext", "Source", "Title", "XMLObject"}
Import["http://blog.csdn.net/WMN7Q/article/category/6357421","Images"]