今天,咱們來說一下在數據處理中,比較經常使用的兩個函數,還有一個功能很強大的函數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"]