(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 100787, 2719] NotebookOptionsPosition[ 88531, 2441] NotebookOutlinePosition[ 88839, 2456] CellTagsIndexPosition[ 88796, 2453] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Basic Examples", "Subsection", CellLabel->"In[1]:=", CellID->462042388], Cell[TextData[{ "Calculate the ", Cell[BoxData[ StyleBox["KullbackLeiblerDivergence", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " between two ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["NormalDistributions", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/NormalDistribution", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", CellChangeTimes->{{3.777199824647264*^9, 3.777199844591854*^9}, { 3.7771998813366203`*^9, 3.7771999097915716`*^9}, 3.777742515161436*^9}, CellID->236734399], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", RowBox[{"NormalDistribution", "[", RowBox[{"1", ",", "2"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.777186024206887*^9, 3.777186033235753*^9}, { 3.7771860943201227`*^9, 3.7771861367710686`*^9}, {3.7771864359507427`*^9, 3.7771864454518485`*^9}, {3.7771998490369573`*^9, 3.7771998538321323`*^9}, { 3.777199912827487*^9, 3.7771999212260447`*^9}, {3.7772018658256955`*^9, 3.7772018683329973`*^9}}, CellLabel->"In[1]:=", CellID->43291893], Cell[BoxData[ RowBox[{ RowBox[{"-", FractionBox["1", "4"]}], "+", RowBox[{"Log", "[", "2", "]"}]}]], "Output", CellChangeTimes->{ 3.777186033683548*^9, {3.777186090359316*^9, 3.7771861730088177`*^9}, { 3.7771864171575165`*^9, 3.7771864469059634`*^9}, {3.7771864848003187`*^9, 3.7771864947263794`*^9}, 3.7771941041422577`*^9, {3.777199854170226*^9, 3.777199865227688*^9}, 3.7771999215092545`*^9, 3.777201840318805*^9, 3.7772018747698374`*^9, 3.77778503030184*^9, 3.7777868706719446`*^9}, CellLabel->"Out[1]=", CellID->55863997] }, Open ]], Cell["KullbackLeiblerDivergence is not symmetric:", "Text", CellChangeTimes->{{3.777201814821947*^9, 3.777201821029632*^9}}, CellID->34795974], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"1", ",", "2"}], "]"}], ",", RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7772018271967025`*^9, 3.777201829318225*^9}, 3.77720187001647*^9}, CellLabel->"In[2]:=", CellID->613857373], Cell[BoxData[ RowBox[{"2", "-", RowBox[{"Log", "[", "2", "]"}]}]], "Output", CellChangeTimes->{{3.7772018303075495`*^9, 3.777201841356071*^9}, 3.777201875949621*^9, 3.777785030435582*^9, 3.777786870809575*^9}, CellLabel->"Out[2]=", CellID->114970541] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"%", "\[Equal]", "%%"}]], "Input", CellChangeTimes->{{3.77720183731982*^9, 3.777201847892573*^9}}, CellLabel->"In[3]:=", CellID->181756532], Cell[BoxData["False"], "Output", CellChangeTimes->{{3.7772018481928005`*^9, 3.7772018773647366`*^9}, 3.7777850305648365`*^9, 3.777786870963208*^9}, CellLabel->"Out[3]=", CellID->3704951] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->313028829], Cell["KullbackLeiblerDivergence works with symbolic distributions:", "Text", CellChangeTimes->{{3.777199824647264*^9, 3.777199844591854*^9}}, CellID->13078159], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"\[Mu]1", ",", "\[Sigma]1"}], "]"}], ",", RowBox[{"NormalDistribution", "[", RowBox[{"\[Mu]2", ",", "\[Sigma]2"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.777186024206887*^9, 3.777186033235753*^9}, { 3.7771860943201227`*^9, 3.7771861367710686`*^9}, {3.7771864359507427`*^9, 3.7771864454518485`*^9}, {3.7771998490369573`*^9, 3.7771998538321323`*^9}}, CellLabel->"In[4]:=", CellID->697590667], Cell[BoxData[ RowBox[{ FractionBox["1", RowBox[{"2", " ", SuperscriptBox["\[Sigma]2", "2"]}]], RowBox[{"(", RowBox[{ SuperscriptBox["\[Mu]1", "2"], "-", RowBox[{"2", " ", "\[Mu]1", " ", "\[Mu]2"}], "+", SuperscriptBox["\[Mu]2", "2"], "+", SuperscriptBox["\[Sigma]1", "2"], "-", SuperscriptBox["\[Sigma]2", "2"], "-", RowBox[{"2", " ", SuperscriptBox["\[Sigma]2", "2"], " ", RowBox[{"Log", "[", "\[Sigma]1", "]"}]}], "+", RowBox[{"2", " ", SuperscriptBox["\[Sigma]2", "2"], " ", RowBox[{"Log", "[", "\[Sigma]2", "]"}]}]}], ")"}]}]], "Output", CellChangeTimes->{ 3.777186033683548*^9, {3.777186090359316*^9, 3.7771861730088177`*^9}, { 3.7771864171575165`*^9, 3.7771864469059634`*^9}, {3.7771864848003187`*^9, 3.7771864947263794`*^9}, 3.7771941041422577`*^9, {3.777199854170226*^9, 3.777199865227688*^9}, 3.77778503069384*^9, 3.777786871118001*^9}, CellLabel->"Out[4]=", CellID->751080757] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->218729515], Cell["The distributions do not have to be from the same family:", "Text", CellChangeTimes->{{3.777199824647264*^9, 3.777199844591854*^9}, { 3.7772000311512594`*^9, 3.77720010387195*^9}}, CellID->70085937], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"ExponentialDistribution", "[", "\[Lambda]", "]"}], ",", RowBox[{"NormalDistribution", "[", RowBox[{"\[Mu]", ",", "\[Sigma]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.777186024206887*^9, 3.777186033235753*^9}, { 3.7771860943201227`*^9, 3.7771861367710686`*^9}, {3.7771864359507427`*^9, 3.7771864454518485`*^9}, {3.7771998490369573`*^9, 3.7771998538321323`*^9}, { 3.777200085563831*^9, 3.777200093047897*^9}}, CellLabel->"In[5]:=", CellID->1218211], Cell[BoxData[ RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", FractionBox["2", RowBox[{ SuperscriptBox["\[Lambda]", "2"], " ", SuperscriptBox["\[Sigma]", "2"]}]], "-", FractionBox[ RowBox[{"2", " ", "\[Mu]"}], RowBox[{"\[Lambda]", " ", SuperscriptBox["\[Sigma]", "2"]}]], "+", FractionBox[ SuperscriptBox["\[Mu]", "2"], SuperscriptBox["\[Sigma]", "2"]], "+", RowBox[{"Log", "[", "2", "]"}], "+", RowBox[{"Log", "[", "\[Pi]", "]"}], "+", RowBox[{"2", " ", RowBox[{"Log", "[", "\[Lambda]", "]"}]}], "+", RowBox[{"2", " ", RowBox[{"Log", "[", "\[Sigma]", "]"}]}]}], ")"}]}]], "Output", CellChangeTimes->{ 3.777186033683548*^9, {3.777186090359316*^9, 3.7771861730088177`*^9}, { 3.7771864171575165`*^9, 3.7771864469059634`*^9}, {3.7771864848003187`*^9, 3.7771864947263794`*^9}, 3.7771941041422577`*^9, {3.777199854170226*^9, 3.777199865227688*^9}, 3.777200094799197*^9, 3.777785032171111*^9, 3.777786871931961*^9}, CellLabel->"Out[5]=", CellID->180071314] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->337968540], Cell["It also works with discrete distributions:", "Text", CellChangeTimes->{{3.777199938744192*^9, 3.777199947855872*^9}, { 3.777199996239559*^9, 3.777200001815629*^9}}, CellID->61646912], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"BernoulliDistribution", "[", "p1", "]"}], ",", RowBox[{"BernoulliDistribution", "[", "p2", "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7771999582979326`*^9, 3.777199978898215*^9}}, CellLabel->"In[6]:=", CellID->71139978], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p1"}], ")"}]}], " ", RowBox[{"Log", "[", FractionBox[ RowBox[{ RowBox[{"-", "1"}], "+", "p1"}], RowBox[{ RowBox[{"-", "1"}], "+", "p2"}]], "]"}]}], "+", RowBox[{"p1", " ", RowBox[{"Log", "[", FractionBox["p1", "p2"], "]"}]}]}]], "Output", CellChangeTimes->{{3.7771999727533073`*^9, 3.777199979214033*^9}, 3.7777850325899906`*^9, 3.777786872081769*^9}, CellLabel->"Out[6]=", CellID->130382131] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"BernoulliDistribution", "[", "p1", "]"}], ",", RowBox[{"PoissonDistribution", "[", "\[Lambda]", "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.777269622011731*^9, 3.777269642595044*^9}}, CellLabel->"In[7]:=", CellID->30103607], Cell[BoxData[ RowBox[{"\[Lambda]", "-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p1"}], ")"}], " ", RowBox[{"Log", "[", RowBox[{"1", "-", "p1"}], "]"}]}], "+", RowBox[{"p1", " ", RowBox[{"Log", "[", "p1", "]"}]}], "-", RowBox[{"p1", " ", RowBox[{"Log", "[", "\[Lambda]", "]"}]}]}]], "Output", CellChangeTimes->{{3.7772696273639708`*^9, 3.7772696547006063`*^9}, 3.777785032722673*^9, 3.7777868721835566`*^9}, CellLabel->"Out[7]=", CellID->37505524] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->434638692], Cell[TextData[{ "Use a custom defined ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["ProbabilityDistribution", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/ProbabilityDistribution", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", CellChangeTimes->{{3.777204112655837*^9, 3.777204116816575*^9}, { 3.7772042204482393`*^9, 3.777204244379959*^9}}, CellID->238106516], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ProbabilityDistribution", "[", RowBox[{ FractionBox[ RowBox[{"Sqrt", "[", "2", "]"}], RowBox[{"Pi", " ", "*", RowBox[{"(", RowBox[{"1", "+", RowBox[{"\[FormalX]", "^", "4"}]}], ")"}]}]], ",", RowBox[{"{", RowBox[{"\[FormalX]", ",", RowBox[{"-", "Infinity"}], ",", "Infinity"}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"NormalDistribution", "[", "]"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.7772040647867146`*^9, 3.7772040872432785`*^9}, { 3.777204143524922*^9, 3.777204166654934*^9}}, CellLabel->"In[8]:=", CellID->36530754], Cell[BoxData[ RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{"1", "+", "\[Pi]", "-", RowBox[{"2", " ", RowBox[{"Log", "[", "4", "]"}]}], "-", RowBox[{"Log", "[", "\[Pi]", "]"}]}], ")"}]}]], "Output", CellChangeTimes->{3.7772040982862234`*^9, 3.777204172430711*^9, 3.777204281246768*^9, 3.777785043417954*^9, 3.777786878666378*^9}, CellLabel->"Out[8]=", CellID->231231943] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Scope", "Subsection", CellLabel->"In[9]:=", CellID->964056545], Cell[TextData[{ Cell[BoxData[ StyleBox["KullbackLeiblerDivergence", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " works for multivariate distributions:" }], "Text", CellChangeTimes->{{3.7772020923420024`*^9, 3.7772020936445265`*^9}, 3.778519950165949*^9}, CellID->322339065], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"BinormalDistribution", "[", "\[Rho]1", "]"}], ",", RowBox[{"BinormalDistribution", "[", "\[Rho]2", "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7772019358711667`*^9, 3.777201973597416*^9}}, CellLabel->"In[1]:=", CellID->26634031], Cell[BoxData[ RowBox[{ FractionBox["1", RowBox[{"2", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", SuperscriptBox["\[Rho]2", "2"]}], ")"}]}]], RowBox[{"(", RowBox[{ RowBox[{"2", " ", "\[Rho]1", " ", "\[Rho]2"}], "-", RowBox[{"2", " ", SuperscriptBox["\[Rho]2", "2"]}], "-", RowBox[{ SuperscriptBox["\[Rho]2", "2"], " ", RowBox[{"Log", "[", RowBox[{"1", "-", SuperscriptBox["\[Rho]1", "2"]}], "]"}]}], "+", RowBox[{ SuperscriptBox["\[Rho]2", "2"], " ", RowBox[{"Log", "[", RowBox[{"1", "-", SuperscriptBox["\[Rho]2", "2"]}], "]"}]}], "+", RowBox[{"Log", "[", FractionBox[ RowBox[{ RowBox[{"-", "1"}], "+", SuperscriptBox["\[Rho]1", "2"]}], RowBox[{ RowBox[{"-", "1"}], "+", SuperscriptBox["\[Rho]2", "2"]}]], "]"}]}], ")"}]}]], "Output", CellChangeTimes->{{3.777201961609352*^9, 3.77720197394839*^9}, 3.7777850439996543`*^9, 3.777786878866848*^9}, CellLabel->"Out[1]=", CellID->566129409] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Options", "Subsection", CellLabel->"In[8]:=", CellID->776923543], Cell[CellGroupData[{ Cell["Method", "Subsubsection", CellChangeTimes->{{3.777201223714305*^9, 3.777201224690697*^9}}, CellID->39254211], Cell["\<\ Symbolic evaluation of the divergence is unfeasible for some distributions:\ \>", "Text", CellChangeTimes->{{3.777201331473903*^9, 3.777201413060233*^9}}, CellID->69778073], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"TimeConstrained", "[", RowBox[{ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0.", ",", "1."}], "]"}], ",", RowBox[{"StableDistribution", "[", RowBox[{"1", ",", "1.3", ",", "0.5", ",", "0.", ",", "2."}], "]"}]}], "]"}], ",", "10"}], "]"}]], "Input", CellChangeTimes->{{3.7772012455325537`*^9, 3.777201263579278*^9}, { 3.7772013201352215`*^9, 3.7772013484276175`*^9}}, CellLabel->"In[1]:=", CellID->3414088], Cell[BoxData["$Aborted"], "Output", CellChangeTimes->{ 3.777201264245738*^9, {3.7772013488903832`*^9, 3.7772013595858135`*^9}, 3.7777850556212544`*^9, 3.7777868893847027`*^9}, CellLabel->"Out[1]=", CellID->50266488] }, Open ]], Cell[TextData[{ "Use ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["NExpectation", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/NExpectation", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], " instead:" }], "Text", CellChangeTimes->{{3.7772014199708033`*^9, 3.7772014321003747`*^9}}, CellID->305414587], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0.", ",", "1."}], "]"}], ",", RowBox[{"StableDistribution", "[", RowBox[{"1", ",", "1.3", ",", "0.5", ",", "0.", ",", "2."}], "]"}], ",", RowBox[{"Method", "\[Rule]", " ", "NExpectation"}]}], "]"}]], "Input", CellChangeTimes->{{3.777201385907689*^9, 3.7772013917940655`*^9}}, CellLabel->"In[2]:=", CellID->418750045], Cell[BoxData["0.9823504932076152`"], "Output", CellChangeTimes->{3.7772013925101223`*^9, 3.7777850562393103`*^9, 3.7777868899035053`*^9}, CellLabel->"Out[2]=", CellID->24355991] }, Open ]], Cell[TextData[{ "Supply extra options to ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["NExpectation", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/NExpectation", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", CellChangeTimes->{{3.7772014388344173`*^9, 3.777201452586684*^9}}, CellID->493308132], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}], ",", RowBox[{"SetPrecision", "[", RowBox[{ RowBox[{"StableDistribution", "[", RowBox[{"1", ",", "1.3", ",", "0.5", ",", "0.", ",", "2."}], "]"}], ",", "20"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Method", "\[Rule]", " ", RowBox[{"{", RowBox[{"NExpectation", ",", RowBox[{"AccuracyGoal", "\[Rule]", " ", "5"}], ",", RowBox[{"PrecisionGoal", "\[Rule]", " ", "5"}], ",", RowBox[{"WorkingPrecision", "\[Rule]", "20"}]}], "}"}]}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.777201460850582*^9, 3.7772014671318045`*^9}, { 3.7772014972360497`*^9, 3.7772016016769104`*^9}}, CellLabel->"In[3]:=", CellID->600173769], Cell[BoxData["0.98235050552919026093132922431863230607`20."], "Output", CellChangeTimes->{{3.777201503308918*^9, 3.7772016062367306`*^9}, 3.7777850598766785`*^9, 3.7777868935828276`*^9}, CellLabel->"Out[3]=", CellID->561386452] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->313678082], Cell[TextData[{ Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["NExpectation", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/NExpectation", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], " is designed to work with distributions with numeric parameters:" }], "Text", CellChangeTimes->{{3.777201655164053*^9, 3.777201677019639*^9}, { 3.778520255237378*^9, 3.778520327127022*^9}}, CellID->339713932], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"\[Mu]", ",", "\[Sigma]"}], "]"}], ",", RowBox[{"StableDistribution", "[", RowBox[{"1", ",", "1.3", ",", "0.5", ",", "0.", ",", "2."}], "]"}], ",", RowBox[{"Method", "\[Rule]", " ", "NExpectation"}]}], "]"}]], "Input", CellChangeTimes->{{3.777201634506548*^9, 3.777201647100566*^9}}, CellLabel->"In[4]:=", CellID->263314464], Cell[BoxData[ TemplateBox[{ "ResourceFunction","usermessage", "\"\\!\\(\\*TemplateBox[List[StyleBox[RowBox[List[\\\"\ KullbackLeiblerDivergence\\\", \\\"::\\\", \\\"numDist\\\"]], \\\"MessageName\ \\\"], \\\"\\\\\\\": \\\\\\\"\\\", TemplateBox[List[\\\"\\\\\\\"Unable to \ numerically sample \\\\\\\"\\\", RowBox[List[\\\"NormalDistribution\\\", \ \\\"[\\\", RowBox[List[\\\"\\\\[Mu]\\\", \\\",\\\", \\\"\\\\[Sigma]\\\"]], \\\ \"]\\\"]], \\\"\\\\\\\" and \\\\\\\"\\\", \ RowBox[List[\\\"StableDistribution\\\", \\\"[\\\", RowBox[List[\\\"1\\\", \ \\\",\\\", \\\"1.3`\\\", \\\",\\\", \\\"0.5`\\\", \\\",\\\", \\\"0.`\\\", \ \\\",\\\", \\\"2.`\\\"]], \\\"]\\\"]], \\\"\\\\\\\". Cannot use Method \ NExpectation.\\\\\\\"\\\"], \\\"RowDefault\\\"]], \\\"RowDefault\\\"]\\)\"",2, 4,27,16717634780446330042,"Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{3.777201648069976*^9, 3.777785060191497*^9, 3.777786893684518*^9}, CellLabel->"During evaluation of In[4]:=", CellID->457463], Cell[BoxData["$Failed"], "Output", CellChangeTimes->{3.777201648093911*^9, 3.7777850602090654`*^9, 3.777786893704497*^9}, CellLabel->"Out[4]=", CellID->199909001] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Assumptions", "Subsubsection", CellChangeTimes->{{3.777786980967229*^9, 3.777786994818175*^9}}, CellID->166208034], Cell[TextData[{ "Without ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Assumptions", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Assumptions", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ", a message will be raised and conditions are generated in the result:" }], "Text", CellChangeTimes->{{3.777787141174615*^9, 3.7777871919748297`*^9}, { 3.778562331647225*^9, 3.7785623746223183`*^9}}, CellID->601776192], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"UniformDistribution", "[", RowBox[{"{", RowBox[{"0", ",", "n"}], "}"}], "]"}], ",", RowBox[{"UniformDistribution", "[", RowBox[{"{", RowBox[{"0", ",", "m"}], "}"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7777869966639805`*^9, 3.777787025127519*^9}, 3.777787114522247*^9, {3.77856232516215*^9, 3.7785623280149393`*^9}}, CellLabel->"In[20]:=", CellID->19597287], Cell[BoxData[ TemplateBox[{ "ResourceFunction","usermessage", "\"\\!\\(\\*TemplateBox[List[StyleBox[RowBox[List[\\\"\ KullbackLeiblerDivergence\\\", \\\"::\\\", \\\"supportValidationFail\\\"]], \ \\\"MessageName\\\"], \\\"\\\\\\\": \\\\\\\"\\\", TemplateBox[List[\\\"\\\\\\\ \"Failed to verify that the support of \\\\\\\"\\\", \ RowBox[List[\\\"UniformDistribution\\\", \\\"[\\\", RowBox[List[\\\"{\\\", \ RowBox[List[\\\"0\\\", \\\",\\\", \\\"n\\\"]], \\\"}\\\"]], \\\"]\\\"]], \\\"\ \\\\\\\" is a subset of the support of \\\\\\\"\\\", \ RowBox[List[\\\"UniformDistribution\\\", \\\"[\\\", RowBox[List[\\\"{\\\", \ RowBox[List[\\\"0\\\", \\\",\\\", \\\"m\\\"]], \\\"}\\\"]], \\\"]\\\"]], \\\"\ \\\\\\\". Calculation will still be attempted.\\\\\\\"\\\"], \\\"RowDefault\\\ \"]], \\\"RowDefault\\\"]\\)\"",2,20,3,16722736206935963185,"Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{3.777787115103034*^9, 3.7785623559760046`*^9}, CellLabel->"During evaluation of In[20]:=", CellID->6029386], Cell[BoxData[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{"Log", "[", FractionBox["m", "n"], "]"}], RowBox[{"m", "\[GreaterEqual]", "n"}]}, {"Indeterminate", TagBox["True", "PiecewiseDefault", AutoDelete->True]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}}, Selectable->True]} }, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False, StripWrapperBoxes->True]], "Output", CellChangeTimes->{3.7777871152875385`*^9, 3.77856235608272*^9}, CellLabel->"Out[20]=", CellID->256515997] }, Open ]], Cell["\<\ With assumptions specified, a result valid under those conditions is returned:\ \>", "Text", CellChangeTimes->{{3.777787041351977*^9, 3.7777870841266503`*^9}, { 3.7777871964634027`*^9, 3.7777872171990285`*^9}, {3.7785204000750704`*^9, 3.7785204110938287`*^9}, {3.7785624104468775`*^9, 3.7785624471589108`*^9}}, CellID->130203931], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"UniformDistribution", "[", RowBox[{"{", RowBox[{"0", ",", "n"}], "}"}], "]"}], ",", RowBox[{"UniformDistribution", "[", RowBox[{"{", RowBox[{"0", ",", "m"}], "}"}], "]"}], ",", RowBox[{"Assumptions", "\[Rule]", " ", RowBox[{"m", ">", "n"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.7777869966639805`*^9, 3.777787025127519*^9}, { 3.7785205030703945`*^9, 3.778520505459988*^9}, {3.7785206107020826`*^9, 3.778520630983428*^9}, {3.778520667190132*^9, 3.7785207060485387`*^9}, { 3.77852077041057*^9, 3.7785207754821615`*^9}, 3.7785623104677973`*^9}, CellLabel->"In[21]:=", CellID->308862234], Cell[BoxData[ RowBox[{"Log", "[", FractionBox["m", "n"], "]"}]], "Output", CellChangeTimes->{{3.7777869978934517`*^9, 3.7777870256201725`*^9}, { 3.7785206053381596`*^9, 3.7785206328403006`*^9}, 3.7785206693004637`*^9, 3.7785207072618303`*^9, 3.778520776471298*^9, 3.778562402815023*^9}, CellLabel->"Out[21]=", CellID->171085166] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Applications", "Subsection", CellLabel->"In[5]:=", CellID->568056528], Cell[TextData[{ "If ", Cell[BoxData["X"], "InlineFormula", FontFamily->"Source Sans Pro"], " and ", Cell[BoxData["Y"], "InlineFormula", FontFamily->"Source Sans Pro"], " are two random variables with a joint distribution ", Cell[BoxData["\[ScriptCapitalD]"], "InlineFormula", FontFamily->"Source Sans Pro"], ", then the mutual information between them is defined as the \ Kullback-Leibler divergence from the product distribution of the marginals to \ ", Cell[BoxData["\[ScriptCapitalD]"], "InlineFormula", FontFamily->"Source Sans Pro"], ". " }], "Text", CellChangeTimes->{{3.7772031607031894`*^9, 3.777203197101701*^9}, 3.7772033578789434`*^9, {3.777203429813771*^9, 3.7772036081194324`*^9}}, CellID->873658449], Cell[TextData[{ "As an example, calculate the mutual information of the components of a ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["BinormalDistribution", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/BinormalDistribution", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", CellChangeTimes->{{3.7772031607031894`*^9, 3.777203197101701*^9}, 3.7772033578789434`*^9, {3.777203429813771*^9, 3.777203624038687*^9}}, CellID->386977101], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"binormalDist", " ", "=", " ", RowBox[{"BinormalDistribution", "[", RowBox[{ RowBox[{"{", RowBox[{"\[Mu]1", ",", "\[Mu]2"}], "}"}], ",", RowBox[{"{", RowBox[{"\[Sigma]1", ",", "\[Sigma]2"}], "}"}], ",", "\[Rho]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", "\[IndentingNewLine]", RowBox[{"binormalDist", ",", "\[IndentingNewLine]", RowBox[{"ProductDistribution", "@@", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"MarginalDistribution", "[", RowBox[{"binormalDist", ",", "#"}], "]"}], "&"}], ",", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "Input", CellChangeTimes->{{3.7772031858933887`*^9, 3.7772032919345536`*^9}}, CellLabel->"In[97]:=", CellID->102711388], Cell[BoxData[ RowBox[{ RowBox[{"-", FractionBox["1", "2"]}], " ", RowBox[{"Log", "[", RowBox[{"1", "-", SuperscriptBox["\[Rho]", "2"]}], "]"}]}]], "Output", CellChangeTimes->{3.7772032988523607`*^9, 3.7777850604410934`*^9, 3.7777868938432355`*^9, 3.7785208548683276`*^9, 3.778520993391175*^9}, CellLabel->"Out[98]=", CellID->807643912] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Properties and Relations", "Subsection", CellLabel->"In[3]:=", CellID->754506620], Cell["The divergence from a distribution to itself is zero:", "Text", CellChangeTimes->{{3.777200235160346*^9, 3.777200246808216*^9}}, CellID->203977807], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"\[Mu]", ",", "\[Sigma]"}], "]"}], ",", RowBox[{"NormalDistribution", "[", RowBox[{"\[Mu]", ",", "\[Sigma]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{3.777200219715624*^9}, CellLabel->"In[1]:=", CellID->520968890], Cell[BoxData["0"], "Output", CellChangeTimes->{{3.777200220182377*^9, 3.777200232425987*^9}, 3.7777850606490974`*^9, 3.7777868939830294`*^9}, CellLabel->"Out[1]=", CellID->941084612] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Possible Issues", "Subsection", CellLabel->"In[3]:=", CellID->92483860], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->531430405], Cell["The dimensions of the distributions have to match:", "Text", CellChangeTimes->{{3.7772020981804066`*^9, 3.777202111940616*^9}}, CellID->157225490], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"MultinormalDistribution", "[", RowBox[{"IdentityMatrix", "[", "2", "]"}], "]"}], ",", RowBox[{"MultinormalDistribution", "[", RowBox[{"IdentityMatrix", "[", "3", "]"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7772021182048774`*^9, 3.777202132949483*^9}}, CellLabel->"In[2]:=", CellID->381919758], Cell[BoxData[ TemplateBox[{ "ResourceFunction","usermessage", "\"\\!\\(\\*TemplateBox[List[StyleBox[RowBox[List[\\\"\ KullbackLeiblerDivergence\\\", \\\"::\\\", \\\"supportPQ\\\"]], \ \\\"MessageName\\\"], \\\"\\\\\\\": \\\\\\\"\\\", TemplateBox[List[\\\"\\\\\\\ \"The support of \\\\\\\"\\\", RowBox[List[\\\"MultinormalDistribution\\\", \ \\\"[\\\", RowBox[List[RowBox[List[\\\"{\\\", RowBox[List[\\\"0\\\", \ \\\",\\\", \\\"0\\\"]], \\\"}\\\"]], \\\",\\\", RowBox[List[\\\"{\\\", \ RowBox[List[RowBox[List[\\\"{\\\", RowBox[List[\\\"1\\\", \\\",\\\", \ \\\"0\\\"]], \\\"}\\\"]], \\\",\\\", RowBox[List[\\\"{\\\", RowBox[List[\\\"0\ \\\", \\\",\\\", \\\"1\\\"]], \\\"}\\\"]]]], \\\"}\\\"]]]], \\\"]\\\"]], \\\"\ \\\\\\\" is not a subset of the support of \\\\\\\"\\\", \ RowBox[List[\\\"MultinormalDistribution\\\", \\\"[\\\", \ RowBox[List[RowBox[List[\\\"{\\\", RowBox[List[\\\"0\\\", \\\",\\\", \ \\\"0\\\", \\\",\\\", \\\"0\\\"]], \\\"}\\\"]], \\\",\\\", \ RowBox[List[\\\"{\\\", RowBox[List[RowBox[List[\\\"{\\\", RowBox[List[\\\"1\\\ \", \\\",\\\", \\\"0\\\", \\\",\\\", \\\"0\\\"]], \\\"}\\\"]], \\\",\\\", \ RowBox[List[\\\"{\\\", RowBox[List[\\\"0\\\", \\\",\\\", \\\"1\\\", \ \\\",\\\", \\\"0\\\"]], \\\"}\\\"]], \\\",\\\", RowBox[List[\\\"{\\\", \ RowBox[List[\\\"0\\\", \\\",\\\", \\\"0\\\", \\\",\\\", \\\"1\\\"]], \ \\\"}\\\"]]]], \\\"}\\\"]]]], \\\"]\\\"]], \\\"\\\\\\\".\\\\\\\"\\\"], \ \\\"RowDefault\\\"]], \\\"RowDefault\\\"]\\)\"",2,2,23,16717634780446330042, "Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{ 3.7772021331798944`*^9, {3.7777850170328093`*^9, 3.7777850441881475`*^9}, 3.777786878924714*^9}, CellLabel->"During evaluation of In[2]:=", CellID->239146752], Cell[BoxData["Undefined"], "Output", CellChangeTimes->{ 3.7772021332067957`*^9, {3.777785017062816*^9, 3.7777850442090874`*^9}, 3.77778687894962*^9}, CellLabel->"Out[2]=", CellID->78830060] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->21205613], Cell["Matrix distributions are currently not supported:", "Text", CellChangeTimes->{{3.7772023105489006`*^9, 3.7772023188297973`*^9}, { 3.777202407556648*^9, 3.777202445674757*^9}, {3.778520165039281*^9, 3.7785201659436464`*^9}}, CellID->907297041], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"WishartMatrixDistribution", "[", RowBox[{"3", ",", RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "]"}], ",", RowBox[{"WishartMatrixDistribution", "[", RowBox[{"4", ",", RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7772021692614994`*^9, 3.777202188094176*^9}, { 3.7772023452507305`*^9, 3.777202349396653*^9}, {3.77720238253841*^9, 3.7772023826850195`*^9}, {3.7772024645710535`*^9, 3.7772024701351905`*^9}}, CellLabel->"In[4]:=", CellID->455753444], Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"WishartMatrixDistribution", "[", RowBox[{"3", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}]}], "]"}], ",", RowBox[{"WishartMatrixDistribution", "[", RowBox[{"4", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}]}], "]"}]}], "]"}]], "Output", CellChangeTimes->{ 3.7772021885270185`*^9, {3.777202278796805*^9, 3.777202349713806*^9}, { 3.777202384080262*^9, 3.7772024129371624`*^9}, {3.7772024480772743`*^9, 3.777202470362607*^9}, 3.7777850445643167`*^9, 3.777786879046361*^9}, CellLabel->"Out[4]=", CellID->52016183] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->528179769], Cell[TextData[{ "The divergence is ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Undefined", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.854902, 0.396078, 0.145098]}, { "Link"}]], ButtonData->"paclet:ref/Undefined", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], " if the first distribution has a wider support than the second:" }], "Text", CellChangeTimes->{{3.7772017258282504`*^9, 3.77720175518782*^9}, { 3.777203952774489*^9, 3.777203963312522*^9}}, CellID->272815804], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"NormalDistribution", "[", RowBox[{"\[Mu]", ",", "\[Sigma]"}], "]"}], ",", RowBox[{"ExponentialDistribution", "[", "\[Lambda]", "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7772017635057435`*^9, 3.7772017652459493`*^9}}, CellLabel->"In[5]:=", CellID->222783075], Cell[BoxData[ TemplateBox[{ "ResourceFunction","usermessage", "\"\\!\\(\\*TemplateBox[List[StyleBox[RowBox[List[\\\"\ KullbackLeiblerDivergence\\\", \\\"::\\\", \\\"supportPQ\\\"]], \ \\\"MessageName\\\"], \\\"\\\\\\\": \\\\\\\"\\\", TemplateBox[List[\\\"\\\\\\\ \"The support of \\\\\\\"\\\", RowBox[List[\\\"NormalDistribution\\\", \ \\\"[\\\", RowBox[List[\\\"\\\\[Mu]\\\", \\\",\\\", \\\"\\\\[Sigma]\\\"]], \\\ \"]\\\"]], \\\"\\\\\\\" is not a subset of the support of \\\\\\\"\\\", \ RowBox[List[\\\"ExponentialDistribution\\\", \\\"[\\\", \\\"\\\\[Lambda]\\\", \ \\\"]\\\"]], \\\"\\\\\\\".\\\\\\\"\\\"], \\\"RowDefault\\\"]], \\\"RowDefault\ \\\"]\\)\"",2,5,24,16717634780446330042,"Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{ 3.777201765868287*^9, {3.7777850240847254`*^9, 3.777785044952027*^9}, 3.7777868791042104`*^9}, CellLabel->"During evaluation of In[5]:=", CellID->219142830], Cell[BoxData["Undefined"], "Output", CellChangeTimes->{ 3.777201765892223*^9, {3.77778502410423*^9, 3.7777850449699783`*^9}, 3.7777868791241536`*^9}, CellLabel->"Out[5]=", CellID->291380159] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"PoissonDistribution", "[", "\[Lambda]", "]"}], ",", RowBox[{"BernoulliDistribution", "[", "p1", "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.7772697009128447`*^9, 3.777269702249099*^9}}, CellLabel->"In[6]:=", CellID->239908456], Cell[BoxData[ TemplateBox[{ "ResourceFunction","usermessage", "\"\\!\\(\\*TemplateBox[List[StyleBox[RowBox[List[\\\"\ KullbackLeiblerDivergence\\\", \\\"::\\\", \\\"supportPQ\\\"]], \ \\\"MessageName\\\"], \\\"\\\\\\\": \\\\\\\"\\\", TemplateBox[List[\\\"\\\\\\\ \"The support of \\\\\\\"\\\", RowBox[List[\\\"PoissonDistribution\\\", \\\"[\ \\\", \\\"\\\\[Lambda]\\\", \\\"]\\\"]], \\\"\\\\\\\" is not a subset of the \ support of \\\\\\\"\\\", RowBox[List[\\\"BernoulliDistribution\\\", \ \\\"[\\\", \\\"p1\\\", \\\"]\\\"]], \\\"\\\\\\\".\\\\\\\"\\\"], \ \\\"RowDefault\\\"]], \\\"RowDefault\\\"]\\)\"",2,6,25,16717634780446330042, "Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{ 3.7772697028053875`*^9, {3.7777850248363886`*^9, 3.7777850451577*^9}, 3.7777868791700306`*^9}, CellLabel->"During evaluation of In[6]:=", CellID->599732132], Cell[BoxData["Undefined"], "Output", CellChangeTimes->{ 3.7772697028235426`*^9, {3.7777850248543596`*^9, 3.7777850451746473`*^9}, 3.777786879189977*^9}, CellLabel->"Out[6]=", CellID->275459899] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->14826962], Cell[TextData[{ Cell[BoxData[ StyleBox["KullbackLeiblerDivergence", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " is undefined between discrete and continuous distributions:" }], "Text", CellChangeTimes->{{3.7772037836073008`*^9, 3.7772038331595483`*^9}, { 3.777203907631214*^9, 3.7772039094164352`*^9}, {3.7785200433872814`*^9, 3.778520075578025*^9}}, CellID->737421189], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"BernoulliDistribution", "[", RowBox[{"1", "/", "2"}], "]"}], ",", RowBox[{"NormalDistribution", "[", "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.777203763039668*^9, 3.777203767872096*^9}}, CellLabel->"In[7]:=", CellID->903306223], Cell[BoxData[ TemplateBox[{ "ResourceFunction","usermessage", "\"\\!\\(\\*TemplateBox[List[StyleBox[RowBox[List[\\\"\ KullbackLeiblerDivergence\\\", \\\"::\\\", \\\"supportPQ\\\"]], \ \\\"MessageName\\\"], \\\"\\\\\\\": \\\\\\\"\\\", TemplateBox[List[\\\"\\\\\\\ \"The support of \\\\\\\"\\\", RowBox[List[\\\"BernoulliDistribution\\\", \ \\\"[\\\", FractionBox[\\\"1\\\", \\\"2\\\"], \\\"]\\\"]], \\\"\\\\\\\" is \ not a subset of the support of \\\\\\\"\\\", \ RowBox[List[\\\"NormalDistribution\\\", \\\"[\\\", RowBox[List[\\\"0\\\", \ \\\",\\\", \\\"1\\\"]], \\\"]\\\"]], \\\"\\\\\\\".\\\\\\\"\\\"], \ \\\"RowDefault\\\"]], \\\"RowDefault\\\"]\\)\"",2,7,26,16717634780446330042, "Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{ 3.777203768229336*^9, {3.777785026207102*^9, 3.7777850453481874`*^9}, 3.777786879238846*^9}, CellLabel->"During evaluation of In[7]:=", CellID->93873199], Cell[BoxData["Undefined"], "Output", CellChangeTimes->{ 3.777203768257266*^9, {3.7777850262340035`*^9, 3.7777850453720875`*^9}, 3.7777868792607875`*^9}, CellLabel->"Out[7]=", CellID->168738746] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", CellID->220152606], Cell["\<\ For some symbolic distributions the expectation cannot be evaluated:\ \>", "Text", CellChangeTimes->{{3.7772011007696934`*^9, 3.777201147586644*^9}}, CellID->84909318], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"KullbackLeiblerDivergence\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"KullbackLeiblerDivergence\""}], ResourceFunction["KullbackLeiblerDivergence"], BoxID -> "KullbackLeiblerDivergence", Selectable->False], "[", RowBox[{ RowBox[{"BernoulliDistribution", "[", "p2", "]"}], ",", RowBox[{"BinomialDistribution", "[", RowBox[{"n", ",", "p1"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.777200006666664*^9, 3.7772000137467413`*^9}, { 3.7772002665684347`*^9, 3.7772002669693623`*^9}, {3.777200298333765*^9, 3.7772002995295715`*^9}, {3.7772004321829605`*^9, 3.7772004472377167`*^9}, {3.7772006908386755`*^9, 3.7772006913931932`*^9}, 3.777200969253974*^9, {3.7777859046003237`*^9, 3.777785910361207*^9}, 3.7777864191735086`*^9, {3.7777866904685054`*^9, 3.7777867196563745`*^9}, { 3.7777867989353037`*^9, 3.7777868190961018`*^9}, {3.777787127932035*^9, 3.7777871280951*^9}}, CellLabel->"In[6]:=", CellID->136448980], Cell[BoxData[ TemplateBox[{ "ResourceFunction","usermessage", "\"\\!\\(\\*TemplateBox[List[StyleBox[RowBox[List[\\\"\ KullbackLeiblerDivergence\\\", \\\"::\\\", \\\"supportValidationFail\\\"]], \ \\\"MessageName\\\"], \\\"\\\\\\\": \\\\\\\"\\\", TemplateBox[List[\\\"\\\\\\\ \"Failed to verify that the support of \\\\\\\"\\\", \ RowBox[List[\\\"BernoulliDistribution\\\", \\\"[\\\", \\\"p2\\\", \ \\\"]\\\"]], \\\"\\\\\\\" is a subset of the support of \\\\\\\"\\\", \ RowBox[List[\\\"BinomialDistribution\\\", \\\"[\\\", RowBox[List[\\\"n\\\", \ \\\",\\\", \\\"p1\\\"]], \\\"]\\\"]], \\\"\\\\\\\". Calculation will still be \ attempted.\\\\\\\"\\\"], \\\"RowDefault\\\"]], \\\"RowDefault\\\"]\\)\"",2,6, 29,16717634780446330042,"Local"}, "MessageTemplate"]], "Message", "MSG", CellChangeTimes->{3.777787130454444*^9}, CellLabel->"During evaluation of In[6]:=", CellID->499808049], Cell[BoxData[ RowBox[{"Expectation", "[", RowBox[{ RowBox[{ RowBox[{"(", TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[FormalX]"}], ")"}], " ", RowBox[{"Log", "[", RowBox[{"1", "-", "p2"}], "]"}]}], "+", RowBox[{"\[FormalX]", " ", RowBox[{"Log", "[", "p2", "]"}]}]}], RowBox[{ "0", "\[LessEqual]", "\[FormalX]", "\[LessEqual]", "1"}]}, { RowBox[{"-", "\[Infinity]"}], TagBox["True", "PiecewiseDefault", AutoDelete->True]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}}, Selectable->True]} }, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False, StripWrapperBoxes->True], ")"}], "-", RowBox[{"(", TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "\[FormalX]"}], "+", "n"}], ")"}], " ", RowBox[{"Log", "[", RowBox[{"1", "-", "p1"}], "]"}]}], "+", RowBox[{"\[FormalX]", " ", RowBox[{"Log", "[", "p1", "]"}]}], "+", RowBox[{"Log", "[", RowBox[{"Binomial", "[", RowBox[{"n", ",", "\[FormalX]"}], "]"}], "]"}]}], RowBox[{ "0", "\[LessEqual]", "\[FormalX]", "\[LessEqual]", "n"}]}, { RowBox[{"-", "\[Infinity]"}], TagBox["True", "PiecewiseDefault", AutoDelete->True]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}}, Selectable->True]} }, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False, StripWrapperBoxes->True], ")"}]}], ",", RowBox[{"\[FormalX]", "\[Distributed]", RowBox[{"BernoulliDistribution", "[", "p2", "]"}]}]}], "]"}]], "Output", CellChangeTimes->{ 3.777200271364587*^9, 3.7772003155008497`*^9, {3.777200432871119*^9, 3.777200447851077*^9}, 3.777200542483147*^9, {3.777200681820758*^9, 3.7772007291328783`*^9}, {3.7772007622108884`*^9, 3.7772007803792734`*^9}, 3.7772008141820345`*^9, 3.777200849451806*^9, {3.777200935612831*^9, 3.7772009702333775`*^9}, 3.7772010975303445`*^9, 3.777784844857342*^9, 3.777785061032771*^9, 3.7777859108889666`*^9, 3.7777863453188477`*^9, 3.777786375414833*^9, 3.7777864195482206`*^9, {3.777786692964802*^9, 3.7777867201194067`*^9}, 3.7777868199251456`*^9, {3.7777868657500873`*^9, 3.7777868942094855`*^9}, 3.7777871305900536`*^9}, CellLabel->"Out[6]=", CellID->679542577] }, Open ]] }, Open ]] }, Closed]] }, WindowSize->Automatic, WindowMargins->Automatic, FrontEndVersion->"12.0 for Linux x86 (64-bit) (April 8, 2019)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 79, 2, 70, "Subsection",ExpressionUUID->"de778692-149b-471f-bc53-69b1076308ad", CellID->462042388], Cell[662, 26, 865, 26, 70, "Text",ExpressionUUID->"cc3ef74f-13cf-4561-80ef-75178b0b48f1", CellID->236734399], Cell[CellGroupData[{ Cell[1552, 56, 2401, 58, 70, "Input",ExpressionUUID->"3c733114-5e49-45c4-8a3a-c1951a725571", CellID->43291893], Cell[3956, 116, 556, 12, 70, "Output",ExpressionUUID->"32853cbc-85b2-4ef2-9b37-d925d23a5aa6", CellID->55863997] }, Open ]], Cell[4527, 131, 144, 2, 70, "Text",ExpressionUUID->"1b9c753d-27ae-495e-9c16-718d871eafce", CellID->34795974], Cell[CellGroupData[{ Cell[4696, 137, 2169, 55, 70, "Input",ExpressionUUID->"3434f070-924a-4af1-82ed-0f178dceb965", CellID->613857373], Cell[6868, 194, 261, 6, 70, "Output",ExpressionUUID->"9e479976-3d0d-4786-a34b-fea4ab4f9203", CellID->114970541] }, Open ]], Cell[CellGroupData[{ Cell[7166, 205, 165, 4, 70, "Input",ExpressionUUID->"d50cb4dd-9aa5-4d51-8ed1-dd0cade048e2", CellID->181756532], Cell[7334, 211, 193, 4, 70, "Output",ExpressionUUID->"1794fcaf-ae09-49fb-ac33-c91e633c33da", CellID->3704951] }, Open ]], Cell[CellGroupData[{ Cell[7564, 220, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"cdd61aa2-387e-4928-8105-90e4bbb30473", CellID->313028829], Cell[7692, 225, 161, 2, 70, "Text",ExpressionUUID->"782a1f3f-f4f6-4f8d-aa61-d28467866e59", CellID->13078159], Cell[CellGroupData[{ Cell[7878, 231, 2324, 56, 70, "Input",ExpressionUUID->"b249d638-71ef-4e9c-9f73-7c3bc18ddeed", CellID->697590667], Cell[10205, 289, 979, 24, 70, "Output",ExpressionUUID->"218e6d9b-13a6-49fc-bc23-85151a7f5f75", CellID->751080757] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[11233, 319, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"76491c12-b2ea-4a0e-ad86-5ccba959d474", CellID->218729515], Cell[11361, 324, 208, 3, 70, "Text",ExpressionUUID->"f71cab16-2c9c-4e16-bdc5-e2b458342639", CellID->70085937], Cell[CellGroupData[{ Cell[11594, 331, 2344, 56, 70, "Input",ExpressionUUID->"45609364-dbeb-4d0a-b542-41c7e4a6a557", CellID->1218211], Cell[13941, 389, 1115, 30, 70, "Output",ExpressionUUID->"1735709e-f29a-4c43-a93d-9e63c31dc6c4", CellID->180071314] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[15105, 425, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"f28e3234-f86a-475e-9ada-32fa34679fc5", CellID->337968540], Cell[15233, 430, 192, 3, 70, "Text",ExpressionUUID->"e4ad1fcb-999d-419a-8b2e-73231ae2ced7", CellID->61646912], Cell[CellGroupData[{ Cell[15450, 437, 2101, 52, 70, "Input",ExpressionUUID->"33e22933-52f2-402e-9fd7-116f7ce74960", CellID->71139978], Cell[17554, 491, 559, 19, 70, "Output",ExpressionUUID->"591391aa-7b71-46ab-84bb-b970ee961911", CellID->130382131] }, Open ]], Cell[CellGroupData[{ Cell[18150, 515, 2104, 52, 70, "Input",ExpressionUUID->"b9c0e28d-d03b-4242-8fea-5745bb900f0e", CellID->30103607], Cell[20257, 569, 510, 15, 70, "Output",ExpressionUUID->"141b959e-a05c-4a7c-8ab8-def862393e1e", CellID->37505524] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[20816, 590, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"657e7b7e-70df-4f58-a63a-7addfa33dcfd", CellID->434638692], Cell[20944, 595, 701, 21, 70, "Text",ExpressionUUID->"35e3730a-ae79-4e51-84ee-9ba09ba4b351", CellID->238106516], Cell[CellGroupData[{ Cell[21670, 620, 2542, 65, 70, "Input",ExpressionUUID->"af91837a-04a9-4903-9e01-aaf77a93444e", CellID->36530754], Cell[24215, 687, 414, 11, 70, "Output",ExpressionUUID->"b39cef5e-d453-4800-91d7-2bf72b21f3e7", CellID->231231943] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[24690, 705, 70, 2, 70, "Subsection",ExpressionUUID->"cd56dc55-e5f6-477c-a10b-483b495695e9", CellID->964056545], Cell[24763, 709, 322, 9, 70, "Text",ExpressionUUID->"a8a0e372-be4f-4e34-8ba8-22dee898958a", CellID->322339065], Cell[CellGroupData[{ Cell[25110, 722, 2109, 52, 70, "Input",ExpressionUUID->"f36a1e39-2564-4411-bea4-ddaf947b7cdc", CellID->26634031], Cell[27222, 776, 1069, 34, 70, "Output",ExpressionUUID->"f9c36d16-24a1-43e6-ba4b-8616c2c0d56c", CellID->566129409] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[28340, 816, 72, 2, 70, "Subsection",ExpressionUUID->"b7a8e4ba-6416-4063-854b-5e19642d0282", CellID->776923543], Cell[CellGroupData[{ Cell[28437, 822, 116, 2, 70, "Subsubsection",ExpressionUUID->"871636ae-17a6-449e-b29d-809fb6c8bc85", CellID->39254211], Cell[28556, 826, 184, 4, 70, "Text",ExpressionUUID->"fcb51a45-a57c-4cb9-b4d0-48422cefcaff", CellID->69778073], Cell[CellGroupData[{ Cell[28765, 834, 2413, 59, 70, "Input",ExpressionUUID->"2154448a-b525-4383-b387-57f1e8d09e7a", CellID->3414088], Cell[31181, 895, 224, 5, 70, "Output",ExpressionUUID->"5c87df9f-2195-4f12-8eb3-f64334379e80", CellID->50266488] }, Open ]], Cell[31420, 903, 623, 20, 70, "Text",ExpressionUUID->"79baa8e0-b21c-47fe-b9b2-2757377f4cc0", CellID->305414587], Cell[CellGroupData[{ Cell[32068, 927, 2243, 55, 70, "Input",ExpressionUUID->"cf891e6a-655c-4522-beb6-795c0b3b2e73", CellID->418750045], Cell[34314, 984, 183, 4, 70, "Output",ExpressionUUID->"a5b0ad24-e342-41ff-9863-dfe843b42410", CellID->24355991] }, Open ]], Cell[34512, 991, 633, 20, 70, "Text",ExpressionUUID->"77a743ac-c784-4673-8b8a-c3492f93897b", CellID->493308132], Cell[CellGroupData[{ Cell[35170, 1015, 2638, 65, 70, "Input",ExpressionUUID->"20ed4c1f-a4b1-43df-a1b2-1e25ca724bb6", CellID->600173769], Cell[37811, 1082, 234, 4, 70, "Output",ExpressionUUID->"5444294b-581c-4955-b930-15480df78814", CellID->561386452] }, Open ]], Cell[CellGroupData[{ Cell[38082, 1091, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"f023f462-2758-41f0-8d4e-a0426801a6de", CellID->313678082], Cell[38210, 1096, 714, 20, 70, "Text",ExpressionUUID->"cf49361e-ae12-4600-8823-6c193c1dd78b", CellID->339713932], Cell[CellGroupData[{ Cell[38949, 1120, 2250, 55, 70, "Input",ExpressionUUID->"64f58a7a-8c28-4100-89ac-480451c3075d", CellID->263314464], Cell[41202, 1177, 1010, 18, 70, "Message",ExpressionUUID->"5d24a1d7-e1ee-4663-b539-56bdbe905a22", CellID->457463], Cell[42215, 1197, 168, 4, 70, "Output",ExpressionUUID->"90329441-b122-4302-adfc-00e27dbf488c", CellID->199909001] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[42444, 1208, 122, 2, 70, "Subsubsection",ExpressionUUID->"5af9cee5-e6f2-480c-9b56-acca231f0a08", CellID->166208034], Cell[42569, 1212, 735, 21, 70, "Text",ExpressionUUID->"9d1f5f57-e04d-4613-96d9-94349157ff62", CellID->601776192], Cell[CellGroupData[{ Cell[43329, 1237, 2271, 57, 70, "Input",ExpressionUUID->"70784478-d8fe-4ecc-aeba-fa58f51f35ea", CellID->19597287], Cell[45603, 1296, 1021, 17, 70, "Message",ExpressionUUID->"16fa2037-8ed4-4133-b453-4cb07ab424ae", CellID->6029386], Cell[46627, 1315, 1392, 42, 70, "Output",ExpressionUUID->"44e74a03-e179-41bb-afc7-400dcd313cce", CellID->256515997] }, Open ]], Cell[48034, 1360, 346, 6, 70, "Text",ExpressionUUID->"aa3bdfd4-1b9d-43f4-9157-e0fd18afcdb8", CellID->130203931], Cell[CellGroupData[{ Cell[48405, 1370, 2506, 61, 70, "Input",ExpressionUUID->"88c0cea7-c69a-45f6-b9f3-1a8b62774291", CellID->308862234], Cell[50914, 1433, 342, 7, 70, "Output",ExpressionUUID->"01bb098c-76d4-4f34-9446-2cef158da9f9", CellID->171085166] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[51317, 1447, 77, 2, 70, "Subsection",ExpressionUUID->"bd3de76e-fa31-4cdb-9eaf-e54ed9413709", CellID->568056528], Cell[51397, 1451, 736, 19, 70, "Text",ExpressionUUID->"af7d2f4e-4f60-4a77-b242-c0c52e52acb3", CellID->873658449], Cell[52136, 1472, 770, 21, 70, "Text",ExpressionUUID->"6bf82a56-4948-478d-8017-2f7a8d02a7b8", CellID->386977101], Cell[CellGroupData[{ Cell[52931, 1497, 2674, 68, 70, "Input",ExpressionUUID->"bfaeef5c-bf33-411a-aaf6-4f79bc365023", CellID->102711388], Cell[55608, 1567, 360, 10, 70, "Output",ExpressionUUID->"4bfcfbe7-4c5d-4878-b8f4-33960e047dbb", CellID->807643912] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[56017, 1583, 89, 2, 70, "Subsection",ExpressionUUID->"f252d204-bcc4-44e6-a47e-6c65fe86f5f4", CellID->754506620], Cell[56109, 1587, 155, 2, 70, "Text",ExpressionUUID->"b8bdb650-a777-44b7-ac21-801011fd99e9", CellID->203977807], Cell[CellGroupData[{ Cell[56289, 1593, 2140, 54, 70, "Input",ExpressionUUID->"2ef8a34d-5b7e-41f1-a4d7-e27bc9280713", CellID->520968890], Cell[58432, 1649, 189, 4, 70, "Output",ExpressionUUID->"f240ef10-70dc-40dc-9b77-62cf0bbd336d", CellID->941084612] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[58670, 1659, 79, 2, 70, "Subsection",ExpressionUUID->"7f674f89-128a-4e80-8870-ce3e1de198da", CellID->92483860], Cell[CellGroupData[{ Cell[58774, 1665, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"71683e80-1d51-41bf-9aac-aa1d57ba76b5", CellID->531430405], Cell[58902, 1670, 154, 2, 70, "Text",ExpressionUUID->"d3c1e703-0301-4d32-a0c9-b198e4853d5c", CellID->157225490], Cell[CellGroupData[{ Cell[59081, 1676, 2190, 54, 70, "Input",ExpressionUUID->"97588de0-c27a-4c25-8c77-1ec8c252031f", CellID->381919758], Cell[61274, 1732, 1728, 29, 70, "Message",ExpressionUUID->"a61e63d9-9ace-48de-923a-5eff4a8a094e", CellID->239146752], Cell[63005, 1763, 198, 5, 70, "Output",ExpressionUUID->"82d641ce-c2b9-400e-bc05-1bc3ac48bfcc", CellID->78830060] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[63252, 1774, 124, 3, 70, "ExampleDelimiter",ExpressionUUID->"9d2afdfd-f407-4a91-8e73-075544c7cf65", CellID->21205613], Cell[63379, 1779, 255, 4, 70, "Text",ExpressionUUID->"4eb6816e-1422-491d-b7dc-e9fd80a377b6", CellID->907297041], Cell[CellGroupData[{ Cell[63659, 1787, 2397, 58, 70, "Input",ExpressionUUID->"7a4a0472-29e9-4fc9-88a8-88e60b728096", CellID->455753444], Cell[66059, 1847, 2667, 69, 70, "Output",ExpressionUUID->"4e0f8a31-a9d4-4c9b-a7d7-591863e2e7b1", CellID->52016183] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[68775, 1922, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"a0a48ff6-d380-4208-999c-e78fbbfaaeaa", CellID->528179769], Cell[68903, 1927, 731, 21, 70, "Text",ExpressionUUID->"b8ca1942-fddc-4c60-b647-25f79f40d648", CellID->272815804], Cell[CellGroupData[{ Cell[69659, 1952, 2148, 54, 70, "Input",ExpressionUUID->"3f67b98b-1633-4904-a93d-5fdd830d1cba", CellID->222783075], Cell[71810, 2008, 929, 17, 70, "Message",ExpressionUUID->"82140180-b686-414a-b97d-f1bddbbe1848", CellID->219142830], Cell[72742, 2027, 199, 5, 70, "Output",ExpressionUUID->"912a12e3-bd4a-46bc-8694-00fe6b72524a", CellID->291380159] }, Open ]], Cell[CellGroupData[{ Cell[72978, 2037, 2107, 52, 70, "Input",ExpressionUUID->"5a462b00-db2a-447f-aed0-ac108fd4ca4a", CellID->239908456], Cell[75088, 2091, 878, 17, 70, "Message",ExpressionUUID->"0fed0598-6cb0-4c75-a0ec-60d01ccbe65f", CellID->599732132], Cell[75969, 2110, 202, 5, 70, "Output",ExpressionUUID->"5af079cd-5cd9-4698-88ce-7bef45aa4899", CellID->275459899] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[76220, 2121, 124, 3, 70, "ExampleDelimiter",ExpressionUUID->"3360fa0e-f00c-4a91-aed7-15297404405f", CellID->14826962], Cell[76347, 2126, 420, 10, 70, "Text",ExpressionUUID->"226f8096-f45a-40d1-9750-759a62981f3f", CellID->737421189], Cell[CellGroupData[{ Cell[76792, 2140, 2115, 53, 70, "Input",ExpressionUUID->"e8ba954e-2a2d-4f37-b7df-a266d74eba54", CellID->903306223], Cell[78910, 2195, 924, 18, 70, "Message",ExpressionUUID->"96f7d823-72c3-436d-9cf7-243a31ec96cc", CellID->93873199], Cell[79837, 2215, 202, 5, 70, "Output",ExpressionUUID->"1e122a9c-94c6-4281-93c8-b54f49652207", CellID->168738746] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[80088, 2226, 125, 3, 70, "ExampleDelimiter",ExpressionUUID->"1c8a6ac7-2e0f-4303-adb2-29136b3b3728", CellID->220152606], Cell[80216, 2231, 179, 4, 70, "Text",ExpressionUUID->"cee4f62c-7e10-45ef-864f-6acf260c95a0", CellID->84909318], Cell[CellGroupData[{ Cell[80420, 2239, 2590, 60, 70, "Input",ExpressionUUID->"a89377f3-a1b0-43b0-a8b8-fc94a08ea9a6", CellID->136448980], Cell[83013, 2301, 895, 16, 70, "Message",ExpressionUUID->"609db87b-952c-4bcf-a85a-406106c5890e", CellID->499808049], Cell[83911, 2319, 4580, 117, 70, "Output",ExpressionUUID->"fea16704-6f5c-4730-afa1-7e6cdc2bdc32", CellID->679542577] }, Open ]] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)