(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.2' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 5658, 159] NotebookOptionsPosition[ 4474, 136] NotebookOutlinePosition[ 4872, 152] CellTagsIndexPosition[ 4829, 149] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[{ RowBox[{ RowBox[{"SetDirectory", "[", RowBox[{"NotebookDirectory", "[", "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"apifera", " ", "=", " ", RowBox[{"FileNames", "[", RowBox[{"All", ",", "\"\\""}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.8225594921074095`*^9, 3.8225595316227736`*^9}, { 3.8301425115281477`*^9, 3.8301425240490303`*^9}},ExpressionUUID->"34302178-ceef-48e8-aadc-\ f321671d0f32"], Cell[BoxData[ RowBox[{ RowBox[{"bees", " ", "=", " ", RowBox[{"FileNames", "[", RowBox[{"All", ",", "\"\\""}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.8225595489404116`*^9, 3.8225595706862555`*^9}, { 3.830142531579644*^9, 3.8301425408114967`*^9}},ExpressionUUID->"7876ff84-58d8-4827-b064-\ 10123b439b64"], Cell[BoxData[ RowBox[{ RowBox[{"DataApifera", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{"apifera", "[", RowBox[{"[", "#", "]"}], "]"}], "\[Rule]", "\"\\""}], "&"}], "/@", " ", RowBox[{"Range", "[", RowBox[{"Length", "@", "apifera"}], "]"}]}]}], ";"}]], "Input", CellLabel->"In[18]:=",ExpressionUUID->"2c5e1379-3085-42cd-81b1-b7813b9657e4"], Cell[BoxData[ RowBox[{ RowBox[{"DataBees", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"bees", "[", RowBox[{"[", "#", "]"}], "]"}], "\[Rule]", "\"\\""}], "&"}], "/@", RowBox[{"Range", "[", RowBox[{"Length", "@", "bees"}], "]"}]}]}], ";"}]], "Input", CellLabel->"In[19]:=",ExpressionUUID->"9cb6ee16-da2c-4d0c-b979-a67b85a31b57"], Cell[BoxData[ RowBox[{ RowBox[{"Data", "=", RowBox[{"Union", "[", RowBox[{"DataApifera", ",", "DataBees"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.822534747158866*^9, 3.82253478233055*^9}}, CellLabel->"In[20]:=",ExpressionUUID->"0453e619-02c3-454e-955b-48feec0b3b8b"], Cell[BoxData[ RowBox[{ RowBox[{"myData", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Import", "@", RowBox[{ RowBox[{"Data", "[", RowBox[{"[", "#", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "->", RowBox[{ RowBox[{"Data", "[", RowBox[{"[", "#", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], "&"}], "/@", RowBox[{"Range", "[", RowBox[{"Length", "@", "Data"}], "]"}]}]}], ";"}]], "Input", CellLabel->"In[1]:=",ExpressionUUID->"c5819ab6-08bb-458d-b6c2-0c6464764886"], Cell[BoxData[{ RowBox[{ RowBox[{"sampleSize", "=", RowBox[{"IntegerPart", "[", RowBox[{ RowBox[{"Length", "@", "myData"}], "*", "0.8"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"myDataTrain", "=", RowBox[{"RandomSample", "[", RowBox[{"myData", ",", "sampleSize"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"myDataTest", "=", RowBox[{"Complement", "[", RowBox[{"myData", ",", "myDataTrain"}], "]"}]}], ";"}]}], "Input", CellLabel->"In[23]:=",ExpressionUUID->"03a22da7-ba54-4f04-a9d0-a21afcda85ee"], Cell[BoxData[ RowBox[{"myClassify", "=", RowBox[{"Classify", "[", "myDataTrain", "]"}]}]], "Input", CellChangeTimes->{{3.82253484955575*^9, 3.822534866918989*^9}, 3.8225349003772078`*^9}, CellLabel->"In[27]:=",ExpressionUUID->"247c100b-fc52-40a1-aae9-f2ff7cc0056e"], Cell[BoxData[{ RowBox[{ RowBox[{"myAccuracyDiag", "=", RowBox[{"ClassifierMeasurements", "[", RowBox[{"myClassify", ",", "myDataTest"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"myAccuracyDiag", "[", "\"\\"", "]"}]}], "Input", CellLabel->"In[28]:=",ExpressionUUID->"04f2fca2-45d2-4617-9b3d-582d2867a35d"], Cell[BoxData[ RowBox[{"myAccuracyDiag", "[", "\"\\"", "]"}]], "Input", CellLabel->"In[30]:=",ExpressionUUID->"3b5b7193-5411-4040-9c79-32c7531d1b1d"] }, WindowSize->{1920, 997}, WindowMargins->{{-8, Automatic}, {Automatic, -8}}, FrontEndVersion->"12.2 for Mac OS X x86 (64-bit) (December 12, 2020)", StyleDefinitions->"Default.nb", ExpressionUUID->"1264f482-877c-4dc6-94dd-c03856b4918b" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 509, 13, 52, "Input",ExpressionUUID->"34302178-ceef-48e8-aadc-f321671d0f32"], Cell[1070, 35, 375, 9, 30, "Input",ExpressionUUID->"7876ff84-58d8-4827-b064-10123b439b64"], Cell[1448, 46, 404, 11, 30, "Input",ExpressionUUID->"2c5e1379-3085-42cd-81b1-b7813b9657e4"], Cell[1855, 59, 372, 10, 30, "Input",ExpressionUUID->"9cb6ee16-da2c-4d0c-b979-a67b85a31b57"], Cell[2230, 71, 289, 6, 30, "Input",ExpressionUUID->"0453e619-02c3-454e-955b-48feec0b3b8b"], Cell[2522, 79, 576, 17, 30, "Input",ExpressionUUID->"c5819ab6-08bb-458d-b6c2-0c6464764886"], Cell[3101, 98, 577, 16, 73, "Input",ExpressionUUID->"03a22da7-ba54-4f04-a9d0-a21afcda85ee"], Cell[3681, 116, 275, 5, 30, "Input",ExpressionUUID->"247c100b-fc52-40a1-aae9-f2ff7cc0056e"], Cell[3959, 123, 338, 7, 52, "Input",ExpressionUUID->"04f2fca2-45d2-4617-9b3d-582d2867a35d"], Cell[4300, 132, 170, 2, 30, "Input",ExpressionUUID->"3b5b7193-5411-4040-9c79-32c7531d1b1d"] } ] *)