(* 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[ 6478, 194] NotebookOptionsPosition[ 6122, 177] NotebookOutlinePosition[ 6467, 192] CellTagsIndexPosition[ 6424, 189] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[StyleBox["Xie-Beni fuzzy index for spherical clustering", 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}, ExpressionUUID -> "a64cb8e3-4b5a-458a-81b2-359028b304d5"], Cell[BoxData[{ 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["c", "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["c", "k"], " ", "\[Element]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "n"]}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"membership", " ", "matrix", " ", "U"}], ";"}], FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ StyleBox["Output", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"FXB", " ", "index"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[";", FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ StyleBox["Submodules", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"none", " ", "needed"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[" ", FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]"}], "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.8223095087090807`*^9, 3.822309516065324*^9}}, FontSize->12, ExpressionUUID -> "46567b81-f70d-49a0-a082-b32f5d905c2d"], Cell[BoxData[{ RowBox[{"Clear", "[", "FXB", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FXB", "[", RowBox[{"A_", ",", "cen_", ",", "U_"}], "]"}], ":=", 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[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"cen", "[", RowBox[{"[", "j", "]"}], "]"}], "-", RowBox[{"A", "[", RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "^", "2"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "m"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "k"}], "}"}]}], "]"}], "/", RowBox[{"(", RowBox[{"m", "*", RowBox[{"Min", "[", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"cen", "[", RowBox[{"[", "i", "]"}], "]"}], "-", RowBox[{"cen", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"k", "-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"i", "+", "1"}], ",", "k"}], "}"}]}], "]"}], ",", "1"}], "]"}], "]"}]}], ")"}]}]}]}], "\[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.724041619150714*^9, 3.7240416260661516`*^9}, {3.7240418334787807`*^9, 3.7240418762726283`*^9}, {3.7240419092262836`*^9, 3.724041910005359*^9}, { 3.7240419457023067`*^9, 3.724041984153574*^9}, {3.724042028248847*^9, 3.72404206950558*^9}, {3.7240422848453293`*^9, 3.724042286792523*^9}, 3.724045515376709*^9, 3.7255205876973066`*^9, {3.7255230033161693`*^9, 3.725523022546343*^9}, {3.807850938890945*^9, 3.8078509406073847`*^9}, { 3.807851014776679*^9, 3.8078510251455812`*^9}, {3.8078510788274*^9, 3.8078510943351793`*^9}, {3.808195777624118*^9, 3.8081957939175386`*^9}, 3.8222252033277063`*^9},ExpressionUUID->"bc02f35c-40e0-4297-94f4-\ a1c6a8975696"] }, Open ]] }, WindowSize->{702, 268}, WindowMargins->{{0, Automatic}, {Automatic, 1}}, 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, 374, 6, 49, "Subsection"], Cell[957, 30, 2325, 74, 83, "Text"], Cell[3285, 106, 2821, 68, 145, "Input"] }, Open ]] } ] *)