Entropy
詳細とオプション
- Entropyは,データ内の変動(情報のサイズ)の尺度である
- data は,次の追加的な形式と解釈を持つことができる.
-
{x1,x2,…} 数値または記号値のリスト » » string String string の文字のリスト » WeightedData 重み付きの値のリスト » TimeSeries, TemporalData 値のベクトルまたは配列(タイムスタンプは無視される) » - Entropy[k,{x1, …}]は-
piLog[k,pi]に等しい.ここで,piは xiの個別要素の出現率である. » - 次は,使用可能なオプションである.
-
SameTest Automatic 式の等価性を検定する関数 » - Entropy[data,SameTestf]は,データ要素のペアに f を適用して両者が等しいと判断されるべきかどうかを決定する.
例題
すべて開く すべて閉じる例 (3)
Entropy[{0, 1, 1, 4, 1, 1}]Entropy["A quick brown fox jumps over the lazy dog"]%//NEntropy[{a, b, b, c, c, c, c}]7つの要素のうち1つは1回出現し,別の要素は2回出現し,3つ目は4回出現する:
-1 / 7Log[1 / 7] - 2 / 7Log[2 / 7] - 4 / 7Log[4 / 7] == %スコープ (4)
list = RandomInteger[1, 1000];Counts[list]Entropy[list]%//NWeightedDataのエントロピー:
data = {0, 1, 1, 4, 1, 1};
weights = {3, 1, 1, 1, 1, 1};Entropy[WeightedData[data, weights]]//SimplifyEntropy[data]//SimplifyN /@ {%, %%}TimeSeriesのエントロピーを計算する:
ts = TemporalData[TimeSeries, {{{5, 4, 5, 6, 3, 3, 3, 6, 6, 6, 3, 3, 3, 6, 6, 6, 3, 6, 4, 4, 6, 6, 4, 5,
3, 5, 3, 4, 5, 6, 5, 3, 6, 3, 6, 5, 5, 4, 3, 5, 3, 5, 4, 5, 3, 3, 4, 6, 4, 5, 6, 5, 3, 4, 6, 4,
5, 3, 3, 6, 4, 4, 3, 4, 6, 3, 3, 4, 3, 3, ... , 4, 5,
4, 3, 3, 3, 3, 3, 6, 4, 4, 5, 5, 3, 3, 4, 4, 5, 3, 4, 3, 4, 6, 3}}, {{1, 174, 1}}, 1,
{"Continuous", 1}, {"Discrete", 1}, 1,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}, ValueDimensions -> 1}}, False,
14.3];ListPlot[ts]Entropy[ts]Entropy[ts["Values"]]%% - %//Simplifylist = {0, 1, 1, 4, 1, 1};Entropy[10, list]//SimplifyEntropy[2, list]//SimplifyEntropy[E, list] == Entropy[list]オプション (1)
アプリケーション (2)
list1 = {0, 1, 1, 0, 0, 1, 1};
list2 = {1, 2, 3, 4, 5, 6, 7};N[Entropy /@ {list1, list2}]TelegraphProcessの経路のエントロピーをレート
で計算する:
μ = 1.3;
data = RandomFunction[TelegraphProcess[μ], {1, 10 ^ 2}]ListPlot[data]Entropy[data]N[%]特性と関係 (3)
Entropy[{1, 2, 3, 4}]Entropy[{x, y, z, w}]Entropy["star"]list = RandomInteger[3, 100]probs = Values[Counts[list]] / Length[list]-Total[probs Log[probs]]Entropy[list] - %//FullSimplify文字列のエントロピーはその文字のリストのエントロピーに等しい:
string = "A quick brown fox jumps over the lazy dog";Entropy[string]Characters[string]Entropy[%]%%% - %//Simplify考えられる問題 (1)
おもしろい例題 (2)
Entropy[ExampleData[{"Text", "Hamlet"}]]//Short%//NEntropy[ExampleData[{"Text", "ShakespearesSonnets"}]]//N異なる言語の国連人権宣言のテキストのエントロピーを比較する:
unhr = Select[ExampleData["Text"], StringContainsQ[#[[2]], "UNHumanRights"]&];unhr//Shortlabels = Map[Style[StringDrop[#, 13], 9]&, unhr[[All, 2]]];BarChart[Map[N@Entropy[ExampleData[#]]&, unhr], ChartLabels -> Placed[labels, After], BarOrigin -> Left, ColorFunction -> Function[{height}, ColorData["IslandColors"][1 - height]]]関連項目
関連するガイド
-
▪
- 記述統計
テキスト
Wolfram Research (2008), Entropy, Wolfram言語関数, https://reference.wolfram.com/language/ref/Entropy.html.
CMS
Wolfram Language. 2008. "Entropy." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Entropy.html.
APA
Wolfram Language. (2008). Entropy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Entropy.html
BibTeX
@misc{reference.wolfram_2026_entropy, author="Wolfram Research", title="{Entropy}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Entropy.html}", note=[Accessed: 16-October-2026]}
BibLaTeX
@online{reference.wolfram_2026_entropy, organization={Wolfram Research}, title={Entropy}, year={2008}, url={https://reference.wolfram.com/language/ref/Entropy.html}, note=[Accessed: 16-October-2026]}