(* 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[ 6143, 152] NotebookOptionsPosition[ 5619, 135] NotebookOutlinePosition[ 5963, 150] CellTagsIndexPosition[ 5920, 147] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Mahalanobis area index for optimal Mahalanobis partitions", \ "Subsubsection", CellChangeTimes->{{3.8222224358173933`*^9, 3.8222224402713366`*^9}},ExpressionUUID->"ea0a3b0a-2589-4462-8d77-\ 06a97ad00614"], Cell[BoxData[ RowBox[{"(*", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Input", ":", " ", RowBox[{"partition", " ", "\[CapitalPi]"}]}], "=", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ SubscriptBox["\[Pi]", "1"], ",", "\[TripleDot]", ",", SubscriptBox["\[Pi]", "k"]}], "}"}], " ", "of", " ", "the", " ", "weighted", " ", "set", " ", "\[ScriptCapitalA]"}], " ", "\[Subset]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}]}], ",", " ", RowBox[{"centers", " ", SubscriptBox["c", "1"]}], ",", "\[TripleDot]", ",", RowBox[{ SubscriptBox["c", "k"], " ", "\[Element]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}], ",", " ", RowBox[{ RowBox[{"covariance", " ", "matrices", " ", UnderscriptBox["\[Sum]", "j"]}], "\[Element]", SuperscriptBox["\[DoubleStruckCapitalR]", RowBox[{"n", "\[Cross]", "n"}]]}], ",", " ", RowBox[{ RowBox[{"j", "=", RowBox[{"1", "\[TripleDot]k"}]}], ";", "\[IndentingNewLine]", RowBox[{"Output", ":", " ", RowBox[{ "MArea", " ", "index", " ", "for", " ", "the", " ", "partition", " ", "\[CapitalPi]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Submodules", ":", " ", RowBox[{"none", " ", "needed"}]}]}]}], " ", "\[IndentingNewLine]", "*)"}]], "Input", CellChangeTimes->{{3.5886541897699375`*^9, 3.5886541909877396`*^9}, { 3.588654263023868*^9, 3.588654339794004*^9}, {3.5917588683674088`*^9, 3.591758869047409*^9}, {3.5917590328866577`*^9, 3.591759044816675*^9}, { 3.5937444692479725`*^9, 3.5937444771129847`*^9}, {3.8067251659311037`*^9, 3.8067252085746784`*^9}, {3.8067252462048798`*^9, 3.806725247420523*^9}, { 3.8067555742205267`*^9, 3.8067555768738213`*^9}, {3.8071002028759546`*^9, 3.807100208919777*^9}, {3.8107927170556965`*^9, 3.8107927208402033`*^9}, { 3.813128996198531*^9, 3.81312899765561*^9}, {3.8131290871131477`*^9, 3.8131291044656687`*^9}, 3.813129162727297*^9, {3.813129217851308*^9, 3.81312926039266*^9}, {3.8131293311074486`*^9, 3.813129508676306*^9}, { 3.8208235288040915`*^9, 3.8208235296679153`*^9}, {3.820823683703711*^9, 3.820823686279229*^9}, {3.822221932773207*^9, 3.822222005492038*^9}, { 3.8222221607470207`*^9, 3.8222221750484905`*^9}, 3.8222222931703854`*^9, { 3.8222224610501657`*^9, 3.8222224789564514`*^9}},ExpressionUUID->"4f6001e5-4731-4da1-898f-\ f0f23cdb63d0"], Cell[BoxData[{ RowBox[{"Clear", "[", "MArea", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MArea", "[", RowBox[{"PI_", ",", "z_", ",", "Scov_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Det", "[", RowBox[{"Scov", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "/", RowBox[{"Length", "[", RowBox[{"PI", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", "PI", "]"}]}], "}"}]}], "]"}], "*)"}], "\[IndentingNewLine]", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"Sqrt", "[", RowBox[{"Det", "[", RowBox[{"Scov", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], "/", RowBox[{"Total", "[", RowBox[{"PI", "[", RowBox[{"[", RowBox[{"j", ",", "All", ",", "1"}], "]"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"Length", "[", "PI", "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}]}], "Input", CellChangeTimes->{{3.583463220558251*^9, 3.583463254744911*^9}, { 3.583463291727977*^9, 3.5834633202820272`*^9}, {3.5834634235576096`*^9, 3.583463428862619*^9}, 3.58346354254642*^9, 3.584588843561839*^9, 3.584589201132472*^9, {3.5845901320879188`*^9, 3.584590134850124*^9}, { 3.5867436569533305`*^9, 3.586743657748932*^9}, {3.5867437429732823`*^9, 3.586743772759735*^9}, {3.586743824764627*^9, 3.586743839558453*^9}, { 3.586745430168068*^9, 3.586745461891924*^9}, {3.592360606845284*^9, 3.5923606409001436`*^9}, {3.592365663863366*^9, 3.592365776885565*^9}, { 3.5943041512933016`*^9, 3.594304167456326*^9}, {3.594304204796383*^9, 3.594304207877388*^9}, {3.7230994370884895`*^9, 3.723099443201758*^9}, { 3.7231001985974555`*^9, 3.7231002036799326`*^9}, {3.723100321867401*^9, 3.723100330280794*^9}, {3.7231004011513214`*^9, 3.723100425611371*^9}, { 3.7231016860908623`*^9, 3.7231016966699696`*^9}, {3.8067580828086715`*^9, 3.806758084046102*^9}, {3.8300838991363616`*^9, 3.8300839077138157`*^9}},ExpressionUUID->"d96baa50-dc49-4f1b-9d3d-\ 1544cbe4672f"] }, Open ]] }, WindowSize->{830, 327}, WindowMargins->{{-1917, Automatic}, {Automatic, 7}}, FrontEndVersion->"12.0 for Microsoft Windows (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, 214, 4, 44, "Subsubsection",ExpressionUUID->"ea0a3b0a-2589-4462-8d77-06a97ad00614"], Cell[797, 28, 2461, 50, 129, "Input",ExpressionUUID->"4f6001e5-4731-4da1-898f-f0f23cdb63d0"], Cell[3261, 80, 2342, 52, 105, "Input",ExpressionUUID->"d96baa50-dc49-4f1b-9d3d-1544cbe4672f"] }, Open ]] } ] *)