(* 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[ 7082, 217] NotebookOptionsPosition[ 6720, 200] NotebookOutlinePosition[ 7068, 215] CellTagsIndexPosition[ 7025, 212] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[StyleBox["Mahalanobis fuzzy Xie-Beni index", FontColor->RGBColor[1, 0, 0]]], "Subsection", CellChangeTimes->{ 3.5854097085807176`*^9, 3.585637218737363*^9, {3.7255165931679688`*^9, 3.725516594386836*^9}, {3.8078509217486286`*^9, 3.8078509235303373`*^9}, 3.822225222190958*^9, 3.8222263491864443`*^9, 3.8222269369146223`*^9, 3.8222271612780204`*^9}, ExpressionUUID -> "a64cb8e3-4b5a-458a-81b2-359028b304d5"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ StyleBox["Input", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"data", " ", "set", " ", "\[ScriptCapitalA]"}], " ", "\[Subset]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"centers", " ", SubscriptBox["z", "1"]}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox["\[TripleDot]", FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ SubscriptBox["z", "k"], " ", "\[Element]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"membership", " ", "matrix", " ", "U"}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"covariance", " ", "matrices", " ", UnderscriptBox["\[Sum]", "j"]}], "\[Element]", SuperscriptBox["\[DoubleStruckCapitalR]", RowBox[{"n", "\[Cross]", "n"}]]}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"j", "=", RowBox[{"1", "\[TripleDot]k"}]}], ";"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[0, 0, 1]], RowBox[{ RowBox[{ StyleBox["Output", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"MFXB", " ", "index"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[";", FontColor->RGBColor[0, 0, 1]]}], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[0, 0, 1]], RowBox[{ StyleBox["Submodules", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"dM", "[", "]"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox["\[IndentingNewLine]", FontColor->RGBColor[0, 0, 1]]}]}]], "Text", CellChangeTimes->{{3.8208938752340946`*^9, 3.8208939165097227`*^9}, 3.8208939777537127`*^9, {3.82089402908541*^9, 3.8208940654953437`*^9}, { 3.820894178610306*^9, 3.8208942451936073`*^9}, {3.820894336841039*^9, 3.8208943606992674`*^9}, {3.8222252468201857`*^9, 3.8222252579121275`*^9}, {3.8222263768275585`*^9, 3.8222264735149126`*^9}, {3.8222267120062532`*^9, 3.8222267137917337`*^9}, 3.8222268123848886`*^9, {3.8222269734939747`*^9, 3.8222270468006*^9}, { 3.822227188241254*^9, 3.8222272187064533`*^9}, {3.822227276564354*^9, 3.822227297837488*^9}, {3.8223131633785963`*^9, 3.8223131818237576`*^9}}, FontSize->12, ExpressionUUID -> "46567b81-f70d-49a0-a082-b32f5d905c2d"], Cell[BoxData[{ RowBox[{"Clear", "[", "MFXB", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MFXB", "[", RowBox[{"A_", ",", "cen_", ",", "U_", ",", "cov_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"m", ",", "k"}], "}"}], ",", RowBox[{ RowBox[{"m", "=", RowBox[{"Length", "[", "A", "]"}]}], ";", RowBox[{"k", "=", RowBox[{"Length", "[", "cen", "]"}]}], ";", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"U", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "^", "q"}], " ", RowBox[{"dM", "[", RowBox[{ RowBox[{"cen", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"cov", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}], "/", RowBox[{"(", RowBox[{"m", "*", RowBox[{"Min", "[", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"dM", "[", RowBox[{ RowBox[{"cen", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"cen", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{ RowBox[{"cov", "[", RowBox[{"[", "i", "]"}], "]"}], "+", RowBox[{"cov", "[", RowBox[{"[", "j", "]"}], "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"k", "-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"i", "+", "1"}], ",", "k"}], "}"}]}], "]"}], ",", "1"}], "]"}], "]"}]}], ")"}]}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.822227596794509*^9, 3.8222276012205205`*^9}},ExpressionUUID->"43a42f94-8e4c-4778-881f-\ 691f85f76278"] }, Open ]] }, WindowSize->{1536, 779}, WindowMargins->{{-8, Automatic}, {Automatic, -8}}, FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (September 21, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 437, 7, 49, "Subsection"], Cell[1020, 31, 3444, 102, 125, "Text"], Cell[4467, 135, 2237, 62, 126, "Input"] }, Open ]] } ] *)