├── .gitignore ├── 1995一种离散化的方法.pdf ├── 2003另一种方法.pdf ├── C++ source Code ├── C4.5.cpp ├── Continuous │ ├── .vscode │ │ ├── c_cpp_properties.json │ │ ├── launch.json │ │ └── settings.json │ ├── CDTree.cpp │ ├── CDTree.hpp │ ├── CMakeCache.txt │ ├── CMakeFiles │ │ ├── 3.5.1 │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ ├── CMakeSystem.cmake │ │ │ └── CompilerIdCXX │ │ │ │ └── CMakeCXXCompilerId.cpp │ │ ├── CMakeDirectoryInformation.cmake │ │ ├── CMakeOutput.log │ │ ├── DtreeMain.dir │ │ │ ├── CXX.includecache │ │ │ ├── DependInfo.cmake │ │ │ ├── build.make │ │ │ ├── cmake_clean.cmake │ │ │ ├── depend.internal │ │ │ ├── depend.make │ │ │ ├── flags.make │ │ │ ├── link.txt │ │ │ └── progress.make │ │ ├── Makefile.cmake │ │ ├── Makefile2 │ │ ├── TargetDirectories.txt │ │ ├── cmake.check_cache │ │ ├── feature_tests.bin │ │ ├── feature_tests.cxx │ │ └── progress.marks │ ├── CMakeLists.txt │ ├── DtreeMain │ ├── Makefile │ ├── RFCSV.hpp │ ├── cmake_install.cmake │ └── main.cpp ├── Discrete │ ├── DTree.cpp │ ├── DTree.hpp │ ├── haha.csv │ ├── haha2.csv │ ├── main.cpp │ ├── out.yml │ ├── pre.csv │ └── tianqi.csv └── data │ ├── ContinuousTest.csv │ ├── ContinuousTrain.csv │ ├── ContinuousValid.csv │ ├── Newslabel.csv │ ├── Newsvector.csv │ ├── 连续样例数据.csv │ └── 连续样例数据.xlsx ├── Coninuous_DecisionTree ├── .~draw.pptx ├── CDTree.png ├── Readme.md ├── cut.png ├── data.png ├── decisiontree.png ├── draw.pptx ├── example.png ├── handsome.png ├── hight.png ├── hight_sort.png ├── interval_tree.png └── result.png ├── Continuous_DecisionTree ├── .~draw.pptx ├── CDTree.png ├── Readme.md ├── cut.png ├── data.png ├── decisiontree.png ├── draw.pptx ├── example.png ├── handsome.png ├── hight.png ├── hight_sort.png ├── interval_tree.png └── result.png ├── Finding Optimal Decision Trees.pdf ├── LICENSE ├── README.md ├── SogouCA.mini.tar.gz ├── SogouCA.mini.txt ├── XGboost.pdf ├── how to deal with continuous attribute.pdf ├── pic ├── data.png ├── predicted.png ├── trainData.png └── 流程.png ├── ppt.pdf ├── 连续数据的决策树.png └── 连续数据的决策树.xmind /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /1995一种离散化的方法.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/1995一种离散化的方法.pdf -------------------------------------------------------------------------------- /2003另一种方法.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/2003另一种方法.pdf -------------------------------------------------------------------------------- /C++ source Code/C4.5.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | using namespace std; 9 | 10 | class MatrixCls 11 | { 12 | private: 13 | vector < vector < string > > Matrix; 14 | public: 15 | MatrixCls(string Data_File) 16 | { 17 | Matrix.erase(Matrix.begin(),Matrix.end()); 18 | ifstream Data(Data_File); 19 | string Line; 20 | string Item; 21 | vector < string > Row; 22 | while(!Data.eof()) 23 | { 24 | getline(Data, Line); 25 | istringstream Iss(Line); 26 | while(Iss.good()) 27 | { 28 | getline(Iss, Item, ','); 29 | Item.erase(remove(Item.begin(), Item.begin()+2, ' '), Item.begin()+2); 30 | Item.erase(remove(Item.end()-1, Item.end(), ' '), Item.end()); 31 | Row.push_back(Item); 32 | } 33 | 34 | if(Line.length()) 35 | { 36 | Matrix.push_back(Row); 37 | Row.erase(Row.begin(),Row.end()); 38 | } 39 | } 40 | Data.close(); 41 | } 42 | 43 | MatrixCls(){ }; 44 | ~MatrixCls(){ }; 45 | 46 | string Element(int i,int j) 47 | { 48 | return Matrix[i][j]; 49 | } 50 | 51 | int SizeX() 52 | { 53 | return Matrix[0].size(); 54 | } 55 | 56 | int SizeY() 57 | { 58 | return Matrix.size(); 59 | } 60 | 61 | vector < string > GetVarKinds() 62 | { 63 | vector < string > Kinds; 64 | int j; 65 | for(j = 0; j < SizeX()-1; j++) 66 | { 67 | Kinds.push_back(Matrix[0][j]); 68 | } 69 | return Kinds; 70 | } 71 | 72 | vector < string > GetAttributes() 73 | { 74 | vector < string > Attributes; 75 | int j; 76 | for(j = 0; j < SizeX()-1; j++) 77 | { 78 | Attributes.push_back(Matrix[1][j]); 79 | } 80 | return Attributes; 81 | } 82 | 83 | vector < string > GetScores() 84 | { 85 | vector < string > Scores; 86 | for(int i = 2; i < SizeY(); i++) 87 | { 88 | Scores.push_back(Matrix[i][SizeX()-1]); 89 | } 90 | return Scores; 91 | } 92 | 93 | int GetAttributeIndex(string The_Attribute) 94 | { 95 | { 96 | int Index = 0; 97 | for(int j = 0; j < SizeX(); j++) 98 | { 99 | if(Matrix[1][j].compare(The_Attribute) == 0) 100 | { 101 | Index = j; 102 | break; 103 | } 104 | } 105 | return Index; 106 | } 107 | } 108 | 109 | vector < string > GetAttributeValues(string The_Attribute) 110 | { 111 | vector < string > Values; 112 | int Index = GetAttributeIndex(The_Attribute); 113 | for(int i = 2; i < SizeY(); i++) 114 | { 115 | Values.push_back(Matrix[i][Index]); 116 | } 117 | return Values; 118 | } 119 | 120 | vector < string > GetUniqueAttributeValues(string The_Attribute) 121 | { 122 | vector < string > Values = GetAttributeValues(The_Attribute); 123 | sort(Values.begin(), Values.end()); 124 | Values.erase(unique(Values.begin(), Values.end()), Values.end()); 125 | return Values; 126 | } 127 | 128 | map < string, vector < string > > GetAttributeValuesScores(string The_Attribute) 129 | { 130 | int i,k; 131 | int Index = GetAttributeIndex(The_Attribute); 132 | map < string, vector < string > > Attribute_Values_Scores; 133 | vector < string > Attribute_Values = GetUniqueAttributeValues(The_Attribute); 134 | vector < string > Row; 135 | for(k = 0; k < Attribute_Values.size(); k++) 136 | { 137 | for(i = 2; i < SizeY(); i++) 138 | { 139 | if(Matrix[i][Index].compare(Attribute_Values[k]) == 0) 140 | { 141 | Row.push_back(Matrix[i][SizeX()-1]); 142 | } 143 | } 144 | Attribute_Values_Scores[Attribute_Values[k]] = Row; 145 | Row.erase(Row.begin(),Row.end()); 146 | } 147 | return Attribute_Values_Scores; 148 | } 149 | 150 | vector < string > SortAttributeValues(string The_Attribute) 151 | { 152 | vector < string > Values = GetAttributeValues(The_Attribute); 153 | string Temp; 154 | for(int i = 0; i < Values.size()-1; i++) 155 | { 156 | for(int j = i+1; j < Values.size(); j++) 157 | { 158 | if(stod(Values[i]) - stod(Values[j]) > 1.e-8) 159 | { 160 | Temp = Values[i]; 161 | Values[i] = Values[j]; 162 | Values[j] = Temp; 163 | } 164 | } 165 | } 166 | return Values; 167 | } 168 | 169 | vector < string > SortScoreValues(string The_Attribute) 170 | { 171 | vector < string > Values = GetAttributeValues(The_Attribute); 172 | vector < string > Scores = GetScores(); 173 | string Temp; 174 | 175 | for(int i = 0; i < Values.size()-1; i++) 176 | { 177 | for(int j = i+1; j < Values.size(); j++) 178 | { 179 | if(stod(Values[i]) - stod(Values[j]) > 1.e-8) 180 | { 181 | Temp = Values[i]; 182 | Values[i] = Values[j]; 183 | Values[j] = Temp; 184 | 185 | Temp = Scores[i]; 186 | Scores[i] = Scores[j]; 187 | Scores[j] = Temp; 188 | } 189 | } 190 | } 191 | return Scores; 192 | } 193 | 194 | vector < string > GetBisectNodes(string The_Attribute) 195 | { 196 | vector < string > Bisect_Nodes; 197 | vector < string > SortedValues = SortAttributeValues(The_Attribute); 198 | vector < string > SortedScores = SortScoreValues(The_Attribute); 199 | for(int i = 0; i < SortedValues.size()-1; i++) 200 | { 201 | if(abs(stod(SortedValues[i]) - stod(SortedValues[i+1])) > 1.e-8 & SortedScores[i].compare(SortedScores[i+1]) != 0) 202 | { 203 | Bisect_Nodes.push_back(to_string((stod(SortedValues[i]) + stod(SortedValues[i+1]))/2.)); 204 | } 205 | } 206 | return Bisect_Nodes; 207 | } 208 | 209 | map < string, vector < string > > GetAttributeBisectParts(string The_Attribute, string Bisect_Node) 210 | { 211 | map < string, vector < string > > Bisect_Parts; 212 | vector < string > SortedValues = SortAttributeValues(The_Attribute); 213 | vector < string > SortedScores = SortScoreValues(The_Attribute); 214 | vector < string > Row_1, Row_2, Row_3, Row_4; 215 | for(int i = 0; i < SortedValues.size(); i++) 216 | { 217 | if(stod(SortedValues[i]) - stod(Bisect_Node) < -1.e-8) 218 | { 219 | Row_1.push_back(SortedScores[i]); 220 | Row_3.push_back(SortedValues[i]); 221 | }else{ 222 | Row_2.push_back(SortedScores[i]); 223 | Row_4.push_back(SortedValues[i]); 224 | } 225 | } 226 | Bisect_Parts["Lower_Scores"] = Row_1; 227 | Bisect_Parts["Upper_Scores"] = Row_2; 228 | Bisect_Parts["Lower_Values"] = Row_3; 229 | Bisect_Parts["Upper_Values"] = Row_4; 230 | return Bisect_Parts; 231 | } 232 | 233 | MatrixCls operator()(MatrixCls A_Matrix, string The_Attribute, string The_Value, string Bisect_Node = "") 234 | { 235 | Matrix.erase(Matrix.begin(),Matrix.end()); 236 | int i, j; 237 | int Index = A_Matrix.GetAttributeIndex(The_Attribute); 238 | vector < string > Kinds = A_Matrix.GetVarKinds(); 239 | vector < string > Row; 240 | 241 | if(Kinds[Index].compare("Discrete") == 0) 242 | { 243 | for(i = 0; i < 2; i++) 244 | { 245 | for(j = 0; j < A_Matrix.SizeX(); j++) 246 | { 247 | if(A_Matrix.Element(1,j).compare(The_Attribute) != 0) 248 | { 249 | Row.push_back(A_Matrix.Element(i,j)); 250 | } 251 | } 252 | if(Row.size() != 0) 253 | { 254 | Matrix.push_back(Row); 255 | Row.erase(Row.begin(),Row.end()); 256 | } 257 | } 258 | 259 | for(i = 2; i < A_Matrix.SizeY(); i++) 260 | { 261 | for(j = 0; j < A_Matrix.SizeX(); j++) 262 | { 263 | if(A_Matrix.Element(1,j).compare(The_Attribute) != 0 & A_Matrix.Element(i,Index).compare(The_Value) == 0) 264 | { 265 | Row.push_back(A_Matrix.Element(i,j)); 266 | } 267 | } 268 | 269 | if(Row.size() != 0) 270 | { 271 | Matrix.push_back(Row); 272 | Row.erase(Row.begin(),Row.end()); 273 | } 274 | } 275 | return *this; 276 | } 277 | 278 | else if(Kinds[Index].compare("Continuous") == 0) 279 | { 280 | for(i = 0; i < 2; i++) 281 | { 282 | for(j = 0; j < A_Matrix.SizeX(); j++) 283 | { 284 | Row.push_back(A_Matrix.Element(i,j)); 285 | } 286 | if(Row.size() != 0) 287 | { 288 | Matrix.push_back(Row); 289 | Row.erase(Row.begin(),Row.end()); 290 | } 291 | } 292 | 293 | if(The_Value.compare("Lower_Values") == 0) 294 | { 295 | for(i = 2; i < A_Matrix.SizeY(); i++) 296 | { 297 | for(j = 0; j < A_Matrix.SizeX(); j++) 298 | { 299 | if(stod(A_Matrix.Element(i,Index)) -stod(Bisect_Node) < -1.e-8) 300 | { 301 | Row.push_back(A_Matrix.Element(i,j)); 302 | } 303 | } 304 | 305 | if(Row.size() != 0) 306 | { 307 | Matrix.push_back(Row); 308 | Row.erase(Row.begin(),Row.end()); 309 | } 310 | } 311 | } 312 | else if(The_Value.compare("Upper_Values") == 0) 313 | { 314 | for(i = 2; i < A_Matrix.SizeY(); i++) 315 | { 316 | for(j = 0; j < A_Matrix.SizeX(); j++) 317 | { 318 | if(stod(A_Matrix.Element(i,Index)) - stod(Bisect_Node) > 1.e-8) 319 | { 320 | Row.push_back(A_Matrix.Element(i,j)); 321 | } 322 | } 323 | 324 | if(Row.size() != 0) 325 | { 326 | Matrix.push_back(Row); 327 | Row.erase(Row.begin(),Row.end()); 328 | } 329 | } 330 | } 331 | return *this; 332 | } 333 | } 334 | 335 | void Display() 336 | { 337 | int i, j; 338 | for(i = 0; i < Matrix.size(); i++) 339 | { 340 | for(j = 0; j < Matrix[0].size(); j++) 341 | { 342 | cout << Matrix[i][j] << " \t"; 343 | } 344 | cout << endl; 345 | } 346 | } 347 | }; 348 | 349 | vector < string > UniqueValues(vector < string > A_String) 350 | { 351 | sort(A_String.begin(), A_String.end()); 352 | A_String.erase(unique(A_String.begin(), A_String.end()), A_String.end()); 353 | return A_String; 354 | } 355 | 356 | string FrequentValues(vector < string > A_String) 357 | { 358 | vector < string > Unique_Values = UniqueValues(A_String); 359 | int Count[Unique_Values.size()] = {0}; 360 | for(int i = 0; i < A_String.size(); i++) 361 | { 362 | for(int j = 0; j < Unique_Values.size(); j++) 363 | { 364 | if(A_String[i].compare(Unique_Values[j]) == 0) 365 | { 366 | Count[j] = Count[j] + 1; 367 | } 368 | } 369 | } 370 | 371 | int Max_Count = 0, Max_Index; 372 | for(int i = 0; i < Unique_Values.size(); i++) 373 | { 374 | if(Count[i] > Max_Count) 375 | { 376 | Max_Count = Count[i]; 377 | Max_Index = i; 378 | } 379 | } 380 | return Unique_Values[Max_Index]; 381 | } 382 | 383 | double ComputeScoreEntropy(vector < string > Scores) 384 | { 385 | vector < string > Score_Range = UniqueValues(Scores); 386 | if(Score_Range.size() == 0) 387 | { 388 | return 0.; 389 | } 390 | else 391 | { 392 | double TheEntropy = 0.; 393 | int i, j; 394 | int Count[Score_Range.size()] = {0}; 395 | 396 | for(i = 0; i < Scores.size(); i++) 397 | { 398 | for(j = 0; j < Score_Range.size(); j++) 399 | { 400 | if(Scores[i].compare(Score_Range[j]) == 0) 401 | { 402 | Count[j] = Count[j] + 1; 403 | } 404 | } 405 | } 406 | 407 | double Temp_Entropy; 408 | double Temp_P; 409 | for(j = 0; j < Score_Range.size(); j++) 410 | { 411 | Temp_P = (double)Count[j]/(double)(Scores.size()); 412 | Temp_Entropy = -Temp_P*log(Temp_P)/log(2.); 413 | TheEntropy = TheEntropy + Temp_Entropy; 414 | } 415 | return TheEntropy; 416 | } 417 | } 418 | 419 | double ComputeAttributeEntropy(MatrixCls Remain_Matrix, string The_Attribute) 420 | { 421 | vector < string > Values = Remain_Matrix.GetAttributeValues(The_Attribute); 422 | return ComputeScoreEntropy(Values); 423 | } 424 | 425 | double ComputeAttributeEntropyGain(MatrixCls Remain_Matrix, string The_Attribute, string Bisect_Node = "") 426 | { 427 | int Index = Remain_Matrix.GetAttributeIndex(The_Attribute); 428 | vector < string > Kinds = Remain_Matrix.GetVarKinds(); 429 | double Original_Entropy = 0., Gained_Entropy = 0.; 430 | vector < string > Scores = Remain_Matrix.GetScores(); 431 | Original_Entropy = ComputeScoreEntropy(Scores); 432 | 433 | if(Kinds[Index].compare("Discrete") == 0) 434 | { 435 | map < string, vector < string > > Values_Scores = Remain_Matrix.GetAttributeValuesScores(The_Attribute); 436 | vector < string > Values = Remain_Matrix.GetUniqueAttributeValues(The_Attribute); 437 | 438 | double After_Entropy = 0.; 439 | double Temp_Entropy; 440 | vector < string > Temp_Scores; 441 | int i,j; 442 | for(i = 0; i < Values.size(); i++) 443 | { 444 | Temp_Scores = Values_Scores[Values[i]]; 445 | Temp_Entropy = ComputeScoreEntropy(Temp_Scores)*(double)Temp_Scores.size()/(double)Scores.size(); 446 | After_Entropy = After_Entropy + Temp_Entropy; 447 | } 448 | Gained_Entropy = Original_Entropy - After_Entropy; 449 | return Gained_Entropy; 450 | } 451 | 452 | if(Kinds[Index].compare("Continuous") == 0) 453 | { 454 | map < string, vector < string > > Parts = Remain_Matrix.GetAttributeBisectParts(The_Attribute,Bisect_Node); 455 | double LowerLen = Parts["Lower_Scores"].size(); 456 | double UpperLen = Parts["Upper_Scores"].size(); 457 | double Len = LowerLen + UpperLen; 458 | double After_Entropy, Gained_Entropy; 459 | After_Entropy = LowerLen/Len*ComputeScoreEntropy(Parts["Lower_Scores"]) + UpperLen/Len*ComputeScoreEntropy(Parts["Upper_Scores"]); 460 | Gained_Entropy = Original_Entropy - After_Entropy; 461 | return Gained_Entropy; 462 | } 463 | } 464 | 465 | double GainRatio(MatrixCls Remain_Matrix, string The_Attribute, string Bisect_Node = "") 466 | { 467 | double Attribute_Entropy = ComputeAttributeEntropy(Remain_Matrix, The_Attribute); 468 | double Attribute_Entropy_Gain = ComputeAttributeEntropyGain(Remain_Matrix, The_Attribute, Bisect_Node); 469 | return Attribute_Entropy_Gain/Attribute_Entropy; 470 | } 471 | 472 | class TreeCls 473 | { 474 | public: 475 | string Node; 476 | string Branch; 477 | vector < TreeCls * > Child; 478 | TreeCls(); 479 | TreeCls * BuildTree(TreeCls * Tree, MatrixCls Remain_Matrix); 480 | void Display(int Depth); 481 | string Temp_TestTree(vector < string > Kinds, vector < string > Attributes, vector < string > Value, vector < string > Score_Range); 482 | vector < string > TestTree(MatrixCls Data_Matrix); 483 | }; 484 | 485 | string TreeCls::Temp_TestTree(vector < string > Kinds, vector < string > Attributes, vector < string > Value, vector < string > Score_Range) 486 | { 487 | for(int i = 0; i < Score_Range.size(); i++) 488 | { 489 | if(this->Node.compare(Score_Range[i]) == 0) 490 | { 491 | return this->Node; 492 | } 493 | } 494 | 495 | for(int i = 0; i < Attributes.size(); i++) 496 | { 497 | if(this->Node.compare(Attributes[i]) == 0) 498 | { 499 | if(Kinds[i].compare("Discrete") == 0) 500 | { 501 | for(int j = 0; j < this->Child.size(); j++) 502 | { 503 | if((this->Child[j])->Branch.compare(Value[i]) == 0) 504 | { 505 | for(int k = 0; k < Score_Range.size(); k++) 506 | { 507 | if((this->Child[j])->Node.compare(Score_Range[k]) == 0) 508 | { 509 | return (this->Child[j])->Node; 510 | } 511 | } 512 | 513 | vector < string > New_Kinds; 514 | vector < string > New_Attributes; 515 | vector < string > New_Value; 516 | for(int l = 0; l < Attributes.size(); l++) 517 | { 518 | if( l != i) 519 | { 520 | New_Kinds.push_back(Kinds[l]); 521 | New_Attributes.push_back(Attributes[l]); 522 | New_Value.push_back(Value[l]); 523 | } 524 | } 525 | return (this->Child[j])->Temp_TestTree(New_Kinds, New_Attributes, New_Value, Score_Range); 526 | } 527 | } 528 | } 529 | 530 | else if(Kinds[i].compare("Continuous") == 0) 531 | { 532 | string Threshold = (this->Child[0])->Branch; 533 | Threshold.erase(remove(Threshold.begin(), Threshold.begin()+3, '<'), Threshold.begin()+3); 534 | Threshold.erase(remove(Threshold.begin(), Threshold.begin()+3, ' '), Threshold.begin()+3); 535 | if(stod(Value[i]) - stod(Threshold) < -1.e-8) 536 | { 537 | for(int k = 0; k < Score_Range.size(); k++) 538 | { 539 | if((this->Child[0])->Node.compare(Score_Range[k]) == 0) 540 | { 541 | return (this->Child[0])->Node; 542 | } 543 | } 544 | return (this->Child[0])->Temp_TestTree(Kinds, Attributes, Value, Score_Range); 545 | } 546 | else if(stod(Value[i]) - stod(Threshold) > 1.e-8) 547 | { 548 | for(int k = 0; k < Score_Range.size(); k++) 549 | { 550 | if((this->Child[1])->Node.compare(Score_Range[k]) == 0) 551 | { 552 | return (this->Child[1])->Node; 553 | } 554 | } 555 | return (this->Child[1])->Temp_TestTree(Kinds, Attributes, Value, Score_Range); 556 | } 557 | } 558 | } 559 | } 560 | } 561 | 562 | vector < string > TreeCls::TestTree(MatrixCls Data_Matrix) 563 | { 564 | 565 | int Lines_Number = Data_Matrix.SizeY() - 2; 566 | vector < string > Test_Scores; 567 | int i, j, k, l, m; 568 | vector < string > Kinds = Data_Matrix.GetVarKinds(); 569 | vector < string > Attributes = Data_Matrix.GetAttributes(); 570 | vector < string > Attributes_Value; 571 | vector < string > Score_Range = UniqueValues(Data_Matrix.GetScores()); 572 | 573 | for(i = 0; i < Lines_Number; i++) 574 | { 575 | 576 | for(j = 0; j < Data_Matrix.SizeX() - 1; j++) 577 | { 578 | Attributes_Value.push_back(Data_Matrix.Element((i+2),j)); 579 | } 580 | 581 | string Temp_Score; 582 | Temp_Score = Temp_TestTree(Kinds, Attributes, Attributes_Value, Score_Range); 583 | Test_Scores.push_back(Temp_Score); 584 | Attributes_Value.erase(Attributes_Value.begin(),Attributes_Value.end()); 585 | } 586 | return Test_Scores; 587 | } 588 | 589 | TreeCls::TreeCls() 590 | { 591 | Node = ""; 592 | Branch = ""; 593 | } 594 | 595 | TreeCls * TreeCls::BuildTree(TreeCls * Tree, MatrixCls Remain_Matrix) 596 | { 597 | if(Tree == NULL) 598 | { 599 | Tree = new TreeCls(); 600 | } 601 | 602 | vector < string > Unique_Scores = UniqueValues(Remain_Matrix.GetScores()); 603 | if(Unique_Scores.size() == 1) 604 | { 605 | Tree->Node = Unique_Scores[0]; 606 | return Tree; 607 | } 608 | 609 | //vector < string > Scores = Remain_Matrix.GetScores(); 610 | //if(Scores.size() <= 5) 611 | //{ 612 | // Tree->Node = FrequentValues(Scores); 613 | // return Tree; 614 | //} 615 | 616 | double Gain_Ratio = 0, Entropy_Gain = 0; 617 | double Temp_Gain_Ratio, Temp_Entropy_Gain; 618 | string Max_Attribute; 619 | string Max_Bisect_Node = ""; 620 | int Max_Attribute_Index = 0; 621 | //string Max_Bisect_Node_Index = 0; 622 | vector < string > Attributes = Remain_Matrix.GetAttributes(); 623 | vector < string > Kinds = Remain_Matrix.GetVarKinds(); 624 | int i, j; 625 | for(i = 0; i < Attributes.size(); i++) 626 | { 627 | if(Kinds[i].compare("Discrete") == 0) 628 | { 629 | Temp_Gain_Ratio = GainRatio(Remain_Matrix,Attributes[i]); 630 | } 631 | else if(Kinds[i].compare("Continuous") == 0) 632 | { 633 | vector < string > Bisect_Nodes = Remain_Matrix.GetBisectNodes(Attributes[i]); 634 | for(j = 0; j < Bisect_Nodes.size(); j++) 635 | { 636 | Temp_Entropy_Gain = ComputeAttributeEntropyGain(Remain_Matrix,Attributes[i],Bisect_Nodes[j]); 637 | if(Temp_Entropy_Gain - Entropy_Gain > 1.e-8 ) 638 | { 639 | Entropy_Gain = Temp_Entropy_Gain; 640 | Max_Bisect_Node = Bisect_Nodes[j]; 641 | } 642 | } 643 | Temp_Gain_Ratio = GainRatio(Remain_Matrix,Attributes[i], Max_Bisect_Node); 644 | } 645 | 646 | if(Temp_Gain_Ratio - Gain_Ratio > 1.e-8) 647 | { 648 | Gain_Ratio = Temp_Gain_Ratio; 649 | Max_Attribute = Attributes[i]; 650 | Max_Attribute_Index = i; 651 | } 652 | } 653 | 654 | Tree->Node = Max_Attribute; 655 | vector < string > Values, Branch_Values; 656 | if(Kinds[Max_Attribute_Index].compare("Discrete") == 0) 657 | { 658 | Values = Remain_Matrix.GetUniqueAttributeValues(Max_Attribute); 659 | Branch_Values = Values; 660 | } 661 | else if(Kinds[Max_Attribute_Index].compare("Continuous") == 0) 662 | { 663 | Values = {"Lower_Values", "Upper_Values"}; 664 | string Left_Branch = "< " + Max_Bisect_Node; 665 | string Right_Branch = "> " + Max_Bisect_Node; 666 | Branch_Values = {Left_Branch, Right_Branch}; 667 | } 668 | 669 | int k; 670 | MatrixCls New_Matrix; 671 | for(k = 0; k < Values.size(); k++) 672 | { 673 | New_Matrix = New_Matrix.operator()(Remain_Matrix, Max_Attribute, Values[k], Max_Bisect_Node); 674 | TreeCls * New_Tree = new TreeCls(); 675 | New_Tree->Branch = Branch_Values[k]; 676 | vector < string > New_Unique_Scores = UniqueValues(New_Matrix.GetScores()); 677 | if(New_Unique_Scores.size() == 1) 678 | { 679 | New_Tree->Node = New_Unique_Scores[0]; 680 | } 681 | else 682 | { 683 | BuildTree(New_Tree, New_Matrix); 684 | } 685 | Tree->Child.push_back(New_Tree); 686 | } 687 | return Tree; 688 | } 689 | 690 | void TreeCls::Display(int Depth = 0) 691 | { 692 | for(int i = 0; i < Depth; i++) 693 | { 694 | cout << "\t"; 695 | } 696 | if(this->Branch.compare("") != 0) 697 | { 698 | cout << this->Branch << endl; 699 | for(int i = 0; i < Depth+1; i++) 700 | { 701 | cout << "\t"; 702 | } 703 | } 704 | cout << this->Node << endl; 705 | for(int i = 0; i < this->Child.size(); i++) 706 | { 707 | (this->Child[i])->Display(Depth + 1); 708 | } 709 | } 710 | 711 | void DisplayVector(vector < string > The_Vector) 712 | { 713 | for(int i = 0; i < The_Vector.size(); i++) 714 | { 715 | cout << The_Vector[i] << "\n" ; 716 | } 717 | cout << endl; 718 | } 719 | 720 | int main() 721 | { 722 | MatrixCls Matrix("Golf.dat"); 723 | TreeCls * Tree; 724 | Tree = Tree->BuildTree(Tree, Matrix); 725 | Tree->Display(); 726 | vector < string > Test_Scores = Tree->TestTree(Matrix); 727 | DisplayVector(Test_Scores); 728 | vector < string > Test_String = {"a","b","c","d"}; 729 | DisplayVector(Test_String); 730 | Test_String.erase(Test_String.begin()+0); 731 | //cout << sizeof(Test_String.begin()) << endl; 732 | DisplayVector(Test_String); 733 | } 734 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**", 7 | "/usr/local/eigen3/" 8 | ], 9 | "defines": [], 10 | "compilerPath": "/usr/bin/clang", 11 | "cStandard": "c11", 12 | "cppStandard": "c++17", 13 | "intelliSenseMode": "clang-x64" 14 | } 15 | ], 16 | "version": 4 17 | } -------------------------------------------------------------------------------- /C++ source Code/Continuous/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "(gdb) Launch", 9 | "type": "cppdbg", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/DtreeMain", 12 | "args": [], 13 | "stopAtEntry": false, 14 | "cwd": "${workspaceFolder}", 15 | "environment": [], 16 | "externalConsole": true, 17 | "MIMode": "gdb", 18 | "setupCommands": [ 19 | { 20 | "description": "Enable pretty-printing for gdb", 21 | "text": "-enable-pretty-printing", 22 | "ignoreFailures": true 23 | } 24 | ] 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /C++ source Code/Continuous/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "cctype": "cpp", 4 | "cmath": "cpp", 5 | "cstddef": "cpp", 6 | "cstdio": "cpp", 7 | "cstdlib": "cpp", 8 | "cstring": "cpp", 9 | "ctime": "cpp", 10 | "cwchar": "cpp", 11 | "array": "cpp", 12 | "atomic": "cpp", 13 | "strstream": "cpp", 14 | "*.tcc": "cpp", 15 | "chrono": "cpp", 16 | "clocale": "cpp", 17 | "complex": "cpp", 18 | "cstdint": "cpp", 19 | "cwctype": "cpp", 20 | "deque": "cpp", 21 | "unordered_map": "cpp", 22 | "vector": "cpp", 23 | "exception": "cpp", 24 | "fstream": "cpp", 25 | "functional": "cpp", 26 | "initializer_list": "cpp", 27 | "iosfwd": "cpp", 28 | "iostream": "cpp", 29 | "istream": "cpp", 30 | "limits": "cpp", 31 | "new": "cpp", 32 | "ostream": "cpp", 33 | "numeric": "cpp", 34 | "ratio": "cpp", 35 | "sstream": "cpp", 36 | "stdexcept": "cpp", 37 | "streambuf": "cpp", 38 | "system_error": "cpp", 39 | "thread": "cpp", 40 | "cinttypes": "cpp", 41 | "type_traits": "cpp", 42 | "tuple": "cpp", 43 | "typeindex": "cpp", 44 | "typeinfo": "cpp", 45 | "utility": "cpp" 46 | } 47 | } -------------------------------------------------------------------------------- /C++ source Code/Continuous/CDTree.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CDTree_H 2 | #define CDTree_H 3 | 4 | #include 5 | #include //读取文件内容 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | using std::cout; using std::cin; using std::cerr; using std::endl; 13 | using std::string; using std::ifstream; using std::istringstream; 14 | using std::vector; using std::map; using std::ios; 15 | 16 | using Eigen::MatrixXf; //Eigen Matrix float 存储数据 训练数据 17 | using Eigen::MatrixXi; //Eigen Matrix int 存储数据 训练数据和标签 18 | using Eigen::VectorXi; 19 | using Eigen::VectorXf; 20 | 21 | 22 | class CDTree 23 | { 24 | public: 25 | struct TreeNode 26 | { //节点信息 27 | TreeNode* parents; //当前节点的双亲节点 28 | int AttributeIndex; //此节点对应的属性索引 29 | bool LeafNode; //判断是否为叶子节点 30 | vector children; //孩子节点的地址。 31 | int label; //if it is a leaf node then this prameter is useful 32 | 33 | }; 34 | 35 | struct IntervalTree 36 | { 37 | IntervalTree *leftTree; 38 | IntervalTree *rightTree; 39 | bool LeafNode; 40 | float cutValue; 41 | IntervalTree *parients; 42 | }; 43 | 44 | vector ColsIndex; //所有数据的列 45 | TreeNode* root; 46 | int deepestTree; // deepest depth of the tree 47 | int max_bin; // max number of interval on every continous parameter's cut 48 | float thresholdInfoGain; //在计算 49 | int trainX_Dimension; 50 | 51 | 52 | CDTree(int deepestTree, int max_bin, float thresholdInfoGain); 53 | CDTree(); 54 | int buildTree(const MatrixXf &trainX, const MatrixXi &trainY, const MatrixXf &validateX, const MatrixXi &validateY, string Algorithm); 55 | int buildTree(const MatrixXf &trainX, const MatrixXi &trainY, string Algorithm); 56 | MatrixXi predict(const MatrixXf &testX); 57 | ~CDTree(); 58 | 59 | private: 60 | vector>> intervals; // 每个属性的区间分割 61 | vector>> continous2discrete(const MatrixXf &trainX, const MatrixXi &trainY); 62 | IntervalTree* MultiwayPartitionGain(IntervalTree *parientsNode, const vector &continuousVec, const MatrixXf &trainX, const MatrixXi &trainY, int index, float thresholdInfoGain); 63 | int getIntervalsFromTreeStruct(IntervalTree *Intervalroot, vector &intervals); 64 | int sortVectorXf(const VectorXf &vec, VectorXf &sorted_vec, VectorXi &ind); 65 | int cutBranches(const MatrixXf &validateX, const MatrixXi &validateY); 66 | int cutBranches(int deepthTree); 67 | TreeNode* AlgorithmID3(TreeNode *parients, const MatrixXf &trainX, const MatrixXi &trainY, vector attrrbuteIndexOfCurrentData); 68 | TreeNode* AlgorithmC4_5(const MatrixXf &trainX, const MatrixXi &trainY); 69 | TreeNode* AlgorithmCART(const MatrixXf &trainX, const MatrixXi &trainY); 70 | std::pair splitData(const MatrixXf &trainX, const MatrixXi &trainY, std::pair smallInterval, int maxIndex, string flag); 71 | int FindMaxInformationGain(vector s); 72 | vector CalculateInfGain(const MatrixXf &trainX, const MatrixXi &trainY, vector attributeIndexOfCurrentData); 73 | vector getSampleProbability(const MatrixXi &trainY); 74 | vector removeColRepetitionValue(const MatrixXf &Col); 75 | MatrixXi findDvlabel(const MatrixXf &trainX, const MatrixXi &trainY, int index, std::pair smallInterval, string flag); 76 | float calculateEntropy(vector probability); 77 | bool TheSameLabel(const MatrixXi &trainY); 78 | int chooseMostLabel(const MatrixXi &trainY); 79 | int findExistandDealwith(int label, vector> &labelAndNum); 80 | int destroyTree(TreeNode* root); 81 | int destroyIntervalTree(IntervalTree *root); 82 | 83 | template 84 | int KMeans(vector vec, vector &newvec, int index); 85 | int predictTree(TreeNode *node, const MatrixXf testX); 86 | 87 | }; 88 | 89 | #endif -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous 3 | # It was generated by CMake: /usr/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | //For backwards compatibility, what version of CMake commands and 18 | // syntax should this version of CMake try to support. 19 | CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4 20 | 21 | //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or 22 | // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. 23 | CMAKE_BUILD_TYPE:STRING= 24 | 25 | //Enable/Disable color output during build. 26 | CMAKE_COLOR_MAKEFILE:BOOL=ON 27 | 28 | //Flags used by the compiler during all build types. 29 | CMAKE_CXX_FLAGS:STRING= 30 | 31 | //Flags used by the compiler during debug builds. 32 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 33 | 34 | //Flags used by the compiler during release builds for minimum 35 | // size. 36 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 37 | 38 | //Flags used by the compiler during release builds. 39 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 40 | 41 | //Flags used by the compiler during release builds with debug info. 42 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 43 | 44 | //Flags used by the linker. 45 | CMAKE_EXE_LINKER_FLAGS:STRING= 46 | 47 | //Flags used by the linker during debug builds. 48 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 49 | 50 | //Flags used by the linker during release minsize builds. 51 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 52 | 53 | //Flags used by the linker during release builds. 54 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 55 | 56 | //Flags used by the linker during Release with Debug Info builds. 57 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 58 | 59 | //Enable/Disable output of compile commands during generation. 60 | CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF 61 | 62 | //Install path prefix, prepended onto install directories. 63 | CMAKE_INSTALL_PREFIX:PATH=/usr/local 64 | 65 | //Path to a program. 66 | CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make 67 | 68 | //Flags used by the linker during the creation of modules. 69 | CMAKE_MODULE_LINKER_FLAGS:STRING= 70 | 71 | //Flags used by the linker during debug builds. 72 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 73 | 74 | //Flags used by the linker during release minsize builds. 75 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 76 | 77 | //Flags used by the linker during release builds. 78 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 79 | 80 | //Flags used by the linker during Release with Debug Info builds. 81 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 82 | 83 | //Value Computed by CMake 84 | CMAKE_PROJECT_NAME:STATIC=DTREE 85 | 86 | //Flags used by the linker during the creation of dll's. 87 | CMAKE_SHARED_LINKER_FLAGS:STRING= 88 | 89 | //Flags used by the linker during debug builds. 90 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 91 | 92 | //Flags used by the linker during release minsize builds. 93 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 94 | 95 | //Flags used by the linker during release builds. 96 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 97 | 98 | //Flags used by the linker during Release with Debug Info builds. 99 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 100 | 101 | //If set, runtime paths are not added when installing shared libraries, 102 | // but are added when building. 103 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 104 | 105 | //If set, runtime paths are not added when using shared libraries. 106 | CMAKE_SKIP_RPATH:BOOL=NO 107 | 108 | //Flags used by the linker during the creation of static libraries. 109 | CMAKE_STATIC_LINKER_FLAGS:STRING= 110 | 111 | //Flags used by the linker during debug builds. 112 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 113 | 114 | //Flags used by the linker during release minsize builds. 115 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 116 | 117 | //Flags used by the linker during release builds. 118 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 119 | 120 | //Flags used by the linker during Release with Debug Info builds. 121 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 122 | 123 | //If this value is on, makefiles will be generated without the 124 | // .SILENT directive, and all commands will be echoed to the console 125 | // during the make. This is useful for debugging only. With Visual 126 | // Studio IDE projects all commands are done without /nologo. 127 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 128 | 129 | //Value Computed by CMake 130 | DTREE_BINARY_DIR:STATIC=/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous 131 | 132 | //Value Computed by CMake 133 | DTREE_SOURCE_DIR:STATIC=/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous 134 | 135 | //Single output directory for building all executables. 136 | EXECUTABLE_OUTPUT_PATH:PATH= 137 | 138 | //Single output directory for building all libraries. 139 | LIBRARY_OUTPUT_PATH:PATH= 140 | 141 | 142 | ######################## 143 | # INTERNAL cache entries 144 | ######################## 145 | 146 | //This is the directory where this CMakeCache.txt was created 147 | CMAKE_CACHEFILE_DIR:INTERNAL=/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous 148 | //Major version of cmake used to create the current loaded cache 149 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 150 | //Minor version of cmake used to create the current loaded cache 151 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 152 | //Patch version of cmake used to create the current loaded cache 153 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 154 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 155 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 156 | //Path to CMake executable. 157 | CMAKE_COMMAND:INTERNAL=/usr/bin/cmake 158 | //Path to cpack program executable. 159 | CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack 160 | //Path to ctest program executable. 161 | CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest 162 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 163 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 164 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 165 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 166 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 167 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 168 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 169 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 170 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 171 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 172 | //Path to cache edit program executable. 173 | CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/cmake-gui 174 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 175 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 176 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 177 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 178 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 179 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 180 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 181 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 182 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 183 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 184 | //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS 185 | CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 186 | //Name of external makefile project generator. 187 | CMAKE_EXTRA_GENERATOR:INTERNAL= 188 | //Name of generator. 189 | CMAKE_GENERATOR:INTERNAL=Unix Makefiles 190 | //Name of generator platform. 191 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 192 | //Name of generator toolset. 193 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 194 | //Source directory with the top level CMakeLists.txt file for this 195 | // project 196 | CMAKE_HOME_DIRECTORY:INTERNAL=/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous 197 | //Install .so files without execute permission. 198 | CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 199 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 200 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 201 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 202 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 203 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 204 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 205 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 206 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 207 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 208 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 209 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 210 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 211 | //number of local generators 212 | CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 213 | //Path to CMake installation. 214 | CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5 215 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 216 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 217 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 218 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 219 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 220 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 221 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 222 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 223 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 224 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 225 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 226 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 227 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 228 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 229 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 230 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 231 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 232 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 233 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 234 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 235 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 236 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 237 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 238 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 239 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 240 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 241 | 242 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "5.4.0") 5 | set(CMAKE_CXX_COMPILER_WRAPPER "") 6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") 7 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 8 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") 9 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 10 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 11 | 12 | set(CMAKE_CXX_PLATFORM_ID "Linux") 13 | set(CMAKE_CXX_SIMULATE_ID "") 14 | set(CMAKE_CXX_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCXX 1) 20 | set(CMAKE_CXX_COMPILER_LOADED 1) 21 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 22 | set(CMAKE_CXX_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) 38 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 40 | 41 | # Save compiler ABI information. 42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 43 | set(CMAKE_CXX_COMPILER_ABI "ELF") 44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 45 | 46 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 48 | endif() 49 | 50 | if(CMAKE_CXX_COMPILER_ABI) 51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 52 | endif() 53 | 54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 55 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 56 | endif() 57 | 58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 61 | endif() 62 | 63 | 64 | 65 | 66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") 67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 69 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/C++ source Code/Continuous/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-39-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-39-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-39-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-39-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp: -------------------------------------------------------------------------------- 1 | /* This source file must have a .cpp extension so that all C++ compilers 2 | recognize the extension without flags. Borland does not know .cxx for 3 | example. */ 4 | #ifndef __cplusplus 5 | # error "A C compiler has been selected for C++." 6 | #endif 7 | 8 | 9 | /* Version number components: V=Version, R=Revision, P=Patch 10 | Version date components: YYYY=Year, MM=Month, DD=Day */ 11 | 12 | #if defined(__COMO__) 13 | # define COMPILER_ID "Comeau" 14 | /* __COMO_VERSION__ = VRR */ 15 | # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) 16 | # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) 17 | 18 | #elif defined(__INTEL_COMPILER) || defined(__ICC) 19 | # define COMPILER_ID "Intel" 20 | # if defined(_MSC_VER) 21 | # define SIMULATE_ID "MSVC" 22 | # endif 23 | /* __INTEL_COMPILER = VRP */ 24 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 25 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 26 | # if defined(__INTEL_COMPILER_UPDATE) 27 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 28 | # else 29 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 30 | # endif 31 | # if defined(__INTEL_COMPILER_BUILD_DATE) 32 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 33 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 34 | # endif 35 | # if defined(_MSC_VER) 36 | /* _MSC_VER = VVRR */ 37 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 38 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 39 | # endif 40 | 41 | #elif defined(__PATHCC__) 42 | # define COMPILER_ID "PathScale" 43 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 44 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 45 | # if defined(__PATHCC_PATCHLEVEL__) 46 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 47 | # endif 48 | 49 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 50 | # define COMPILER_ID "Embarcadero" 51 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 52 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 53 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 54 | 55 | #elif defined(__BORLANDC__) 56 | # define COMPILER_ID "Borland" 57 | /* __BORLANDC__ = 0xVRR */ 58 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 59 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 60 | 61 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 62 | # define COMPILER_ID "Watcom" 63 | /* __WATCOMC__ = VVRR */ 64 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 65 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 66 | # if (__WATCOMC__ % 10) > 0 67 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 68 | # endif 69 | 70 | #elif defined(__WATCOMC__) 71 | # define COMPILER_ID "OpenWatcom" 72 | /* __WATCOMC__ = VVRP + 1100 */ 73 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 74 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 75 | # if (__WATCOMC__ % 10) > 0 76 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 77 | # endif 78 | 79 | #elif defined(__SUNPRO_CC) 80 | # define COMPILER_ID "SunPro" 81 | # if __SUNPRO_CC >= 0x5100 82 | /* __SUNPRO_CC = 0xVRRP */ 83 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) 84 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) 85 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 86 | # else 87 | /* __SUNPRO_CC = 0xVRP */ 88 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) 89 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) 90 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 91 | # endif 92 | 93 | #elif defined(__HP_aCC) 94 | # define COMPILER_ID "HP" 95 | /* __HP_aCC = VVRRPP */ 96 | # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) 97 | # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) 98 | # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) 99 | 100 | #elif defined(__DECCXX) 101 | # define COMPILER_ID "Compaq" 102 | /* __DECCXX_VER = VVRRTPPPP */ 103 | # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) 104 | # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) 105 | # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) 106 | 107 | #elif defined(__IBMCPP__) && defined(__COMPILER_VER__) 108 | # define COMPILER_ID "zOS" 109 | /* __IBMCPP__ = VRP */ 110 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 111 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 112 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 113 | 114 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 115 | # define COMPILER_ID "XL" 116 | /* __IBMCPP__ = VRP */ 117 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 118 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 119 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 120 | 121 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 122 | # define COMPILER_ID "VisualAge" 123 | /* __IBMCPP__ = VRP */ 124 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 125 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 126 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 127 | 128 | #elif defined(__PGI) 129 | # define COMPILER_ID "PGI" 130 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 131 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 132 | # if defined(__PGIC_PATCHLEVEL__) 133 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 134 | # endif 135 | 136 | #elif defined(_CRAYC) 137 | # define COMPILER_ID "Cray" 138 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 139 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 140 | 141 | #elif defined(__TI_COMPILER_VERSION__) 142 | # define COMPILER_ID "TI" 143 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 144 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 145 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 146 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 147 | 148 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 149 | # define COMPILER_ID "Fujitsu" 150 | 151 | #elif defined(__SCO_VERSION__) 152 | # define COMPILER_ID "SCO" 153 | 154 | #elif defined(__clang__) && defined(__apple_build_version__) 155 | # define COMPILER_ID "AppleClang" 156 | # if defined(_MSC_VER) 157 | # define SIMULATE_ID "MSVC" 158 | # endif 159 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 160 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 161 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 162 | # if defined(_MSC_VER) 163 | /* _MSC_VER = VVRR */ 164 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 165 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 166 | # endif 167 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 168 | 169 | #elif defined(__clang__) 170 | # define COMPILER_ID "Clang" 171 | # if defined(_MSC_VER) 172 | # define SIMULATE_ID "MSVC" 173 | # endif 174 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 175 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 176 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 177 | # if defined(_MSC_VER) 178 | /* _MSC_VER = VVRR */ 179 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 180 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 181 | # endif 182 | 183 | #elif defined(__GNUC__) 184 | # define COMPILER_ID "GNU" 185 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 186 | # if defined(__GNUC_MINOR__) 187 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 188 | # endif 189 | # if defined(__GNUC_PATCHLEVEL__) 190 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 191 | # endif 192 | 193 | #elif defined(_MSC_VER) 194 | # define COMPILER_ID "MSVC" 195 | /* _MSC_VER = VVRR */ 196 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 197 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 198 | # if defined(_MSC_FULL_VER) 199 | # if _MSC_VER >= 1400 200 | /* _MSC_FULL_VER = VVRRPPPPP */ 201 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 202 | # else 203 | /* _MSC_FULL_VER = VVRRPPPP */ 204 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 205 | # endif 206 | # endif 207 | # if defined(_MSC_BUILD) 208 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 209 | # endif 210 | 211 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 212 | # define COMPILER_ID "ADSP" 213 | #if defined(__VISUALDSPVERSION__) 214 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 215 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 216 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 217 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 218 | #endif 219 | 220 | #elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) 221 | # define COMPILER_ID "IAR" 222 | 223 | #elif defined(__ARMCC_VERSION) 224 | # define COMPILER_ID "ARMCC" 225 | #if __ARMCC_VERSION >= 1000000 226 | /* __ARMCC_VERSION = VRRPPPP */ 227 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 228 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 229 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 230 | #else 231 | /* __ARMCC_VERSION = VRPPPP */ 232 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 233 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 234 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 235 | #endif 236 | 237 | 238 | #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) 239 | # define COMPILER_ID "MIPSpro" 240 | # if defined(_SGI_COMPILER_VERSION) 241 | /* _SGI_COMPILER_VERSION = VRP */ 242 | # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) 243 | # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) 244 | # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) 245 | # else 246 | /* _COMPILER_VERSION = VRP */ 247 | # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) 248 | # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) 249 | # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) 250 | # endif 251 | 252 | 253 | /* These compilers are either not known or too old to define an 254 | identification macro. Try to identify the platform and guess that 255 | it is the native compiler. */ 256 | #elif defined(__sgi) 257 | # define COMPILER_ID "MIPSpro" 258 | 259 | #elif defined(__hpux) || defined(__hpua) 260 | # define COMPILER_ID "HP" 261 | 262 | #else /* unknown compiler */ 263 | # define COMPILER_ID "" 264 | #endif 265 | 266 | /* Construct the string literal in pieces to prevent the source from 267 | getting matched. Store it in a pointer rather than an array 268 | because some compilers will just produce instructions to fill the 269 | array rather than assigning a pointer to a static array. */ 270 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 271 | #ifdef SIMULATE_ID 272 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 273 | #endif 274 | 275 | #ifdef __QNXNTO__ 276 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 277 | #endif 278 | 279 | #if defined(__CRAYXE) || defined(__CRAYXC) 280 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 281 | #endif 282 | 283 | #define STRINGIFY_HELPER(X) #X 284 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 285 | 286 | /* Identify known platforms by name. */ 287 | #if defined(__linux) || defined(__linux__) || defined(linux) 288 | # define PLATFORM_ID "Linux" 289 | 290 | #elif defined(__CYGWIN__) 291 | # define PLATFORM_ID "Cygwin" 292 | 293 | #elif defined(__MINGW32__) 294 | # define PLATFORM_ID "MinGW" 295 | 296 | #elif defined(__APPLE__) 297 | # define PLATFORM_ID "Darwin" 298 | 299 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 300 | # define PLATFORM_ID "Windows" 301 | 302 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 303 | # define PLATFORM_ID "FreeBSD" 304 | 305 | #elif defined(__NetBSD__) || defined(__NetBSD) 306 | # define PLATFORM_ID "NetBSD" 307 | 308 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 309 | # define PLATFORM_ID "OpenBSD" 310 | 311 | #elif defined(__sun) || defined(sun) 312 | # define PLATFORM_ID "SunOS" 313 | 314 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 315 | # define PLATFORM_ID "AIX" 316 | 317 | #elif defined(__sgi) || defined(__sgi__) || defined(_SGI) 318 | # define PLATFORM_ID "IRIX" 319 | 320 | #elif defined(__hpux) || defined(__hpux__) 321 | # define PLATFORM_ID "HP-UX" 322 | 323 | #elif defined(__HAIKU__) 324 | # define PLATFORM_ID "Haiku" 325 | 326 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 327 | # define PLATFORM_ID "BeOS" 328 | 329 | #elif defined(__QNX__) || defined(__QNXNTO__) 330 | # define PLATFORM_ID "QNX" 331 | 332 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 333 | # define PLATFORM_ID "Tru64" 334 | 335 | #elif defined(__riscos) || defined(__riscos__) 336 | # define PLATFORM_ID "RISCos" 337 | 338 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 339 | # define PLATFORM_ID "SINIX" 340 | 341 | #elif defined(__UNIX_SV__) 342 | # define PLATFORM_ID "UNIX_SV" 343 | 344 | #elif defined(__bsdos__) 345 | # define PLATFORM_ID "BSDOS" 346 | 347 | #elif defined(_MPRAS) || defined(MPRAS) 348 | # define PLATFORM_ID "MP-RAS" 349 | 350 | #elif defined(__osf) || defined(__osf__) 351 | # define PLATFORM_ID "OSF1" 352 | 353 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 354 | # define PLATFORM_ID "SCO_SV" 355 | 356 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 357 | # define PLATFORM_ID "ULTRIX" 358 | 359 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 360 | # define PLATFORM_ID "Xenix" 361 | 362 | #elif defined(__WATCOMC__) 363 | # if defined(__LINUX__) 364 | # define PLATFORM_ID "Linux" 365 | 366 | # elif defined(__DOS__) 367 | # define PLATFORM_ID "DOS" 368 | 369 | # elif defined(__OS2__) 370 | # define PLATFORM_ID "OS2" 371 | 372 | # elif defined(__WINDOWS__) 373 | # define PLATFORM_ID "Windows3x" 374 | 375 | # else /* unknown platform */ 376 | # define PLATFORM_ID "" 377 | # endif 378 | 379 | #else /* unknown platform */ 380 | # define PLATFORM_ID "" 381 | 382 | #endif 383 | 384 | /* For windows compilers MSVC and Intel we can determine 385 | the architecture of the compiler being used. This is because 386 | the compilers do not have flags that can change the architecture, 387 | but rather depend on which compiler is being used 388 | */ 389 | #if defined(_WIN32) && defined(_MSC_VER) 390 | # if defined(_M_IA64) 391 | # define ARCHITECTURE_ID "IA64" 392 | 393 | # elif defined(_M_X64) || defined(_M_AMD64) 394 | # define ARCHITECTURE_ID "x64" 395 | 396 | # elif defined(_M_IX86) 397 | # define ARCHITECTURE_ID "X86" 398 | 399 | # elif defined(_M_ARM) 400 | # if _M_ARM == 4 401 | # define ARCHITECTURE_ID "ARMV4I" 402 | # elif _M_ARM == 5 403 | # define ARCHITECTURE_ID "ARMV5I" 404 | # else 405 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 406 | # endif 407 | 408 | # elif defined(_M_MIPS) 409 | # define ARCHITECTURE_ID "MIPS" 410 | 411 | # elif defined(_M_SH) 412 | # define ARCHITECTURE_ID "SHx" 413 | 414 | # else /* unknown architecture */ 415 | # define ARCHITECTURE_ID "" 416 | # endif 417 | 418 | #elif defined(__WATCOMC__) 419 | # if defined(_M_I86) 420 | # define ARCHITECTURE_ID "I86" 421 | 422 | # elif defined(_M_IX86) 423 | # define ARCHITECTURE_ID "X86" 424 | 425 | # else /* unknown architecture */ 426 | # define ARCHITECTURE_ID "" 427 | # endif 428 | 429 | #else 430 | # define ARCHITECTURE_ID "" 431 | #endif 432 | 433 | /* Convert integer to decimal digit literals. */ 434 | #define DEC(n) \ 435 | ('0' + (((n) / 10000000)%10)), \ 436 | ('0' + (((n) / 1000000)%10)), \ 437 | ('0' + (((n) / 100000)%10)), \ 438 | ('0' + (((n) / 10000)%10)), \ 439 | ('0' + (((n) / 1000)%10)), \ 440 | ('0' + (((n) / 100)%10)), \ 441 | ('0' + (((n) / 10)%10)), \ 442 | ('0' + ((n) % 10)) 443 | 444 | /* Convert integer to hex digit literals. */ 445 | #define HEX(n) \ 446 | ('0' + ((n)>>28 & 0xF)), \ 447 | ('0' + ((n)>>24 & 0xF)), \ 448 | ('0' + ((n)>>20 & 0xF)), \ 449 | ('0' + ((n)>>16 & 0xF)), \ 450 | ('0' + ((n)>>12 & 0xF)), \ 451 | ('0' + ((n)>>8 & 0xF)), \ 452 | ('0' + ((n)>>4 & 0xF)), \ 453 | ('0' + ((n) & 0xF)) 454 | 455 | /* Construct a string literal encoding the version number components. */ 456 | #ifdef COMPILER_VERSION_MAJOR 457 | char const info_version[] = { 458 | 'I', 'N', 'F', 'O', ':', 459 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 460 | COMPILER_VERSION_MAJOR, 461 | # ifdef COMPILER_VERSION_MINOR 462 | '.', COMPILER_VERSION_MINOR, 463 | # ifdef COMPILER_VERSION_PATCH 464 | '.', COMPILER_VERSION_PATCH, 465 | # ifdef COMPILER_VERSION_TWEAK 466 | '.', COMPILER_VERSION_TWEAK, 467 | # endif 468 | # endif 469 | # endif 470 | ']','\0'}; 471 | #endif 472 | 473 | /* Construct a string literal encoding the version number components. */ 474 | #ifdef SIMULATE_VERSION_MAJOR 475 | char const info_simulate_version[] = { 476 | 'I', 'N', 'F', 'O', ':', 477 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 478 | SIMULATE_VERSION_MAJOR, 479 | # ifdef SIMULATE_VERSION_MINOR 480 | '.', SIMULATE_VERSION_MINOR, 481 | # ifdef SIMULATE_VERSION_PATCH 482 | '.', SIMULATE_VERSION_PATCH, 483 | # ifdef SIMULATE_VERSION_TWEAK 484 | '.', SIMULATE_VERSION_TWEAK, 485 | # endif 486 | # endif 487 | # endif 488 | ']','\0'}; 489 | #endif 490 | 491 | /* Construct the string literal in pieces to prevent the source from 492 | getting matched. Store it in a pointer rather than an array 493 | because some compilers will just produce instructions to fill the 494 | array rather than assigning a pointer to a static array. */ 495 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 496 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 497 | 498 | 499 | 500 | 501 | const char* info_language_dialect_default = "INFO" ":" "dialect_default[" 502 | #if __cplusplus >= 201402L 503 | "14" 504 | #elif __cplusplus >= 201103L 505 | "11" 506 | #else 507 | "98" 508 | #endif 509 | "]"; 510 | 511 | /*--------------------------------------------------------------------------*/ 512 | 513 | int main(int argc, char* argv[]) 514 | { 515 | int require = 0; 516 | require += info_compiler[argc]; 517 | require += info_platform[argc]; 518 | #ifdef COMPILER_VERSION_MAJOR 519 | require += info_version[argc]; 520 | #endif 521 | #ifdef SIMULATE_ID 522 | require += info_simulate[argc]; 523 | #endif 524 | #ifdef SIMULATE_VERSION_MAJOR 525 | require += info_simulate_version[argc]; 526 | #endif 527 | #if defined(__CRAYXE) || defined(__CRAYXC) 528 | require += info_cray[argc]; 529 | #endif 530 | require += info_language_dialect_default[argc]; 531 | (void)argv; 532 | return require; 533 | } 534 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/CMakeOutput.log: -------------------------------------------------------------------------------- 1 | The system is: Linux - 4.15.0-39-generic - x86_64 2 | Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. 3 | Compiler: /usr/bin/c++ 4 | Build flags: 5 | Id flags: 6 | 7 | The output was: 8 | 0 9 | 10 | 11 | Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" 12 | 13 | The CXX compiler identification is GNU, found in "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/3.5.1/CompilerIdCXX/a.out" 14 | 15 | Determining if the CXX compiler works passed with the following output: 16 | Change Dir: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp 17 | 18 | Run Build Command:"/usr/bin/make" "cmTC_86b60/fast" 19 | /usr/bin/make -f CMakeFiles/cmTC_86b60.dir/build.make CMakeFiles/cmTC_86b60.dir/build 20 | make[1]: Entering directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 21 | Building CXX object CMakeFiles/cmTC_86b60.dir/testCXXCompiler.cxx.o 22 | /usr/bin/c++ -o CMakeFiles/cmTC_86b60.dir/testCXXCompiler.cxx.o -c "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp/testCXXCompiler.cxx" 23 | Linking CXX executable cmTC_86b60 24 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_86b60.dir/link.txt --verbose=1 25 | /usr/bin/c++ CMakeFiles/cmTC_86b60.dir/testCXXCompiler.cxx.o -o cmTC_86b60 -rdynamic 26 | make[1]: Leaving directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 27 | 28 | 29 | Detecting CXX compiler ABI info compiled with the following output: 30 | Change Dir: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp 31 | 32 | Run Build Command:"/usr/bin/make" "cmTC_232c3/fast" 33 | /usr/bin/make -f CMakeFiles/cmTC_232c3.dir/build.make CMakeFiles/cmTC_232c3.dir/build 34 | make[1]: Entering directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 35 | Building CXX object CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o 36 | /usr/bin/c++ -o CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp 37 | Linking CXX executable cmTC_232c3 38 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_232c3.dir/link.txt --verbose=1 39 | /usr/bin/c++ -v CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_232c3 -rdynamic 40 | Using built-in specs. 41 | COLLECT_GCC=/usr/bin/c++ 42 | COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper 43 | Target: x86_64-linux-gnu 44 | Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu 45 | Thread model: posix 46 | gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 47 | COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ 48 | LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ 49 | COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_232c3' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64' 50 | /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccaMCKhh.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_232c3 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o 51 | make[1]: Leaving directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 52 | 53 | 54 | Parsed CXX implicit link information from above output: 55 | link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] 56 | ignore line: [Change Dir: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp] 57 | ignore line: [] 58 | ignore line: [Run Build Command:"/usr/bin/make" "cmTC_232c3/fast"] 59 | ignore line: [/usr/bin/make -f CMakeFiles/cmTC_232c3.dir/build.make CMakeFiles/cmTC_232c3.dir/build] 60 | ignore line: [make[1]: Entering directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp'] 61 | ignore line: [Building CXX object CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o] 62 | ignore line: [/usr/bin/c++ -o CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp] 63 | ignore line: [Linking CXX executable cmTC_232c3] 64 | ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_232c3.dir/link.txt --verbose=1] 65 | ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_232c3 -rdynamic ] 66 | ignore line: [Using built-in specs.] 67 | ignore line: [COLLECT_GCC=/usr/bin/c++] 68 | ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] 69 | ignore line: [Target: x86_64-linux-gnu] 70 | ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] 71 | ignore line: [Thread model: posix] 72 | ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ] 73 | ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] 74 | ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] 75 | ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_232c3' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] 76 | link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccaMCKhh.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_232c3 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] 77 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore 78 | arg [-plugin] ==> ignore 79 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore 80 | arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore 81 | arg [-plugin-opt=-fresolution=/tmp/ccaMCKhh.res] ==> ignore 82 | arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore 83 | arg [-plugin-opt=-pass-through=-lgcc] ==> ignore 84 | arg [-plugin-opt=-pass-through=-lc] ==> ignore 85 | arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore 86 | arg [-plugin-opt=-pass-through=-lgcc] ==> ignore 87 | arg [--sysroot=/] ==> ignore 88 | arg [--build-id] ==> ignore 89 | arg [--eh-frame-hdr] ==> ignore 90 | arg [-m] ==> ignore 91 | arg [elf_x86_64] ==> ignore 92 | arg [--hash-style=gnu] ==> ignore 93 | arg [--as-needed] ==> ignore 94 | arg [-export-dynamic] ==> ignore 95 | arg [-dynamic-linker] ==> ignore 96 | arg [/lib64/ld-linux-x86-64.so.2] ==> ignore 97 | arg [-zrelro] ==> ignore 98 | arg [-o] ==> ignore 99 | arg [cmTC_232c3] ==> ignore 100 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore 101 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore 102 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore 103 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] 104 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] 105 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] 106 | arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] 107 | arg [-L/lib/../lib] ==> dir [/lib/../lib] 108 | arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] 109 | arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] 110 | arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] 111 | arg [CMakeFiles/cmTC_232c3.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore 112 | arg [-lstdc++] ==> lib [stdc++] 113 | arg [-lm] ==> lib [m] 114 | arg [-lgcc_s] ==> lib [gcc_s] 115 | arg [-lgcc] ==> lib [gcc] 116 | arg [-lc] ==> lib [c] 117 | arg [-lgcc_s] ==> lib [gcc_s] 118 | arg [-lgcc] ==> lib [gcc] 119 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore 120 | arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore 121 | remove lib [gcc_s] 122 | remove lib [gcc] 123 | remove lib [gcc_s] 124 | remove lib [gcc] 125 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] 126 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] 127 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] 128 | collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] 129 | collapse library dir [/lib/../lib] ==> [/lib] 130 | collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] 131 | collapse library dir [/usr/lib/../lib] ==> [/usr/lib] 132 | collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] 133 | implicit libs: [stdc++;m;c] 134 | implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] 135 | implicit fwks: [] 136 | 137 | 138 | 139 | 140 | Detecting CXX [-std=c++14] compiler features compiled with the following output: 141 | Change Dir: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp 142 | 143 | Run Build Command:"/usr/bin/make" "cmTC_ff3af/fast" 144 | /usr/bin/make -f CMakeFiles/cmTC_ff3af.dir/build.make CMakeFiles/cmTC_ff3af.dir/build 145 | make[1]: Entering directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 146 | Building CXX object CMakeFiles/cmTC_ff3af.dir/feature_tests.cxx.o 147 | /usr/bin/c++ -std=c++14 -o CMakeFiles/cmTC_ff3af.dir/feature_tests.cxx.o -c "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/feature_tests.cxx" 148 | Linking CXX executable cmTC_ff3af 149 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ff3af.dir/link.txt --verbose=1 150 | /usr/bin/c++ CMakeFiles/cmTC_ff3af.dir/feature_tests.cxx.o -o cmTC_ff3af -rdynamic 151 | make[1]: Leaving directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 152 | 153 | 154 | Feature record: CXX_FEATURE:1cxx_aggregate_default_initializers 155 | Feature record: CXX_FEATURE:1cxx_alias_templates 156 | Feature record: CXX_FEATURE:1cxx_alignas 157 | Feature record: CXX_FEATURE:1cxx_alignof 158 | Feature record: CXX_FEATURE:1cxx_attributes 159 | Feature record: CXX_FEATURE:1cxx_attribute_deprecated 160 | Feature record: CXX_FEATURE:1cxx_auto_type 161 | Feature record: CXX_FEATURE:1cxx_binary_literals 162 | Feature record: CXX_FEATURE:1cxx_constexpr 163 | Feature record: CXX_FEATURE:1cxx_contextual_conversions 164 | Feature record: CXX_FEATURE:1cxx_decltype 165 | Feature record: CXX_FEATURE:1cxx_decltype_auto 166 | Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types 167 | Feature record: CXX_FEATURE:1cxx_default_function_template_args 168 | Feature record: CXX_FEATURE:1cxx_defaulted_functions 169 | Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers 170 | Feature record: CXX_FEATURE:1cxx_delegating_constructors 171 | Feature record: CXX_FEATURE:1cxx_deleted_functions 172 | Feature record: CXX_FEATURE:1cxx_digit_separators 173 | Feature record: CXX_FEATURE:1cxx_enum_forward_declarations 174 | Feature record: CXX_FEATURE:1cxx_explicit_conversions 175 | Feature record: CXX_FEATURE:1cxx_extended_friend_declarations 176 | Feature record: CXX_FEATURE:1cxx_extern_templates 177 | Feature record: CXX_FEATURE:1cxx_final 178 | Feature record: CXX_FEATURE:1cxx_func_identifier 179 | Feature record: CXX_FEATURE:1cxx_generalized_initializers 180 | Feature record: CXX_FEATURE:1cxx_generic_lambdas 181 | Feature record: CXX_FEATURE:1cxx_inheriting_constructors 182 | Feature record: CXX_FEATURE:1cxx_inline_namespaces 183 | Feature record: CXX_FEATURE:1cxx_lambdas 184 | Feature record: CXX_FEATURE:1cxx_lambda_init_captures 185 | Feature record: CXX_FEATURE:1cxx_local_type_template_args 186 | Feature record: CXX_FEATURE:1cxx_long_long_type 187 | Feature record: CXX_FEATURE:1cxx_noexcept 188 | Feature record: CXX_FEATURE:1cxx_nonstatic_member_init 189 | Feature record: CXX_FEATURE:1cxx_nullptr 190 | Feature record: CXX_FEATURE:1cxx_override 191 | Feature record: CXX_FEATURE:1cxx_range_for 192 | Feature record: CXX_FEATURE:1cxx_raw_string_literals 193 | Feature record: CXX_FEATURE:1cxx_reference_qualified_functions 194 | Feature record: CXX_FEATURE:1cxx_relaxed_constexpr 195 | Feature record: CXX_FEATURE:1cxx_return_type_deduction 196 | Feature record: CXX_FEATURE:1cxx_right_angle_brackets 197 | Feature record: CXX_FEATURE:1cxx_rvalue_references 198 | Feature record: CXX_FEATURE:1cxx_sizeof_member 199 | Feature record: CXX_FEATURE:1cxx_static_assert 200 | Feature record: CXX_FEATURE:1cxx_strong_enums 201 | Feature record: CXX_FEATURE:1cxx_template_template_parameters 202 | Feature record: CXX_FEATURE:1cxx_thread_local 203 | Feature record: CXX_FEATURE:1cxx_trailing_return_types 204 | Feature record: CXX_FEATURE:1cxx_unicode_literals 205 | Feature record: CXX_FEATURE:1cxx_uniform_initialization 206 | Feature record: CXX_FEATURE:1cxx_unrestricted_unions 207 | Feature record: CXX_FEATURE:1cxx_user_literals 208 | Feature record: CXX_FEATURE:1cxx_variable_templates 209 | Feature record: CXX_FEATURE:1cxx_variadic_macros 210 | Feature record: CXX_FEATURE:1cxx_variadic_templates 211 | 212 | 213 | Detecting CXX [-std=c++11] compiler features compiled with the following output: 214 | Change Dir: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp 215 | 216 | Run Build Command:"/usr/bin/make" "cmTC_fbb3f/fast" 217 | /usr/bin/make -f CMakeFiles/cmTC_fbb3f.dir/build.make CMakeFiles/cmTC_fbb3f.dir/build 218 | make[1]: Entering directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 219 | Building CXX object CMakeFiles/cmTC_fbb3f.dir/feature_tests.cxx.o 220 | /usr/bin/c++ -std=c++11 -o CMakeFiles/cmTC_fbb3f.dir/feature_tests.cxx.o -c "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/feature_tests.cxx" 221 | Linking CXX executable cmTC_fbb3f 222 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fbb3f.dir/link.txt --verbose=1 223 | /usr/bin/c++ CMakeFiles/cmTC_fbb3f.dir/feature_tests.cxx.o -o cmTC_fbb3f -rdynamic 224 | make[1]: Leaving directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 225 | 226 | 227 | Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers 228 | Feature record: CXX_FEATURE:1cxx_alias_templates 229 | Feature record: CXX_FEATURE:1cxx_alignas 230 | Feature record: CXX_FEATURE:1cxx_alignof 231 | Feature record: CXX_FEATURE:1cxx_attributes 232 | Feature record: CXX_FEATURE:0cxx_attribute_deprecated 233 | Feature record: CXX_FEATURE:1cxx_auto_type 234 | Feature record: CXX_FEATURE:0cxx_binary_literals 235 | Feature record: CXX_FEATURE:1cxx_constexpr 236 | Feature record: CXX_FEATURE:0cxx_contextual_conversions 237 | Feature record: CXX_FEATURE:1cxx_decltype 238 | Feature record: CXX_FEATURE:0cxx_decltype_auto 239 | Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types 240 | Feature record: CXX_FEATURE:1cxx_default_function_template_args 241 | Feature record: CXX_FEATURE:1cxx_defaulted_functions 242 | Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers 243 | Feature record: CXX_FEATURE:1cxx_delegating_constructors 244 | Feature record: CXX_FEATURE:1cxx_deleted_functions 245 | Feature record: CXX_FEATURE:0cxx_digit_separators 246 | Feature record: CXX_FEATURE:1cxx_enum_forward_declarations 247 | Feature record: CXX_FEATURE:1cxx_explicit_conversions 248 | Feature record: CXX_FEATURE:1cxx_extended_friend_declarations 249 | Feature record: CXX_FEATURE:1cxx_extern_templates 250 | Feature record: CXX_FEATURE:1cxx_final 251 | Feature record: CXX_FEATURE:1cxx_func_identifier 252 | Feature record: CXX_FEATURE:1cxx_generalized_initializers 253 | Feature record: CXX_FEATURE:0cxx_generic_lambdas 254 | Feature record: CXX_FEATURE:1cxx_inheriting_constructors 255 | Feature record: CXX_FEATURE:1cxx_inline_namespaces 256 | Feature record: CXX_FEATURE:1cxx_lambdas 257 | Feature record: CXX_FEATURE:0cxx_lambda_init_captures 258 | Feature record: CXX_FEATURE:1cxx_local_type_template_args 259 | Feature record: CXX_FEATURE:1cxx_long_long_type 260 | Feature record: CXX_FEATURE:1cxx_noexcept 261 | Feature record: CXX_FEATURE:1cxx_nonstatic_member_init 262 | Feature record: CXX_FEATURE:1cxx_nullptr 263 | Feature record: CXX_FEATURE:1cxx_override 264 | Feature record: CXX_FEATURE:1cxx_range_for 265 | Feature record: CXX_FEATURE:1cxx_raw_string_literals 266 | Feature record: CXX_FEATURE:1cxx_reference_qualified_functions 267 | Feature record: CXX_FEATURE:0cxx_relaxed_constexpr 268 | Feature record: CXX_FEATURE:0cxx_return_type_deduction 269 | Feature record: CXX_FEATURE:1cxx_right_angle_brackets 270 | Feature record: CXX_FEATURE:1cxx_rvalue_references 271 | Feature record: CXX_FEATURE:1cxx_sizeof_member 272 | Feature record: CXX_FEATURE:1cxx_static_assert 273 | Feature record: CXX_FEATURE:1cxx_strong_enums 274 | Feature record: CXX_FEATURE:1cxx_template_template_parameters 275 | Feature record: CXX_FEATURE:1cxx_thread_local 276 | Feature record: CXX_FEATURE:1cxx_trailing_return_types 277 | Feature record: CXX_FEATURE:1cxx_unicode_literals 278 | Feature record: CXX_FEATURE:1cxx_uniform_initialization 279 | Feature record: CXX_FEATURE:1cxx_unrestricted_unions 280 | Feature record: CXX_FEATURE:1cxx_user_literals 281 | Feature record: CXX_FEATURE:0cxx_variable_templates 282 | Feature record: CXX_FEATURE:1cxx_variadic_macros 283 | Feature record: CXX_FEATURE:1cxx_variadic_templates 284 | 285 | 286 | Detecting CXX [-std=c++98] compiler features compiled with the following output: 287 | Change Dir: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp 288 | 289 | Run Build Command:"/usr/bin/make" "cmTC_f67a8/fast" 290 | /usr/bin/make -f CMakeFiles/cmTC_f67a8.dir/build.make CMakeFiles/cmTC_f67a8.dir/build 291 | make[1]: Entering directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 292 | Building CXX object CMakeFiles/cmTC_f67a8.dir/feature_tests.cxx.o 293 | /usr/bin/c++ -std=c++98 -o CMakeFiles/cmTC_f67a8.dir/feature_tests.cxx.o -c "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/feature_tests.cxx" 294 | Linking CXX executable cmTC_f67a8 295 | /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f67a8.dir/link.txt --verbose=1 296 | /usr/bin/c++ CMakeFiles/cmTC_f67a8.dir/feature_tests.cxx.o -o cmTC_f67a8 -rdynamic 297 | make[1]: Leaving directory '/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/CMakeTmp' 298 | 299 | 300 | Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers 301 | Feature record: CXX_FEATURE:0cxx_alias_templates 302 | Feature record: CXX_FEATURE:0cxx_alignas 303 | Feature record: CXX_FEATURE:0cxx_alignof 304 | Feature record: CXX_FEATURE:0cxx_attributes 305 | Feature record: CXX_FEATURE:0cxx_attribute_deprecated 306 | Feature record: CXX_FEATURE:0cxx_auto_type 307 | Feature record: CXX_FEATURE:0cxx_binary_literals 308 | Feature record: CXX_FEATURE:0cxx_constexpr 309 | Feature record: CXX_FEATURE:0cxx_contextual_conversions 310 | Feature record: CXX_FEATURE:0cxx_decltype 311 | Feature record: CXX_FEATURE:0cxx_decltype_auto 312 | Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types 313 | Feature record: CXX_FEATURE:0cxx_default_function_template_args 314 | Feature record: CXX_FEATURE:0cxx_defaulted_functions 315 | Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers 316 | Feature record: CXX_FEATURE:0cxx_delegating_constructors 317 | Feature record: CXX_FEATURE:0cxx_deleted_functions 318 | Feature record: CXX_FEATURE:0cxx_digit_separators 319 | Feature record: CXX_FEATURE:0cxx_enum_forward_declarations 320 | Feature record: CXX_FEATURE:0cxx_explicit_conversions 321 | Feature record: CXX_FEATURE:0cxx_extended_friend_declarations 322 | Feature record: CXX_FEATURE:0cxx_extern_templates 323 | Feature record: CXX_FEATURE:0cxx_final 324 | Feature record: CXX_FEATURE:0cxx_func_identifier 325 | Feature record: CXX_FEATURE:0cxx_generalized_initializers 326 | Feature record: CXX_FEATURE:0cxx_generic_lambdas 327 | Feature record: CXX_FEATURE:0cxx_inheriting_constructors 328 | Feature record: CXX_FEATURE:0cxx_inline_namespaces 329 | Feature record: CXX_FEATURE:0cxx_lambdas 330 | Feature record: CXX_FEATURE:0cxx_lambda_init_captures 331 | Feature record: CXX_FEATURE:0cxx_local_type_template_args 332 | Feature record: CXX_FEATURE:0cxx_long_long_type 333 | Feature record: CXX_FEATURE:0cxx_noexcept 334 | Feature record: CXX_FEATURE:0cxx_nonstatic_member_init 335 | Feature record: CXX_FEATURE:0cxx_nullptr 336 | Feature record: CXX_FEATURE:0cxx_override 337 | Feature record: CXX_FEATURE:0cxx_range_for 338 | Feature record: CXX_FEATURE:0cxx_raw_string_literals 339 | Feature record: CXX_FEATURE:0cxx_reference_qualified_functions 340 | Feature record: CXX_FEATURE:0cxx_relaxed_constexpr 341 | Feature record: CXX_FEATURE:0cxx_return_type_deduction 342 | Feature record: CXX_FEATURE:0cxx_right_angle_brackets 343 | Feature record: CXX_FEATURE:0cxx_rvalue_references 344 | Feature record: CXX_FEATURE:0cxx_sizeof_member 345 | Feature record: CXX_FEATURE:0cxx_static_assert 346 | Feature record: CXX_FEATURE:0cxx_strong_enums 347 | Feature record: CXX_FEATURE:1cxx_template_template_parameters 348 | Feature record: CXX_FEATURE:0cxx_thread_local 349 | Feature record: CXX_FEATURE:0cxx_trailing_return_types 350 | Feature record: CXX_FEATURE:0cxx_unicode_literals 351 | Feature record: CXX_FEATURE:0cxx_uniform_initialization 352 | Feature record: CXX_FEATURE:0cxx_unrestricted_unions 353 | Feature record: CXX_FEATURE:0cxx_user_literals 354 | Feature record: CXX_FEATURE:0cxx_variable_templates 355 | Feature record: CXX_FEATURE:0cxx_variadic_macros 356 | Feature record: CXX_FEATURE:0cxx_variadic_templates 357 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CDTree.cpp" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/CDTree.o" 8 | "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/main.cpp" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/main.o" 9 | ) 10 | set(CMAKE_CXX_COMPILER_ID "GNU") 11 | 12 | # The include file search paths: 13 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 14 | "/usr/local/eigen3" 15 | "." 16 | ) 17 | 18 | # Targets to which this target links. 19 | set(CMAKE_TARGET_LINKED_INFO_FILES 20 | ) 21 | 22 | # Fortran module output directory. 23 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 24 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" 50 | 51 | # Include any dependencies generated for this target. 52 | include CMakeFiles/DtreeMain.dir/depend.make 53 | 54 | # Include the progress variables for this target. 55 | include CMakeFiles/DtreeMain.dir/progress.make 56 | 57 | # Include the compile flags for this target's objects. 58 | include CMakeFiles/DtreeMain.dir/flags.make 59 | 60 | CMakeFiles/DtreeMain.dir/main.o: CMakeFiles/DtreeMain.dir/flags.make 61 | CMakeFiles/DtreeMain.dir/main.o: main.cpp 62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/DtreeMain.dir/main.o" 63 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/DtreeMain.dir/main.o -c "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/main.cpp" 64 | 65 | CMakeFiles/DtreeMain.dir/main.i: cmake_force 66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/DtreeMain.dir/main.i" 67 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/main.cpp" > CMakeFiles/DtreeMain.dir/main.i 68 | 69 | CMakeFiles/DtreeMain.dir/main.s: cmake_force 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/DtreeMain.dir/main.s" 71 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/main.cpp" -o CMakeFiles/DtreeMain.dir/main.s 72 | 73 | CMakeFiles/DtreeMain.dir/main.o.requires: 74 | 75 | .PHONY : CMakeFiles/DtreeMain.dir/main.o.requires 76 | 77 | CMakeFiles/DtreeMain.dir/main.o.provides: CMakeFiles/DtreeMain.dir/main.o.requires 78 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/main.o.provides.build 79 | .PHONY : CMakeFiles/DtreeMain.dir/main.o.provides 80 | 81 | CMakeFiles/DtreeMain.dir/main.o.provides.build: CMakeFiles/DtreeMain.dir/main.o 82 | 83 | 84 | CMakeFiles/DtreeMain.dir/CDTree.o: CMakeFiles/DtreeMain.dir/flags.make 85 | CMakeFiles/DtreeMain.dir/CDTree.o: CDTree.cpp 86 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/DtreeMain.dir/CDTree.o" 87 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/DtreeMain.dir/CDTree.o -c "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CDTree.cpp" 88 | 89 | CMakeFiles/DtreeMain.dir/CDTree.i: cmake_force 90 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/DtreeMain.dir/CDTree.i" 91 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CDTree.cpp" > CMakeFiles/DtreeMain.dir/CDTree.i 92 | 93 | CMakeFiles/DtreeMain.dir/CDTree.s: cmake_force 94 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/DtreeMain.dir/CDTree.s" 95 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CDTree.cpp" -o CMakeFiles/DtreeMain.dir/CDTree.s 96 | 97 | CMakeFiles/DtreeMain.dir/CDTree.o.requires: 98 | 99 | .PHONY : CMakeFiles/DtreeMain.dir/CDTree.o.requires 100 | 101 | CMakeFiles/DtreeMain.dir/CDTree.o.provides: CMakeFiles/DtreeMain.dir/CDTree.o.requires 102 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/CDTree.o.provides.build 103 | .PHONY : CMakeFiles/DtreeMain.dir/CDTree.o.provides 104 | 105 | CMakeFiles/DtreeMain.dir/CDTree.o.provides.build: CMakeFiles/DtreeMain.dir/CDTree.o 106 | 107 | 108 | # Object files for target DtreeMain 109 | DtreeMain_OBJECTS = \ 110 | "CMakeFiles/DtreeMain.dir/main.o" \ 111 | "CMakeFiles/DtreeMain.dir/CDTree.o" 112 | 113 | # External object files for target DtreeMain 114 | DtreeMain_EXTERNAL_OBJECTS = 115 | 116 | DtreeMain: CMakeFiles/DtreeMain.dir/main.o 117 | DtreeMain: CMakeFiles/DtreeMain.dir/CDTree.o 118 | DtreeMain: CMakeFiles/DtreeMain.dir/build.make 119 | DtreeMain: CMakeFiles/DtreeMain.dir/link.txt 120 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_3) "Linking CXX executable DtreeMain" 121 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/DtreeMain.dir/link.txt --verbose=$(VERBOSE) 122 | 123 | # Rule to build all files generated by this target. 124 | CMakeFiles/DtreeMain.dir/build: DtreeMain 125 | 126 | .PHONY : CMakeFiles/DtreeMain.dir/build 127 | 128 | CMakeFiles/DtreeMain.dir/requires: CMakeFiles/DtreeMain.dir/main.o.requires 129 | CMakeFiles/DtreeMain.dir/requires: CMakeFiles/DtreeMain.dir/CDTree.o.requires 130 | 131 | .PHONY : CMakeFiles/DtreeMain.dir/requires 132 | 133 | CMakeFiles/DtreeMain.dir/clean: 134 | $(CMAKE_COMMAND) -P CMakeFiles/DtreeMain.dir/cmake_clean.cmake 135 | .PHONY : CMakeFiles/DtreeMain.dir/clean 136 | 137 | CMakeFiles/DtreeMain.dir/depend: 138 | cd "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/DependInfo.cmake" --color=$(COLOR) 139 | .PHONY : CMakeFiles/DtreeMain.dir/depend 140 | 141 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/DtreeMain.dir/main.o" 3 | "CMakeFiles/DtreeMain.dir/CDTree.o" 4 | "DtreeMain.pdb" 5 | "DtreeMain" 6 | ) 7 | 8 | # Per-language clean rules from dependency scanning. 9 | foreach(lang CXX) 10 | include(CMakeFiles/DtreeMain.dir/cmake_clean_${lang}.cmake OPTIONAL) 11 | endforeach() 12 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | CMakeFiles/DtreeMain.dir/CDTree.o 5 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CDTree.cpp 6 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CDTree.hpp 7 | /usr/local/eigen3/Eigen/Cholesky 8 | /usr/local/eigen3/Eigen/Core 9 | /usr/local/eigen3/Eigen/Dense 10 | /usr/local/eigen3/Eigen/Eigenvalues 11 | /usr/local/eigen3/Eigen/Geometry 12 | /usr/local/eigen3/Eigen/Householder 13 | /usr/local/eigen3/Eigen/Jacobi 14 | /usr/local/eigen3/Eigen/LU 15 | /usr/local/eigen3/Eigen/QR 16 | /usr/local/eigen3/Eigen/SVD 17 | /usr/local/eigen3/Eigen/src/Cholesky/LDLT.h 18 | /usr/local/eigen3/Eigen/src/Cholesky/LLT.h 19 | /usr/local/eigen3/Eigen/src/Cholesky/LLT_LAPACKE.h 20 | /usr/local/eigen3/Eigen/src/Core/Array.h 21 | /usr/local/eigen3/Eigen/src/Core/ArrayBase.h 22 | /usr/local/eigen3/Eigen/src/Core/ArrayWrapper.h 23 | /usr/local/eigen3/Eigen/src/Core/Assign.h 24 | /usr/local/eigen3/Eigen/src/Core/AssignEvaluator.h 25 | /usr/local/eigen3/Eigen/src/Core/Assign_MKL.h 26 | /usr/local/eigen3/Eigen/src/Core/BandMatrix.h 27 | /usr/local/eigen3/Eigen/src/Core/Block.h 28 | /usr/local/eigen3/Eigen/src/Core/BooleanRedux.h 29 | /usr/local/eigen3/Eigen/src/Core/CommaInitializer.h 30 | /usr/local/eigen3/Eigen/src/Core/ConditionEstimator.h 31 | /usr/local/eigen3/Eigen/src/Core/CoreEvaluators.h 32 | /usr/local/eigen3/Eigen/src/Core/CoreIterators.h 33 | /usr/local/eigen3/Eigen/src/Core/CwiseBinaryOp.h 34 | /usr/local/eigen3/Eigen/src/Core/CwiseNullaryOp.h 35 | /usr/local/eigen3/Eigen/src/Core/CwiseTernaryOp.h 36 | /usr/local/eigen3/Eigen/src/Core/CwiseUnaryOp.h 37 | /usr/local/eigen3/Eigen/src/Core/CwiseUnaryView.h 38 | /usr/local/eigen3/Eigen/src/Core/DenseBase.h 39 | /usr/local/eigen3/Eigen/src/Core/DenseCoeffsBase.h 40 | /usr/local/eigen3/Eigen/src/Core/DenseStorage.h 41 | /usr/local/eigen3/Eigen/src/Core/Diagonal.h 42 | /usr/local/eigen3/Eigen/src/Core/DiagonalMatrix.h 43 | /usr/local/eigen3/Eigen/src/Core/DiagonalProduct.h 44 | /usr/local/eigen3/Eigen/src/Core/Dot.h 45 | /usr/local/eigen3/Eigen/src/Core/EigenBase.h 46 | /usr/local/eigen3/Eigen/src/Core/Fuzzy.h 47 | /usr/local/eigen3/Eigen/src/Core/GeneralProduct.h 48 | /usr/local/eigen3/Eigen/src/Core/GenericPacketMath.h 49 | /usr/local/eigen3/Eigen/src/Core/GlobalFunctions.h 50 | /usr/local/eigen3/Eigen/src/Core/IO.h 51 | /usr/local/eigen3/Eigen/src/Core/Inverse.h 52 | /usr/local/eigen3/Eigen/src/Core/Map.h 53 | /usr/local/eigen3/Eigen/src/Core/MapBase.h 54 | /usr/local/eigen3/Eigen/src/Core/MathFunctions.h 55 | /usr/local/eigen3/Eigen/src/Core/MathFunctionsImpl.h 56 | /usr/local/eigen3/Eigen/src/Core/Matrix.h 57 | /usr/local/eigen3/Eigen/src/Core/MatrixBase.h 58 | /usr/local/eigen3/Eigen/src/Core/NestByValue.h 59 | /usr/local/eigen3/Eigen/src/Core/NoAlias.h 60 | /usr/local/eigen3/Eigen/src/Core/NumTraits.h 61 | /usr/local/eigen3/Eigen/src/Core/PermutationMatrix.h 62 | /usr/local/eigen3/Eigen/src/Core/PlainObjectBase.h 63 | /usr/local/eigen3/Eigen/src/Core/Product.h 64 | /usr/local/eigen3/Eigen/src/Core/ProductEvaluators.h 65 | /usr/local/eigen3/Eigen/src/Core/Random.h 66 | /usr/local/eigen3/Eigen/src/Core/Redux.h 67 | /usr/local/eigen3/Eigen/src/Core/Ref.h 68 | /usr/local/eigen3/Eigen/src/Core/Replicate.h 69 | /usr/local/eigen3/Eigen/src/Core/ReturnByValue.h 70 | /usr/local/eigen3/Eigen/src/Core/Reverse.h 71 | /usr/local/eigen3/Eigen/src/Core/Select.h 72 | /usr/local/eigen3/Eigen/src/Core/SelfAdjointView.h 73 | /usr/local/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h 74 | /usr/local/eigen3/Eigen/src/Core/Solve.h 75 | /usr/local/eigen3/Eigen/src/Core/SolveTriangular.h 76 | /usr/local/eigen3/Eigen/src/Core/SolverBase.h 77 | /usr/local/eigen3/Eigen/src/Core/StableNorm.h 78 | /usr/local/eigen3/Eigen/src/Core/Stride.h 79 | /usr/local/eigen3/Eigen/src/Core/Swap.h 80 | /usr/local/eigen3/Eigen/src/Core/Transpose.h 81 | /usr/local/eigen3/Eigen/src/Core/Transpositions.h 82 | /usr/local/eigen3/Eigen/src/Core/TriangularMatrix.h 83 | /usr/local/eigen3/Eigen/src/Core/VectorBlock.h 84 | /usr/local/eigen3/Eigen/src/Core/VectorwiseOp.h 85 | /usr/local/eigen3/Eigen/src/Core/Visitor.h 86 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/Complex.h 87 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/MathFunctions.h 88 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h 89 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/TypeCasting.h 90 | /usr/local/eigen3/Eigen/src/Core/arch/AVX512/MathFunctions.h 91 | /usr/local/eigen3/Eigen/src/Core/arch/AVX512/PacketMath.h 92 | /usr/local/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h 93 | /usr/local/eigen3/Eigen/src/Core/arch/AltiVec/MathFunctions.h 94 | /usr/local/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h 95 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/Complex.h 96 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/Half.h 97 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/MathFunctions.h 98 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/PacketMath.h 99 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/PacketMathHalf.h 100 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/TypeCasting.h 101 | /usr/local/eigen3/Eigen/src/Core/arch/Default/ConjHelper.h 102 | /usr/local/eigen3/Eigen/src/Core/arch/Default/Settings.h 103 | /usr/local/eigen3/Eigen/src/Core/arch/NEON/Complex.h 104 | /usr/local/eigen3/Eigen/src/Core/arch/NEON/MathFunctions.h 105 | /usr/local/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h 106 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/Complex.h 107 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h 108 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h 109 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/TypeCasting.h 110 | /usr/local/eigen3/Eigen/src/Core/arch/ZVector/Complex.h 111 | /usr/local/eigen3/Eigen/src/Core/arch/ZVector/MathFunctions.h 112 | /usr/local/eigen3/Eigen/src/Core/arch/ZVector/PacketMath.h 113 | /usr/local/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h 114 | /usr/local/eigen3/Eigen/src/Core/functors/BinaryFunctors.h 115 | /usr/local/eigen3/Eigen/src/Core/functors/NullaryFunctors.h 116 | /usr/local/eigen3/Eigen/src/Core/functors/StlFunctors.h 117 | /usr/local/eigen3/Eigen/src/Core/functors/TernaryFunctors.h 118 | /usr/local/eigen3/Eigen/src/Core/functors/UnaryFunctors.h 119 | /usr/local/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h 120 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h 121 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h 122 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h 123 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h 124 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h 125 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h 126 | /usr/local/eigen3/Eigen/src/Core/products/Parallelizer.h 127 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h 128 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h 129 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h 130 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h 131 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointProduct.h 132 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h 133 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h 134 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h 135 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h 136 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h 137 | /usr/local/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h 138 | /usr/local/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h 139 | /usr/local/eigen3/Eigen/src/Core/products/TriangularSolverVector.h 140 | /usr/local/eigen3/Eigen/src/Core/util/BlasUtil.h 141 | /usr/local/eigen3/Eigen/src/Core/util/Constants.h 142 | /usr/local/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h 143 | /usr/local/eigen3/Eigen/src/Core/util/ForwardDeclarations.h 144 | /usr/local/eigen3/Eigen/src/Core/util/MKL_support.h 145 | /usr/local/eigen3/Eigen/src/Core/util/Macros.h 146 | /usr/local/eigen3/Eigen/src/Core/util/Memory.h 147 | /usr/local/eigen3/Eigen/src/Core/util/Meta.h 148 | /usr/local/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h 149 | /usr/local/eigen3/Eigen/src/Core/util/StaticAssert.h 150 | /usr/local/eigen3/Eigen/src/Core/util/XprHelper.h 151 | /usr/local/eigen3/Eigen/src/Eigenvalues/./ComplexSchur.h 152 | /usr/local/eigen3/Eigen/src/Eigenvalues/./HessenbergDecomposition.h 153 | /usr/local/eigen3/Eigen/src/Eigenvalues/./RealQZ.h 154 | /usr/local/eigen3/Eigen/src/Eigenvalues/./RealSchur.h 155 | /usr/local/eigen3/Eigen/src/Eigenvalues/./Tridiagonalization.h 156 | /usr/local/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h 157 | /usr/local/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h 158 | /usr/local/eigen3/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h 159 | /usr/local/eigen3/Eigen/src/Eigenvalues/EigenSolver.h 160 | /usr/local/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h 161 | /usr/local/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h 162 | /usr/local/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h 163 | /usr/local/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h 164 | /usr/local/eigen3/Eigen/src/Eigenvalues/RealQZ.h 165 | /usr/local/eigen3/Eigen/src/Eigenvalues/RealSchur.h 166 | /usr/local/eigen3/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h 167 | /usr/local/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h 168 | /usr/local/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h 169 | /usr/local/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h 170 | /usr/local/eigen3/Eigen/src/Geometry/AlignedBox.h 171 | /usr/local/eigen3/Eigen/src/Geometry/AngleAxis.h 172 | /usr/local/eigen3/Eigen/src/Geometry/EulerAngles.h 173 | /usr/local/eigen3/Eigen/src/Geometry/Homogeneous.h 174 | /usr/local/eigen3/Eigen/src/Geometry/Hyperplane.h 175 | /usr/local/eigen3/Eigen/src/Geometry/OrthoMethods.h 176 | /usr/local/eigen3/Eigen/src/Geometry/ParametrizedLine.h 177 | /usr/local/eigen3/Eigen/src/Geometry/Quaternion.h 178 | /usr/local/eigen3/Eigen/src/Geometry/Rotation2D.h 179 | /usr/local/eigen3/Eigen/src/Geometry/RotationBase.h 180 | /usr/local/eigen3/Eigen/src/Geometry/Scaling.h 181 | /usr/local/eigen3/Eigen/src/Geometry/Transform.h 182 | /usr/local/eigen3/Eigen/src/Geometry/Translation.h 183 | /usr/local/eigen3/Eigen/src/Geometry/Umeyama.h 184 | /usr/local/eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h 185 | /usr/local/eigen3/Eigen/src/Householder/BlockHouseholder.h 186 | /usr/local/eigen3/Eigen/src/Householder/Householder.h 187 | /usr/local/eigen3/Eigen/src/Householder/HouseholderSequence.h 188 | /usr/local/eigen3/Eigen/src/Jacobi/Jacobi.h 189 | /usr/local/eigen3/Eigen/src/LU/Determinant.h 190 | /usr/local/eigen3/Eigen/src/LU/FullPivLU.h 191 | /usr/local/eigen3/Eigen/src/LU/InverseImpl.h 192 | /usr/local/eigen3/Eigen/src/LU/PartialPivLU.h 193 | /usr/local/eigen3/Eigen/src/LU/PartialPivLU_LAPACKE.h 194 | /usr/local/eigen3/Eigen/src/LU/arch/Inverse_SSE.h 195 | /usr/local/eigen3/Eigen/src/QR/ColPivHouseholderQR.h 196 | /usr/local/eigen3/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h 197 | /usr/local/eigen3/Eigen/src/QR/CompleteOrthogonalDecomposition.h 198 | /usr/local/eigen3/Eigen/src/QR/FullPivHouseholderQR.h 199 | /usr/local/eigen3/Eigen/src/QR/HouseholderQR.h 200 | /usr/local/eigen3/Eigen/src/QR/HouseholderQR_LAPACKE.h 201 | /usr/local/eigen3/Eigen/src/SVD/BDCSVD.h 202 | /usr/local/eigen3/Eigen/src/SVD/JacobiSVD.h 203 | /usr/local/eigen3/Eigen/src/SVD/JacobiSVD_LAPACKE.h 204 | /usr/local/eigen3/Eigen/src/SVD/SVDBase.h 205 | /usr/local/eigen3/Eigen/src/SVD/UpperBidiagonalization.h 206 | /usr/local/eigen3/Eigen/src/misc/Image.h 207 | /usr/local/eigen3/Eigen/src/misc/Kernel.h 208 | /usr/local/eigen3/Eigen/src/misc/RealSvd2x2.h 209 | /usr/local/eigen3/Eigen/src/misc/blas.h 210 | /usr/local/eigen3/Eigen/src/misc/lapacke.h 211 | /usr/local/eigen3/Eigen/src/misc/lapacke_mangling.h 212 | /usr/local/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h 213 | /usr/local/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h 214 | /usr/local/eigen3/Eigen/src/plugins/BlockMethods.h 215 | /usr/local/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h 216 | /usr/local/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h 217 | /usr/local/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h 218 | /usr/local/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h 219 | CMakeFiles/DtreeMain.dir/main.o 220 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CDTree.hpp 221 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/RFCSV.hpp 222 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/main.cpp 223 | /usr/local/eigen3/Eigen/Cholesky 224 | /usr/local/eigen3/Eigen/Core 225 | /usr/local/eigen3/Eigen/Dense 226 | /usr/local/eigen3/Eigen/Eigenvalues 227 | /usr/local/eigen3/Eigen/Geometry 228 | /usr/local/eigen3/Eigen/Householder 229 | /usr/local/eigen3/Eigen/Jacobi 230 | /usr/local/eigen3/Eigen/LU 231 | /usr/local/eigen3/Eigen/QR 232 | /usr/local/eigen3/Eigen/SVD 233 | /usr/local/eigen3/Eigen/src/Cholesky/LDLT.h 234 | /usr/local/eigen3/Eigen/src/Cholesky/LLT.h 235 | /usr/local/eigen3/Eigen/src/Cholesky/LLT_LAPACKE.h 236 | /usr/local/eigen3/Eigen/src/Core/Array.h 237 | /usr/local/eigen3/Eigen/src/Core/ArrayBase.h 238 | /usr/local/eigen3/Eigen/src/Core/ArrayWrapper.h 239 | /usr/local/eigen3/Eigen/src/Core/Assign.h 240 | /usr/local/eigen3/Eigen/src/Core/AssignEvaluator.h 241 | /usr/local/eigen3/Eigen/src/Core/Assign_MKL.h 242 | /usr/local/eigen3/Eigen/src/Core/BandMatrix.h 243 | /usr/local/eigen3/Eigen/src/Core/Block.h 244 | /usr/local/eigen3/Eigen/src/Core/BooleanRedux.h 245 | /usr/local/eigen3/Eigen/src/Core/CommaInitializer.h 246 | /usr/local/eigen3/Eigen/src/Core/ConditionEstimator.h 247 | /usr/local/eigen3/Eigen/src/Core/CoreEvaluators.h 248 | /usr/local/eigen3/Eigen/src/Core/CoreIterators.h 249 | /usr/local/eigen3/Eigen/src/Core/CwiseBinaryOp.h 250 | /usr/local/eigen3/Eigen/src/Core/CwiseNullaryOp.h 251 | /usr/local/eigen3/Eigen/src/Core/CwiseTernaryOp.h 252 | /usr/local/eigen3/Eigen/src/Core/CwiseUnaryOp.h 253 | /usr/local/eigen3/Eigen/src/Core/CwiseUnaryView.h 254 | /usr/local/eigen3/Eigen/src/Core/DenseBase.h 255 | /usr/local/eigen3/Eigen/src/Core/DenseCoeffsBase.h 256 | /usr/local/eigen3/Eigen/src/Core/DenseStorage.h 257 | /usr/local/eigen3/Eigen/src/Core/Diagonal.h 258 | /usr/local/eigen3/Eigen/src/Core/DiagonalMatrix.h 259 | /usr/local/eigen3/Eigen/src/Core/DiagonalProduct.h 260 | /usr/local/eigen3/Eigen/src/Core/Dot.h 261 | /usr/local/eigen3/Eigen/src/Core/EigenBase.h 262 | /usr/local/eigen3/Eigen/src/Core/Fuzzy.h 263 | /usr/local/eigen3/Eigen/src/Core/GeneralProduct.h 264 | /usr/local/eigen3/Eigen/src/Core/GenericPacketMath.h 265 | /usr/local/eigen3/Eigen/src/Core/GlobalFunctions.h 266 | /usr/local/eigen3/Eigen/src/Core/IO.h 267 | /usr/local/eigen3/Eigen/src/Core/Inverse.h 268 | /usr/local/eigen3/Eigen/src/Core/Map.h 269 | /usr/local/eigen3/Eigen/src/Core/MapBase.h 270 | /usr/local/eigen3/Eigen/src/Core/MathFunctions.h 271 | /usr/local/eigen3/Eigen/src/Core/MathFunctionsImpl.h 272 | /usr/local/eigen3/Eigen/src/Core/Matrix.h 273 | /usr/local/eigen3/Eigen/src/Core/MatrixBase.h 274 | /usr/local/eigen3/Eigen/src/Core/NestByValue.h 275 | /usr/local/eigen3/Eigen/src/Core/NoAlias.h 276 | /usr/local/eigen3/Eigen/src/Core/NumTraits.h 277 | /usr/local/eigen3/Eigen/src/Core/PermutationMatrix.h 278 | /usr/local/eigen3/Eigen/src/Core/PlainObjectBase.h 279 | /usr/local/eigen3/Eigen/src/Core/Product.h 280 | /usr/local/eigen3/Eigen/src/Core/ProductEvaluators.h 281 | /usr/local/eigen3/Eigen/src/Core/Random.h 282 | /usr/local/eigen3/Eigen/src/Core/Redux.h 283 | /usr/local/eigen3/Eigen/src/Core/Ref.h 284 | /usr/local/eigen3/Eigen/src/Core/Replicate.h 285 | /usr/local/eigen3/Eigen/src/Core/ReturnByValue.h 286 | /usr/local/eigen3/Eigen/src/Core/Reverse.h 287 | /usr/local/eigen3/Eigen/src/Core/Select.h 288 | /usr/local/eigen3/Eigen/src/Core/SelfAdjointView.h 289 | /usr/local/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h 290 | /usr/local/eigen3/Eigen/src/Core/Solve.h 291 | /usr/local/eigen3/Eigen/src/Core/SolveTriangular.h 292 | /usr/local/eigen3/Eigen/src/Core/SolverBase.h 293 | /usr/local/eigen3/Eigen/src/Core/StableNorm.h 294 | /usr/local/eigen3/Eigen/src/Core/Stride.h 295 | /usr/local/eigen3/Eigen/src/Core/Swap.h 296 | /usr/local/eigen3/Eigen/src/Core/Transpose.h 297 | /usr/local/eigen3/Eigen/src/Core/Transpositions.h 298 | /usr/local/eigen3/Eigen/src/Core/TriangularMatrix.h 299 | /usr/local/eigen3/Eigen/src/Core/VectorBlock.h 300 | /usr/local/eigen3/Eigen/src/Core/VectorwiseOp.h 301 | /usr/local/eigen3/Eigen/src/Core/Visitor.h 302 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/Complex.h 303 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/MathFunctions.h 304 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h 305 | /usr/local/eigen3/Eigen/src/Core/arch/AVX/TypeCasting.h 306 | /usr/local/eigen3/Eigen/src/Core/arch/AVX512/MathFunctions.h 307 | /usr/local/eigen3/Eigen/src/Core/arch/AVX512/PacketMath.h 308 | /usr/local/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h 309 | /usr/local/eigen3/Eigen/src/Core/arch/AltiVec/MathFunctions.h 310 | /usr/local/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h 311 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/Complex.h 312 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/Half.h 313 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/MathFunctions.h 314 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/PacketMath.h 315 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/PacketMathHalf.h 316 | /usr/local/eigen3/Eigen/src/Core/arch/CUDA/TypeCasting.h 317 | /usr/local/eigen3/Eigen/src/Core/arch/Default/ConjHelper.h 318 | /usr/local/eigen3/Eigen/src/Core/arch/Default/Settings.h 319 | /usr/local/eigen3/Eigen/src/Core/arch/NEON/Complex.h 320 | /usr/local/eigen3/Eigen/src/Core/arch/NEON/MathFunctions.h 321 | /usr/local/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h 322 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/Complex.h 323 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h 324 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h 325 | /usr/local/eigen3/Eigen/src/Core/arch/SSE/TypeCasting.h 326 | /usr/local/eigen3/Eigen/src/Core/arch/ZVector/Complex.h 327 | /usr/local/eigen3/Eigen/src/Core/arch/ZVector/MathFunctions.h 328 | /usr/local/eigen3/Eigen/src/Core/arch/ZVector/PacketMath.h 329 | /usr/local/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h 330 | /usr/local/eigen3/Eigen/src/Core/functors/BinaryFunctors.h 331 | /usr/local/eigen3/Eigen/src/Core/functors/NullaryFunctors.h 332 | /usr/local/eigen3/Eigen/src/Core/functors/StlFunctors.h 333 | /usr/local/eigen3/Eigen/src/Core/functors/TernaryFunctors.h 334 | /usr/local/eigen3/Eigen/src/Core/functors/UnaryFunctors.h 335 | /usr/local/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h 336 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h 337 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h 338 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h 339 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h 340 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h 341 | /usr/local/eigen3/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h 342 | /usr/local/eigen3/Eigen/src/Core/products/Parallelizer.h 343 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h 344 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h 345 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h 346 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h 347 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointProduct.h 348 | /usr/local/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h 349 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h 350 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h 351 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h 352 | /usr/local/eigen3/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h 353 | /usr/local/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h 354 | /usr/local/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h 355 | /usr/local/eigen3/Eigen/src/Core/products/TriangularSolverVector.h 356 | /usr/local/eigen3/Eigen/src/Core/util/BlasUtil.h 357 | /usr/local/eigen3/Eigen/src/Core/util/Constants.h 358 | /usr/local/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h 359 | /usr/local/eigen3/Eigen/src/Core/util/ForwardDeclarations.h 360 | /usr/local/eigen3/Eigen/src/Core/util/MKL_support.h 361 | /usr/local/eigen3/Eigen/src/Core/util/Macros.h 362 | /usr/local/eigen3/Eigen/src/Core/util/Memory.h 363 | /usr/local/eigen3/Eigen/src/Core/util/Meta.h 364 | /usr/local/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h 365 | /usr/local/eigen3/Eigen/src/Core/util/StaticAssert.h 366 | /usr/local/eigen3/Eigen/src/Core/util/XprHelper.h 367 | /usr/local/eigen3/Eigen/src/Eigenvalues/./ComplexSchur.h 368 | /usr/local/eigen3/Eigen/src/Eigenvalues/./HessenbergDecomposition.h 369 | /usr/local/eigen3/Eigen/src/Eigenvalues/./RealQZ.h 370 | /usr/local/eigen3/Eigen/src/Eigenvalues/./RealSchur.h 371 | /usr/local/eigen3/Eigen/src/Eigenvalues/./Tridiagonalization.h 372 | /usr/local/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h 373 | /usr/local/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h 374 | /usr/local/eigen3/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h 375 | /usr/local/eigen3/Eigen/src/Eigenvalues/EigenSolver.h 376 | /usr/local/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h 377 | /usr/local/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h 378 | /usr/local/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h 379 | /usr/local/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h 380 | /usr/local/eigen3/Eigen/src/Eigenvalues/RealQZ.h 381 | /usr/local/eigen3/Eigen/src/Eigenvalues/RealSchur.h 382 | /usr/local/eigen3/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h 383 | /usr/local/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h 384 | /usr/local/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h 385 | /usr/local/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h 386 | /usr/local/eigen3/Eigen/src/Geometry/AlignedBox.h 387 | /usr/local/eigen3/Eigen/src/Geometry/AngleAxis.h 388 | /usr/local/eigen3/Eigen/src/Geometry/EulerAngles.h 389 | /usr/local/eigen3/Eigen/src/Geometry/Homogeneous.h 390 | /usr/local/eigen3/Eigen/src/Geometry/Hyperplane.h 391 | /usr/local/eigen3/Eigen/src/Geometry/OrthoMethods.h 392 | /usr/local/eigen3/Eigen/src/Geometry/ParametrizedLine.h 393 | /usr/local/eigen3/Eigen/src/Geometry/Quaternion.h 394 | /usr/local/eigen3/Eigen/src/Geometry/Rotation2D.h 395 | /usr/local/eigen3/Eigen/src/Geometry/RotationBase.h 396 | /usr/local/eigen3/Eigen/src/Geometry/Scaling.h 397 | /usr/local/eigen3/Eigen/src/Geometry/Transform.h 398 | /usr/local/eigen3/Eigen/src/Geometry/Translation.h 399 | /usr/local/eigen3/Eigen/src/Geometry/Umeyama.h 400 | /usr/local/eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h 401 | /usr/local/eigen3/Eigen/src/Householder/BlockHouseholder.h 402 | /usr/local/eigen3/Eigen/src/Householder/Householder.h 403 | /usr/local/eigen3/Eigen/src/Householder/HouseholderSequence.h 404 | /usr/local/eigen3/Eigen/src/Jacobi/Jacobi.h 405 | /usr/local/eigen3/Eigen/src/LU/Determinant.h 406 | /usr/local/eigen3/Eigen/src/LU/FullPivLU.h 407 | /usr/local/eigen3/Eigen/src/LU/InverseImpl.h 408 | /usr/local/eigen3/Eigen/src/LU/PartialPivLU.h 409 | /usr/local/eigen3/Eigen/src/LU/PartialPivLU_LAPACKE.h 410 | /usr/local/eigen3/Eigen/src/LU/arch/Inverse_SSE.h 411 | /usr/local/eigen3/Eigen/src/QR/ColPivHouseholderQR.h 412 | /usr/local/eigen3/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h 413 | /usr/local/eigen3/Eigen/src/QR/CompleteOrthogonalDecomposition.h 414 | /usr/local/eigen3/Eigen/src/QR/FullPivHouseholderQR.h 415 | /usr/local/eigen3/Eigen/src/QR/HouseholderQR.h 416 | /usr/local/eigen3/Eigen/src/QR/HouseholderQR_LAPACKE.h 417 | /usr/local/eigen3/Eigen/src/SVD/BDCSVD.h 418 | /usr/local/eigen3/Eigen/src/SVD/JacobiSVD.h 419 | /usr/local/eigen3/Eigen/src/SVD/JacobiSVD_LAPACKE.h 420 | /usr/local/eigen3/Eigen/src/SVD/SVDBase.h 421 | /usr/local/eigen3/Eigen/src/SVD/UpperBidiagonalization.h 422 | /usr/local/eigen3/Eigen/src/misc/Image.h 423 | /usr/local/eigen3/Eigen/src/misc/Kernel.h 424 | /usr/local/eigen3/Eigen/src/misc/RealSvd2x2.h 425 | /usr/local/eigen3/Eigen/src/misc/blas.h 426 | /usr/local/eigen3/Eigen/src/misc/lapacke.h 427 | /usr/local/eigen3/Eigen/src/misc/lapacke_mangling.h 428 | /usr/local/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h 429 | /usr/local/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h 430 | /usr/local/eigen3/Eigen/src/plugins/BlockMethods.h 431 | /usr/local/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h 432 | /usr/local/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h 433 | /usr/local/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h 434 | /usr/local/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h 435 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -std=c++11 -O0 -Wall -g2 -ggdb 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/usr/local/eigen3 -I"/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/." 10 | 11 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -std=c++11 -O0 -Wall -g2 -ggdb CMakeFiles/DtreeMain.dir/main.o CMakeFiles/DtreeMain.dir/CDTree.o -o DtreeMain -rdynamic 2 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/DtreeMain.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | 5 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 11 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 12 | "CMakeLists.txt" 13 | "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" 14 | "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" 15 | "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" 16 | "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" 17 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" 18 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" 19 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" 20 | "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" 21 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" 22 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" 23 | "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" 24 | "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" 25 | ) 26 | 27 | # The corresponding makefile is: 28 | set(CMAKE_MAKEFILE_OUTPUTS 29 | "Makefile" 30 | "CMakeFiles/cmake.check_cache" 31 | ) 32 | 33 | # Byproducts of CMake generate step: 34 | set(CMAKE_MAKEFILE_PRODUCTS 35 | "CMakeFiles/CMakeDirectoryInformation.cmake" 36 | ) 37 | 38 | # Dependency information for all targets: 39 | set(CMAKE_DEPEND_INFO_FILES 40 | "CMakeFiles/DtreeMain.dir/DependInfo.cmake" 41 | ) 42 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # The main recursive all target 10 | all: 11 | 12 | .PHONY : all 13 | 14 | # The main recursive preinstall target 15 | preinstall: 16 | 17 | .PHONY : preinstall 18 | 19 | #============================================================================= 20 | # Special targets provided by cmake. 21 | 22 | # Disable implicit rules so canonical targets will work. 23 | .SUFFIXES: 24 | 25 | 26 | # Remove some rules from gmake that .SUFFIXES does not remove. 27 | SUFFIXES = 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | 32 | # Suppress display of executed commands. 33 | $(VERBOSE).SILENT: 34 | 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /usr/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /usr/bin/cmake -E remove -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" 61 | 62 | #============================================================================= 63 | # Target rules for target CMakeFiles/DtreeMain.dir 64 | 65 | # All Build rule for target. 66 | CMakeFiles/DtreeMain.dir/all: 67 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/depend 68 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/build 69 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" --progress-num=1,2,3 "Built target DtreeMain" 70 | .PHONY : CMakeFiles/DtreeMain.dir/all 71 | 72 | # Include target in all. 73 | all: CMakeFiles/DtreeMain.dir/all 74 | 75 | .PHONY : all 76 | 77 | # Build rule for subdir invocation for target. 78 | CMakeFiles/DtreeMain.dir/rule: cmake_check_build_system 79 | $(CMAKE_COMMAND) -E cmake_progress_start "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" 3 80 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/DtreeMain.dir/all 81 | $(CMAKE_COMMAND) -E cmake_progress_start "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" 0 82 | .PHONY : CMakeFiles/DtreeMain.dir/rule 83 | 84 | # Convenience name for target. 85 | DtreeMain: CMakeFiles/DtreeMain.dir/rule 86 | 87 | .PHONY : DtreeMain 88 | 89 | # clean rule for target. 90 | CMakeFiles/DtreeMain.dir/clean: 91 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/clean 92 | .PHONY : CMakeFiles/DtreeMain.dir/clean 93 | 94 | # clean rule for target. 95 | clean: CMakeFiles/DtreeMain.dir/clean 96 | 97 | .PHONY : clean 98 | 99 | #============================================================================= 100 | # Special targets to cleanup operation of make. 101 | 102 | # Special rule to run CMake to check the build system integrity. 103 | # No rule that depends on this can have commands that come from listfiles 104 | # because they might be regenerated. 105 | cmake_check_build_system: 106 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 107 | .PHONY : cmake_check_build_system 108 | 109 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/edit_cache.dir 2 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/rebuild_cache.dir 3 | /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/DtreeMain.dir 4 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/C++ source Code/Continuous/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/feature_tests.cxx: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "CXX_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "cxx_aggregate_default_initializers\n" 10 | "CXX_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "cxx_alias_templates\n" 17 | "CXX_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "cxx_alignas\n" 24 | "CXX_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "cxx_alignof\n" 31 | "CXX_FEATURE:" 32 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 33 | "1" 34 | #else 35 | "0" 36 | #endif 37 | "cxx_attributes\n" 38 | "CXX_FEATURE:" 39 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 40 | "1" 41 | #else 42 | "0" 43 | #endif 44 | "cxx_attribute_deprecated\n" 45 | "CXX_FEATURE:" 46 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 47 | "1" 48 | #else 49 | "0" 50 | #endif 51 | "cxx_auto_type\n" 52 | "CXX_FEATURE:" 53 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 54 | "1" 55 | #else 56 | "0" 57 | #endif 58 | "cxx_binary_literals\n" 59 | "CXX_FEATURE:" 60 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 61 | "1" 62 | #else 63 | "0" 64 | #endif 65 | "cxx_constexpr\n" 66 | "CXX_FEATURE:" 67 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 68 | "1" 69 | #else 70 | "0" 71 | #endif 72 | "cxx_contextual_conversions\n" 73 | "CXX_FEATURE:" 74 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 75 | "1" 76 | #else 77 | "0" 78 | #endif 79 | "cxx_decltype\n" 80 | "CXX_FEATURE:" 81 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 82 | "1" 83 | #else 84 | "0" 85 | #endif 86 | "cxx_decltype_auto\n" 87 | "CXX_FEATURE:" 88 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 89 | "1" 90 | #else 91 | "0" 92 | #endif 93 | "cxx_decltype_incomplete_return_types\n" 94 | "CXX_FEATURE:" 95 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 96 | "1" 97 | #else 98 | "0" 99 | #endif 100 | "cxx_default_function_template_args\n" 101 | "CXX_FEATURE:" 102 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 103 | "1" 104 | #else 105 | "0" 106 | #endif 107 | "cxx_defaulted_functions\n" 108 | "CXX_FEATURE:" 109 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 110 | "1" 111 | #else 112 | "0" 113 | #endif 114 | "cxx_defaulted_move_initializers\n" 115 | "CXX_FEATURE:" 116 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 117 | "1" 118 | #else 119 | "0" 120 | #endif 121 | "cxx_delegating_constructors\n" 122 | "CXX_FEATURE:" 123 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 124 | "1" 125 | #else 126 | "0" 127 | #endif 128 | "cxx_deleted_functions\n" 129 | "CXX_FEATURE:" 130 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 131 | "1" 132 | #else 133 | "0" 134 | #endif 135 | "cxx_digit_separators\n" 136 | "CXX_FEATURE:" 137 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 138 | "1" 139 | #else 140 | "0" 141 | #endif 142 | "cxx_enum_forward_declarations\n" 143 | "CXX_FEATURE:" 144 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 145 | "1" 146 | #else 147 | "0" 148 | #endif 149 | "cxx_explicit_conversions\n" 150 | "CXX_FEATURE:" 151 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 152 | "1" 153 | #else 154 | "0" 155 | #endif 156 | "cxx_extended_friend_declarations\n" 157 | "CXX_FEATURE:" 158 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 159 | "1" 160 | #else 161 | "0" 162 | #endif 163 | "cxx_extern_templates\n" 164 | "CXX_FEATURE:" 165 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 166 | "1" 167 | #else 168 | "0" 169 | #endif 170 | "cxx_final\n" 171 | "CXX_FEATURE:" 172 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 173 | "1" 174 | #else 175 | "0" 176 | #endif 177 | "cxx_func_identifier\n" 178 | "CXX_FEATURE:" 179 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 180 | "1" 181 | #else 182 | "0" 183 | #endif 184 | "cxx_generalized_initializers\n" 185 | "CXX_FEATURE:" 186 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 187 | "1" 188 | #else 189 | "0" 190 | #endif 191 | "cxx_generic_lambdas\n" 192 | "CXX_FEATURE:" 193 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 194 | "1" 195 | #else 196 | "0" 197 | #endif 198 | "cxx_inheriting_constructors\n" 199 | "CXX_FEATURE:" 200 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 201 | "1" 202 | #else 203 | "0" 204 | #endif 205 | "cxx_inline_namespaces\n" 206 | "CXX_FEATURE:" 207 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 208 | "1" 209 | #else 210 | "0" 211 | #endif 212 | "cxx_lambdas\n" 213 | "CXX_FEATURE:" 214 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 215 | "1" 216 | #else 217 | "0" 218 | #endif 219 | "cxx_lambda_init_captures\n" 220 | "CXX_FEATURE:" 221 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 222 | "1" 223 | #else 224 | "0" 225 | #endif 226 | "cxx_local_type_template_args\n" 227 | "CXX_FEATURE:" 228 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 229 | "1" 230 | #else 231 | "0" 232 | #endif 233 | "cxx_long_long_type\n" 234 | "CXX_FEATURE:" 235 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 236 | "1" 237 | #else 238 | "0" 239 | #endif 240 | "cxx_noexcept\n" 241 | "CXX_FEATURE:" 242 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 243 | "1" 244 | #else 245 | "0" 246 | #endif 247 | "cxx_nonstatic_member_init\n" 248 | "CXX_FEATURE:" 249 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 250 | "1" 251 | #else 252 | "0" 253 | #endif 254 | "cxx_nullptr\n" 255 | "CXX_FEATURE:" 256 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 257 | "1" 258 | #else 259 | "0" 260 | #endif 261 | "cxx_override\n" 262 | "CXX_FEATURE:" 263 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 264 | "1" 265 | #else 266 | "0" 267 | #endif 268 | "cxx_range_for\n" 269 | "CXX_FEATURE:" 270 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 271 | "1" 272 | #else 273 | "0" 274 | #endif 275 | "cxx_raw_string_literals\n" 276 | "CXX_FEATURE:" 277 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 278 | "1" 279 | #else 280 | "0" 281 | #endif 282 | "cxx_reference_qualified_functions\n" 283 | "CXX_FEATURE:" 284 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 285 | "1" 286 | #else 287 | "0" 288 | #endif 289 | "cxx_relaxed_constexpr\n" 290 | "CXX_FEATURE:" 291 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 292 | "1" 293 | #else 294 | "0" 295 | #endif 296 | "cxx_return_type_deduction\n" 297 | "CXX_FEATURE:" 298 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 299 | "1" 300 | #else 301 | "0" 302 | #endif 303 | "cxx_right_angle_brackets\n" 304 | "CXX_FEATURE:" 305 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 306 | "1" 307 | #else 308 | "0" 309 | #endif 310 | "cxx_rvalue_references\n" 311 | "CXX_FEATURE:" 312 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 313 | "1" 314 | #else 315 | "0" 316 | #endif 317 | "cxx_sizeof_member\n" 318 | "CXX_FEATURE:" 319 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 320 | "1" 321 | #else 322 | "0" 323 | #endif 324 | "cxx_static_assert\n" 325 | "CXX_FEATURE:" 326 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 327 | "1" 328 | #else 329 | "0" 330 | #endif 331 | "cxx_strong_enums\n" 332 | "CXX_FEATURE:" 333 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus 334 | "1" 335 | #else 336 | "0" 337 | #endif 338 | "cxx_template_template_parameters\n" 339 | "CXX_FEATURE:" 340 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 341 | "1" 342 | #else 343 | "0" 344 | #endif 345 | "cxx_thread_local\n" 346 | "CXX_FEATURE:" 347 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 348 | "1" 349 | #else 350 | "0" 351 | #endif 352 | "cxx_trailing_return_types\n" 353 | "CXX_FEATURE:" 354 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 355 | "1" 356 | #else 357 | "0" 358 | #endif 359 | "cxx_unicode_literals\n" 360 | "CXX_FEATURE:" 361 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 362 | "1" 363 | #else 364 | "0" 365 | #endif 366 | "cxx_uniform_initialization\n" 367 | "CXX_FEATURE:" 368 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 369 | "1" 370 | #else 371 | "0" 372 | #endif 373 | "cxx_unrestricted_unions\n" 374 | "CXX_FEATURE:" 375 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 376 | "1" 377 | #else 378 | "0" 379 | #endif 380 | "cxx_user_literals\n" 381 | "CXX_FEATURE:" 382 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 383 | "1" 384 | #else 385 | "0" 386 | #endif 387 | "cxx_variable_templates\n" 388 | "CXX_FEATURE:" 389 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 390 | "1" 391 | #else 392 | "0" 393 | #endif 394 | "cxx_variadic_macros\n" 395 | "CXX_FEATURE:" 396 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 397 | "1" 398 | #else 399 | "0" 400 | #endif 401 | "cxx_variadic_templates\n" 402 | 403 | }; 404 | 405 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 406 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.5) 2 | PROJECT(DTREE CXX) 3 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 4 | SET(CMAKE_BUILD_TYPE "debug") 5 | SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb") 6 | SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall") 7 | 8 | SET(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}") 9 | SET(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/LIB") 10 | 11 | message(STATUS "cmake prefix path : ${CMAKE_PREFIX_PATH}") 12 | 13 | INCLUDE_DIRECTORIES(/usr/local/eigen3/) 14 | INCLUDE_DIRECTORIES(./) 15 | AUX_SOURCE_DIRECTORY(./ DIR_SRCS) 16 | 17 | ADD_EXECUTABLE(DtreeMain ${DIR_SRCS}) 18 | 19 | #TARGET_LINK_LIBRARIES(DtreeMain) -------------------------------------------------------------------------------- /C++ source Code/Continuous/DtreeMain: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/C++ source Code/Continuous/DtreeMain -------------------------------------------------------------------------------- /C++ source Code/Continuous/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous" 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target edit_cache 60 | edit_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." 62 | /usr/bin/cmake-gui -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : edit_cache 64 | 65 | # Special rule for the target edit_cache 66 | edit_cache/fast: edit_cache 67 | 68 | .PHONY : edit_cache/fast 69 | 70 | # Special rule for the target rebuild_cache 71 | rebuild_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 73 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 74 | .PHONY : rebuild_cache 75 | 76 | # Special rule for the target rebuild_cache 77 | rebuild_cache/fast: rebuild_cache 78 | 79 | .PHONY : rebuild_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | $(CMAKE_COMMAND) -E cmake_progress_start "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles/progress.marks" 84 | $(MAKE) -f CMakeFiles/Makefile2 all 85 | $(CMAKE_COMMAND) -E cmake_progress_start "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/CMakeFiles" 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | $(MAKE) -f CMakeFiles/Makefile2 clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | #============================================================================= 114 | # Target rules for targets named DtreeMain 115 | 116 | # Build rule for target. 117 | DtreeMain: cmake_check_build_system 118 | $(MAKE) -f CMakeFiles/Makefile2 DtreeMain 119 | .PHONY : DtreeMain 120 | 121 | # fast build rule for target. 122 | DtreeMain/fast: 123 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/build 124 | .PHONY : DtreeMain/fast 125 | 126 | # target to build an object file 127 | CDTree.o: 128 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/CDTree.o 129 | .PHONY : CDTree.o 130 | 131 | # target to preprocess a source file 132 | CDTree.i: 133 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/CDTree.i 134 | .PHONY : CDTree.i 135 | 136 | # target to generate assembly for a file 137 | CDTree.s: 138 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/CDTree.s 139 | .PHONY : CDTree.s 140 | 141 | # target to build an object file 142 | main.o: 143 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/main.o 144 | .PHONY : main.o 145 | 146 | # target to preprocess a source file 147 | main.i: 148 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/main.i 149 | .PHONY : main.i 150 | 151 | # target to generate assembly for a file 152 | main.s: 153 | $(MAKE) -f CMakeFiles/DtreeMain.dir/build.make CMakeFiles/DtreeMain.dir/main.s 154 | .PHONY : main.s 155 | 156 | # Help Target 157 | help: 158 | @echo "The following are some of the valid targets for this Makefile:" 159 | @echo "... all (the default if no target is provided)" 160 | @echo "... clean" 161 | @echo "... depend" 162 | @echo "... edit_cache" 163 | @echo "... rebuild_cache" 164 | @echo "... DtreeMain" 165 | @echo "... CDTree.o" 166 | @echo "... CDTree.i" 167 | @echo "... CDTree.s" 168 | @echo "... main.o" 169 | @echo "... main.i" 170 | @echo "... main.s" 171 | .PHONY : help 172 | 173 | 174 | 175 | #============================================================================= 176 | # Special targets to cleanup operation of make. 177 | 178 | # Special rule to run CMake to check the build system integrity. 179 | # No rule that depends on this can have commands that come from listfiles 180 | # because they might be regenerated. 181 | cmake_check_build_system: 182 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 183 | .PHONY : cmake_check_build_system 184 | 185 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/RFCSV.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | read data from csv 3 | */ 4 | #ifndef RFCSV_H 5 | #define RFCSV_H 6 | #include 7 | #include 8 | #include 9 | using std::cout; using std::cin; using std::cerr; using std::endl; 10 | using std::string; using std::ifstream; using std::istringstream; 11 | using std::vector; using std::ios; 12 | 13 | template 14 | class RFCSV 15 | { 16 | public: 17 | string csvFileName; 18 | RFCSV() 19 | { 20 | this->csvFileName = ""; 21 | } 22 | RFCSV(string fileName) 23 | { 24 | this->csvFileName = fileName; 25 | } 26 | 27 | std::pair getData(string fileName) 28 | { 29 | 30 | string csvFileName = fileName; 31 | 32 | int cols = 0, rows = 0; //通过文件读取 获取行和列的信息。 33 | vector> strResult; 34 | ifstream read; 35 | read.open(csvFileName, ios::in); 36 | 37 | string headline; 38 | getline(read, headline); 39 | rows++; //每次readline都要加行数一次 40 | if (rows > 0) 41 | { 42 | string attributeName; 43 | char delim = ','; 44 | istringstream stringin(headline); 45 | vector oneLineString; 46 | while (getline(stringin, attributeName, delim)) 47 | { 48 | cols++; 49 | oneLineString.push_back(attributeName); 50 | } 51 | strResult.push_back(oneLineString); 52 | //cout << endl; 53 | } 54 | //获取第一行信息 55 | string line; //从第二行以后开始存储的每一行的数据 56 | //下面获取后面的信息 57 | while (getline(read, line)) 58 | { 59 | rows++; 60 | int realcols = 0; //用来判断此行中数据是否和标题行的数据列数相同,相同才存储,否则不存储 61 | string attributeName; 62 | char delim = ','; 63 | istringstream stringin(line); 64 | vector oneLineString; 65 | while (getline(stringin, attributeName, delim)) 66 | { 67 | realcols++; 68 | //cout << attributeName << " "; 69 | oneLineString.push_back(attributeName); 70 | } 71 | if (realcols == cols) 72 | { //只有和标题行数据列数相同才存储 73 | strResult.push_back(oneLineString); 74 | } 75 | } 76 | dataT Data(rows, cols - 1); 77 | labelT label(rows, 1); 78 | for (int i = 0; i < rows; i++) 79 | { 80 | for (int j = 0; j < cols - 1; j++) 81 | { 82 | Data(i, j) = stringToNum(strResult[i][j]); 83 | } 84 | label(i, 0) = stringToNum(strResult[i][cols - 1]); 85 | } 86 | return std::pair(Data, label); 87 | } 88 | 89 | std::pair getData() 90 | { 91 | std::pair result; 92 | string csvFileName = this->csvFileName; 93 | return result; 94 | } 95 | 96 | template 97 | Type stringToNum(const string& str) 98 | { 99 | istringstream iss(str); 100 | Type num; 101 | iss >> num; 102 | return num; 103 | } 104 | 105 | }; 106 | 107 | #endif -------------------------------------------------------------------------------- /C++ source Code/Continuous/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/liana/Desktop/MachineLearning/MachineLearning-DecisionTree/C++ source Code/Continuous/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /C++ source Code/Continuous/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "CDTree.hpp" 3 | #include "RFCSV.hpp" 4 | #include 5 | using Eigen::MatrixXf; using Eigen::MatrixXi; 6 | int main() 7 | { 8 | 9 | std::pair trainData, testData; 10 | RFCSV readcsv; 11 | trainData = readcsv.getData("../data/ContinuousTrain.csv"); 12 | testData = readcsv.getData("../data/ContinuousTest.csv"); 13 | CDTree myCDTree(4, 3, 0.0001); 14 | myCDTree.buildTree(trainData.first, trainData.second, "ID3"); 15 | MatrixXi predictresult = myCDTree.predict(testData.first); 16 | float accuracy = 0; 17 | for (int i = 0; i < predictresult.size(); i++) 18 | { 19 | if (testData.second(i) == predictresult(i)) 20 | { 21 | accuracy += 1.0 / predictresult.size(); 22 | } 23 | } 24 | cout << "准确率为:" << accuracy * 100 << "\% 你很棒棒哦!" << endl; 25 | } 26 | -------------------------------------------------------------------------------- /C++ source Code/Discrete/DTree.cpp: -------------------------------------------------------------------------------- 1 | #include "DTree.hpp" 2 | 3 | 4 | DTree::DTree() 5 | { 6 | this->root = new TreeNode; 7 | this->trainMatrixInfo.cols = 0; 8 | this->trainMatrixInfo.rows = 0; 9 | 10 | } 11 | 12 | DTree::DTree(string csvfilename) 13 | { 14 | this->root = new TreeNode; 15 | this->trainMatrixInfo.cols = 0; 16 | this->trainMatrixInfo.rows = 0; 17 | this->ReadTrainDataFile(csvfilename); 18 | 19 | } 20 | /* 21 | DTree::TreeNode* DTree::DTree::BuildTree(MatrixXi &data, vector &dataAttr, string Algorithm) 22 | { 23 | if (Algorithm == "ID3") 24 | { 25 | return AlgorithmID3(data, dataAttr); 26 | } 27 | else if (Algorithm == "C4.5") 28 | { 29 | return AlgorithmC4_5(data, dataAttr); 30 | } 31 | else if (Algorithm == "CART") 32 | { 33 | return AlgorithmCART(data, dataAttr); 34 | } 35 | else 36 | { 37 | cerr << "Input error, the program has been stopped!"; 38 | exit(0); 39 | } 40 | return 0; 41 | } 42 | */ 43 | int DTree::DTree::BuildTree(MatrixXi &data, vector &dataAttr, string Algorithm) 44 | { 45 | 46 | if (Algorithm == "ID3") 47 | { 48 | this->root = AlgorithmID3(data, dataAttr); 49 | } 50 | else if (Algorithm == "C4.5") 51 | { 52 | this->root = AlgorithmC4_5(data, dataAttr); 53 | } 54 | else if (Algorithm == "CART") 55 | { 56 | this->root = AlgorithmCART(data, dataAttr); 57 | } 58 | else 59 | { 60 | cerr << "Algorithm name must be ID3,C4.5 or CART, other algorithms are not supported, the program has been stopped!"; 61 | exit(0); 62 | } 63 | return 0; 64 | } 65 | 66 | /* 67 | get data from csv files , the first row of csvfile is the name of attributes, string type 68 | return int type data to this->trainDataMat for later training process 69 | */ 70 | MatrixXi DTree::ReadTrainDataFile(string fileAddress) 71 | { 72 | int cols = 0, rows = 0; //通过文件读取 获取行和列的信息。 73 | ///MatrixXi strResult; 74 | //MatrixXi result; //返回的特征值矩阵。 75 | vector> strResult; 76 | vector headAttr; 77 | ifstream read; 78 | read.open(fileAddress, ios::in); 79 | 80 | string headline; 81 | getline(read, headline); 82 | rows++; //每次readline都要加行数一次 83 | if (rows > 0) 84 | { 85 | string attributeName; 86 | char delim = ','; 87 | istringstream stringin(headline); 88 | vector oneLineString; 89 | while (getline(stringin, attributeName, delim)) 90 | { 91 | cols++; 92 | oneLineString.push_back(attributeName); 93 | } 94 | strResult.push_back(oneLineString); 95 | //cout << endl; 96 | } 97 | //获取第一行信息 98 | string line; //从第二行以后开始存储的每一行的数据 99 | //下面获取后面的信息 100 | while (getline(read, line)) 101 | { 102 | rows++; 103 | int realcols = 0; //用来判断此行中数据是否和标题行的数据列数相同,相同才存储,否则不存储 104 | string attributeName; 105 | char delim = ','; 106 | istringstream stringin(line); 107 | vector oneLineString; 108 | while (getline(stringin, attributeName, delim)) 109 | { 110 | realcols++; 111 | //cout << attributeName << " "; 112 | oneLineString.push_back(attributeName); 113 | } 114 | if (realcols == cols) 115 | { //只有和标题行数据列数相同才存储 116 | strResult.push_back(oneLineString); 117 | } 118 | } 119 | //cout << rows << " " << cols; 120 | //MatrixXi tmpMat(rows - 1, cols, CV_8UC1); 121 | MatrixXi tempMat(rows - 1, cols); 122 | this->trainMatrixInfo.cols = cols; 123 | this->trainMatrixInfo.rows = rows - 1; 124 | stringDataToInt(strResult, tempMat, headAttr); 125 | this->trainDataMat = tempMat; 126 | this->vectorAttr = headAttr; 127 | return tempMat; 128 | } 129 | int DTree::stringDataToInt(const vector> &src, MatrixXi &dataMat, vector &headAttrInfo) 130 | { 131 | int matRows = int(src.size()); 132 | int matCols = int(src[0].size()); 133 | for (int j = 0; j < matCols; j++) 134 | { 135 | vector perColStringVector; //每一列的z字符串种类 136 | map oneColMap; 137 | unsigned char indexNum = 0; //这个数用来产生整型的参数值。 138 | Attr perColAttr; 139 | perColAttr.Attribute = src[0][j]; 140 | perColAttr.colIndex = j; 141 | for (int i = 1; i < matRows; i++) 142 | { 143 | if (StringExistInVector(src[i][j], perColStringVector)) 144 | { 145 | dataMat(i - 1, j) = oneColMap[src[i][j]]; 146 | } 147 | else 148 | { 149 | dataMat(i - 1, j) = indexNum; 150 | perColStringVector.push_back(src[i][j]); 151 | oneColMap.insert(map::value_type(src[i][j], indexNum)); 152 | indexNum++; 153 | } 154 | } 155 | perColAttr.typeMap = oneColMap; 156 | perColAttr.typeNum = indexNum; 157 | perColAttr.AttributeValue = perColStringVector; 158 | headAttrInfo.push_back(perColAttr); 159 | } 160 | return 0; 161 | } 162 | 163 | bool DTree::StringExistInVector(string str, vector strVector) 164 | { 165 | int vectorSize = int(strVector.size()); 166 | for (int i = 0; i < vectorSize; i++) 167 | { 168 | if (strVector[i] == str) 169 | { 170 | return true; 171 | } 172 | } 173 | return false; 174 | } 175 | 176 | DTree::TreeNode* DTree::AlgorithmID3(MatrixXi &data, vector &properties) 177 | { 178 | //对矩阵进行计算,包括entropy,informationGain; 179 | //vector entropy; //信息熵 180 | vector informationGain; //信息增益 181 | int maxIndex; //最大信息增益的属性的索引 182 | //entropy = CalculateEntropy(data); 183 | //cout << "dataSize:" << data.size() << endl; 184 | //cout << data << endl; 185 | informationGain = CalculateInfGain(data); 186 | maxIndex = FindMaxInformationGain(informationGain); 187 | if (data.cols() == 2) 188 | { 189 | TreeNode* leaf = new TreeNode; 190 | string label; 191 | label = MostInMatLabel(data, properties); 192 | leaf->Attribute = properties[0].Attribute; 193 | leaf->LeafNode = true; 194 | return leaf; 195 | } 196 | else if (TheSameLabel(data)) 197 | { 198 | TreeNode* leaf = new TreeNode; 199 | int labelIndex = int(properties.size() - 1); 200 | int labelValue = int(data(0, data.cols() - 1)); 201 | string label = FindAttrString(labelValue, properties[labelIndex]); 202 | leaf->Attribute = label; 203 | leaf->LeafNode = true; 204 | return leaf; 205 | } 206 | else 207 | { 208 | //进行递归 209 | TreeNode* branchNode = new TreeNode; 210 | branchNode->Attribute = properties[maxIndex].Attribute; 211 | branchNode->LeafNode = false; 212 | vector tmpAttr = properties; //构建新的属性向量,用于下次 213 | tmpAttr.erase(tmpAttr.begin() + maxIndex); //删除上一个节点的属性。 214 | vector attributeValue = properties[maxIndex].AttributeValue; 215 | //进行分支 216 | 217 | for (size_t i = 0; i < properties[maxIndex].AttributeValue.size(); i++) 218 | { 219 | TreeNode* childNode = new TreeNode; //声明一个孩子节点 220 | string oneAttributeValue = attributeValue[i]; //每一个属性对应的值,字符串。 221 | if (DataExistAttribute(data, properties, maxIndex, oneAttributeValue)) 222 | { 223 | //每一个属性的其中一个取值生成一个分支节点,所以需要将原来矩阵中的这个数值的这个值的样本去掉 224 | MatrixXi subMat; 225 | subMat = GetNewMat(data, properties, maxIndex, oneAttributeValue); 226 | //这里预留位置,进行预剪枝操作, 227 | //预剪枝操作 228 | 229 | childNode = this->AlgorithmID3(subMat, tmpAttr); 230 | branchNode->children.push_back(childNode); 231 | branchNode->AttributeLinkChildren.insert(map::value_type(oneAttributeValue, childNode)); 232 | } 233 | } 234 | //返回分支节点 235 | return branchNode; 236 | } 237 | } 238 | DTree::TreeNode* DTree::AlgorithmC4_5(MatrixXi &data, vector &a) 239 | { 240 | return nullptr; 241 | } 242 | DTree::TreeNode* DTree::AlgorithmCART(MatrixXi &data, vector &a) 243 | { 244 | return nullptr; 245 | } 246 | vector DTree::CalculateInfGain(MatrixXi &data) //计算InformationGain 247 | { 248 | 249 | vector result; 250 | float dataEntropy; //矩阵的熵 251 | dataEntropy = GetDataEntropy(data); 252 | //vector AttrValueNum; 253 | for (int i = 0; i < data.cols() - 1; i++) //只对属性列进行计算,对标签列不计算,标签列已经计算过了。 254 | { 255 | vector attrValue; //每一列数据公有几种类型存储在这里 256 | map attrLinkToLabel; //每种类型对应的信息熵信息,有可能分类相同,有可能分类不同 257 | 258 | for (int j = 0; j < data.rows(); j++) 259 | { 260 | int value = int(data(j, i)); 261 | if (IntExistInVector(value, attrValue) >= 0) 262 | { 263 | int index = IntExistInVector(int(data(j, data.cols() - 1)), attrLinkToLabel[value].labelValue); 264 | if (index == -1) 265 | { 266 | attrLinkToLabel[value].labelValue.push_back(int(data(j, data.cols() - 1))); 267 | attrLinkToLabel[value].labelValueNum.push_back(1); 268 | } 269 | else 270 | { 271 | attrLinkToLabel[value].labelValueNum[index]++; 272 | } 273 | } 274 | else 275 | { 276 | entropyInfo oneAttrEntropyInfo; 277 | attrValue.push_back(value); 278 | oneAttrEntropyInfo.labelValue.push_back(int(data(j, data.cols() - 1))); 279 | oneAttrEntropyInfo.labelValueNum.push_back(1); 280 | attrLinkToLabel.insert(map::value_type(value, oneAttrEntropyInfo)); 281 | } 282 | } 283 | //计算信息熵 284 | float informationGain; //信息熵 285 | informationGain = InformationGain(attrValue, attrLinkToLabel, dataEntropy, data.rows()); 286 | result.push_back(informationGain); 287 | } 288 | return result; 289 | } 290 | 291 | int DTree::FindMaxInformationGain(vector s) 292 | { 293 | int maxIndex = 0; 294 | float max = 0; 295 | for (size_t i = 0; i < s.size(); i++) 296 | { 297 | if (s[i] > max) 298 | { 299 | max = s[i]; 300 | maxIndex = i; 301 | } 302 | } 303 | return maxIndex; 304 | } 305 | bool DTree::TheSameLabel(MatrixXi &data) 306 | { 307 | unsigned char first = data(0, data.cols() - 1); 308 | for (int i = 1; i < data.rows(); i++) 309 | { 310 | if (data(i, data.cols() - 1) != first) 311 | { 312 | return false; 313 | } 314 | } 315 | return true; 316 | } 317 | /* 318 | 获取新的矩阵,将生成一个属性取值的分支节点的数据去掉 319 | */ 320 | MatrixXi DTree::GetNewMat(MatrixXi &data, vector &properties, int maxIndex, string oneAttributeValue) 321 | { 322 | int matCols = data.cols(), matRows = data.rows(); 323 | int dimensionOFAttr = int(properties.size()); 324 | MatrixXi result; //结果矩阵 325 | unsigned char AttrValue = properties[maxIndex].typeMap[oneAttributeValue]; //字符串属性值在矩阵中对应的数值 326 | if (matCols != dimensionOFAttr || maxIndex >= matCols) 327 | { //做一个数据维数的判断,增加健壮性 328 | cerr << "矩阵维数和属性向量维数不对应"; 329 | getchar(); 330 | exit(0); 331 | } 332 | //下面是生成小矩阵的过程。 333 | 334 | for (int i = 0; i < matRows; i++) 335 | { 336 | MatrixXi newRowValue(1, matCols - 1); 337 | if (data(i, maxIndex) == AttrValue) //如果这一行中的元素是字符属性对应的数值执行下面操作。 338 | { 339 | for (int j = 0; j < matCols; j++) 340 | { 341 | if (j < maxIndex) 342 | { 343 | //newRowValue.push_back(data(i, j)); 344 | newRowValue(0, j) = data(i, j); 345 | } 346 | if (j > maxIndex) 347 | { 348 | newRowValue(0, j - 1) = data(i, j); 349 | } 350 | } 351 | //压入数据 352 | //cout << newRowValue << endl; 353 | if (newRowValue.cols() == matCols - 1) 354 | { //按行压入 355 | //result.push_back(newRowValue); 356 | result.conservativeResize(result.rows() + 1, matCols - 1); 357 | result.row(result.rows() - 1) = newRowValue; 358 | //result << newRowValue; 359 | } 360 | else 361 | { 362 | cerr << "在生成小矩阵时,向量维数和矩阵维数不一致"; 363 | exit(0); 364 | } 365 | } 366 | } 367 | return result; 368 | } 369 | 370 | int DTree::IntExistInVector(int a, vector b) 371 | { //如果在里面则返回对应的索引,否则返回-1 372 | for (size_t i = 0; i < b.size(); i++) 373 | { 374 | if (a == b[i]) 375 | { 376 | return i; 377 | } 378 | } 379 | return -1; 380 | } 381 | 382 | float DTree::GetDataEntropy(MatrixXi &data) 383 | { 384 | vector ratio; 385 | vector label; 386 | map labelNum; 387 | int labelCol = data.cols() - 1; 388 | for (int i = 0; i < data.rows(); i++) 389 | { 390 | int value = int(data(i, labelCol)); 391 | if (IntExistInVector(value, label) >= 0) 392 | { 393 | labelNum[value]++; 394 | } 395 | else 396 | { 397 | label.push_back(value); 398 | labelNum.insert(map::value_type(value, 1)); 399 | } 400 | } 401 | for (size_t i = 0; i < label.size(); i++) 402 | { 403 | ratio.push_back(float(labelNum[label[i]]) / float(data.rows())); 404 | 405 | } 406 | return Entropy(ratio); 407 | } 408 | 409 | float DTree::InformationGain(vector value, map b, float dataEntropy, int matRows) 410 | { 411 | float result = 0; 412 | for (size_t i = 0; i < value.size(); i++) 413 | { 414 | int D_v = 0; 415 | vector ratio; 416 | for (size_t j = 0; j < b[value[i]].labelValueNum.size(); j++) 417 | { 418 | D_v = D_v + b[value[i]].labelValueNum[j]; 419 | } 420 | for (size_t j = 0; j < b[value[i]].labelValueNum.size(); j++) 421 | { 422 | ratio.push_back(float(b[value[i]].labelValueNum[j]) / float(D_v)); 423 | } 424 | result = result + float(float(D_v) / float(matRows)) * Entropy(ratio); 425 | 426 | } 427 | result = dataEntropy - result; 428 | return result; 429 | } 430 | 431 | float DTree::Entropy(vector ratio) 432 | { 433 | float result = 0; 434 | for (size_t i = 0; i < ratio.size(); i++) 435 | { 436 | result = result + ratio[i] * log2(ratio[i]); 437 | } 438 | return -result; 439 | } 440 | bool DTree::DataExistAttribute(MatrixXi &data, vector &properties, int maxIndex, string oneAttributeValue) 441 | { 442 | int stringValue = properties[maxIndex].typeMap[oneAttributeValue]; 443 | for (int i = 0; i < data.rows(); i++) 444 | { 445 | int dataValue = int(data(i, maxIndex)); 446 | if (dataValue == stringValue) 447 | { 448 | return true; 449 | } 450 | } 451 | return false; 452 | } 453 | 454 | vector> DTree::ReadPredictedDataFile(string fileAddress) 455 | { //读取带预测数据 456 | ifstream read; 457 | read.open(fileAddress, ios::in); 458 | vector> predictedStringData; 459 | string rowString; 460 | while (getline(read, rowString)) 461 | { 462 | string oneString; 463 | char dim = ','; 464 | istringstream stringIn(rowString); // 465 | vector oneRowString; 466 | while (getline(stringIn, oneString, dim)) 467 | { 468 | oneRowString.push_back(oneString); 469 | } 470 | if (int(oneRowString.size()) == this->trainMatrixInfo.cols - 1) 471 | { 472 | //只存储和训练数据集匹配的数据 473 | predictedStringData.push_back(oneRowString); 474 | } 475 | else 476 | { 477 | cerr << "待预测数据和训练数据集维数不一致" << endl; 478 | getchar(); 479 | exit(0); 480 | } 481 | 482 | } 483 | this->predictedDataMat = predictedStringData; 484 | return predictedStringData; 485 | } 486 | 487 | vector DTree::Predicted(vector> &predictedData) 488 | { 489 | vector result; 490 | //int matCols = int(predictedData[0].size()); 491 | int matRows = int(predictedData.size()); 492 | for (int i = 0; i < matRows; i++) 493 | { 494 | string answer; 495 | answer = PredictedRecursion(this->root, predictedData[i], this->vectorAttr); 496 | result.push_back(answer); 497 | } 498 | return result; 499 | } 500 | 501 | string DTree::PredictedRecursion(TreeNode* nodeAddress, vector &rowData, vector &vecAttr) 502 | { 503 | //预测的递归函数 504 | if (nodeAddress->LeafNode) 505 | { 506 | return nodeAddress->Attribute; 507 | } 508 | else 509 | { 510 | string nodeString = nodeAddress->Attribute; 511 | int attrIndex = IndexOFAttribute(nodeString, vectorAttr); 512 | if (attrIndex >= 0) 513 | { 514 | string attrValue = rowData[attrIndex]; 515 | TreeNode* newRoot; 516 | newRoot = nodeAddress->AttributeLinkChildren[attrValue]; 517 | return PredictedRecursion(newRoot, rowData, vecAttr); 518 | 519 | } 520 | } 521 | return nullptr; 522 | } 523 | 524 | int DTree::IndexOFAttribute(string nodeString, vector &vectorAttr) 525 | { 526 | for (size_t i = 0; i < vectorAttr.size(); i++) 527 | { 528 | if (nodeString == vectorAttr[i].Attribute) 529 | { 530 | return i; 531 | } 532 | } 533 | return -1; 534 | } 535 | 536 | string DTree::FindAttrString(int a, Attr b) 537 | { 538 | for (size_t i = 0; i < b.AttributeValue.size(); i++) 539 | { 540 | string tmp = b.AttributeValue[i]; 541 | if (b.typeMap[tmp] == a) 542 | { 543 | return tmp; 544 | } 545 | } 546 | cout << "查找出错了" << endl; 547 | return nullptr; 548 | } 549 | 550 | struct MostInMatLabeldata 551 | { 552 | int value; 553 | int num; 554 | }; 555 | static int InStructVector(int v, vector b) 556 | { 557 | for (size_t i = 0; i < b.size(); i++) 558 | { 559 | if (v == b[i].value) 560 | { 561 | return i; 562 | } 563 | } 564 | return -1; 565 | } 566 | string DTree::MostInMatLabel(MatrixXi &data, vector &properties) 567 | { 568 | 569 | 570 | int rows = data.rows(); 571 | vector intVec; 572 | for (int i = 0; i < rows; i++) 573 | { 574 | int labelValue = int(data(i, data.cols() - 1)); 575 | int indexOFVec = InStructVector(labelValue, intVec); 576 | if (indexOFVec >= 0) 577 | { 578 | intVec[indexOFVec].num++; 579 | } 580 | else 581 | { 582 | MostInMatLabeldata tmp; 583 | tmp.value = labelValue; 584 | tmp.num = 1; 585 | intVec.push_back(tmp); 586 | } 587 | } 588 | int maxValue = 0, maxNum = 0; 589 | for (size_t i = 0; i < intVec.size(); i++) 590 | { 591 | if (intVec[i].num >= maxNum) 592 | { 593 | maxValue = intVec[i].value; 594 | } 595 | } 596 | string result = FindAttrString(maxValue, properties[properties.size() - 1]); 597 | return result; 598 | } 599 | 600 | int DTree::destroyTree(TreeNode* root) 601 | { 602 | if (root->LeafNode) 603 | { 604 | delete root; 605 | } 606 | else 607 | { 608 | for (size_t i = 0; i < root->children.size(); i++) 609 | { 610 | destroyTree(root->children[i]); 611 | } 612 | } 613 | return 0; 614 | } 615 | 616 | DTree::~DTree() 617 | { 618 | destroyTree(this->root); 619 | } 620 | -------------------------------------------------------------------------------- /C++ source Code/Discrete/DTree.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DTREE_H 2 | #define DTREE_H 3 | 4 | #include 5 | #include //读取文件内容 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | using std::cout; using std::cin; using std::cerr; using std::endl; 13 | using std::string; using std::ifstream; using std::istringstream; 14 | using std::vector; using std::map; using std::ios; 15 | 16 | using Eigen::MatrixXf; //Eigen Matrix float 存储数据 训练数据 17 | using Eigen::MatrixXi; //Eigen Matrix int 存储数据 训练数据和标签 18 | using Eigen::VectorXi; 19 | using Eigen::VectorXf; 20 | 21 | 22 | class DTree 23 | { 24 | public: 25 | struct TreeNode 26 | { //节点信息 27 | string Attribute; //此节点对应的属性 28 | bool LeafNode; //如果是叶子节点,此值反映分类结果。 //其他情况都是0; 29 | vector children; //孩子节点的地址。 30 | map AttributeLinkChildren; //属性指向孩子节点,也就是对应的树形结构中的树枝 31 | 32 | }; 33 | struct Attr //每一列的属性 34 | { 35 | int colIndex; 36 | string Attribute; 37 | int typeNum; //属性取值的个数 38 | vector AttributeValue; 39 | map typeMap; //属性取值对应的整数值; 40 | }; 41 | 42 | private: 43 | struct MatInfo 44 | { 45 | int cols; 46 | int rows; 47 | 48 | }; 49 | struct entropyInfo 50 | { 51 | vector labelValue; 52 | vector labelValueNum; 53 | }; 54 | public: 55 | //MatrixXi trainDataMat; 56 | MatrixXi trainDataMat; 57 | vector> predictedDataMat; 58 | MatInfo trainMatrixInfo; 59 | TreeNode *root; //根节点 60 | vector vectorAttr; //存储所有的矩阵信息,但不存储矩阵。 61 | DTree(); 62 | DTree(string csvfilename); 63 | MatrixXi ReadTrainDataFile(string fileAddress); //数据预处理 64 | //TreeNode* BuildTree(MatrixXi &data, vector &dataAttr, string AlgorithmName); // 指定是哪种算法 65 | int BuildTree(MatrixXi &data, vector &dataAttr, string AlgorithmName); 66 | vector> ReadPredictedDataFile(string fileAddreess); 67 | //vector Predicted(TreeNode* root, vector> &pData); //返回值为int类型表示数据的分类。 68 | vector Predicted(vector> &pData); 69 | ~DTree(); 70 | 71 | private: 72 | int stringDataToInt(const vector> &src, MatrixXi &dataMat, vector &headAttrInfo); 73 | bool StringExistInVector(string aa, vector A); 74 | TreeNode* AlgorithmID3(MatrixXi &data, vector &a); 75 | TreeNode* AlgorithmC4_5(MatrixXi &data, vector &a); 76 | TreeNode* AlgorithmCART(MatrixXi &data, vector &a); 77 | //vector CalculateEntropy(MatrixXi a); 78 | vector CalculateInfGain(MatrixXi &a); 79 | int FindMaxInformationGain(vector s); 80 | bool TheSameLabel(MatrixXi &a); 81 | MatrixXi GetNewMat(MatrixXi &a, vector &properties, int maxIndex, string oneAttributeValue); 82 | int IntExistInVector(int a, vector b); 83 | float GetDataEntropy(MatrixXi &data); 84 | float InformationGain(vector value, map b, float dataEntropy, int rows); 85 | float Entropy(vector ratio); // 计算熵 86 | //判断矩阵中是否有该属性 87 | bool DataExistAttribute(MatrixXi &data, vector &properties, int maxIndex, string oneAttributeValue); 88 | int IndexOFAttribute(string nodeString, vector &vectorAttr); 89 | string PredictedRecursion(TreeNode* nodeAddress, vector &rowData, vector &vecAttr); 90 | string FindAttrString(int a, Attr b); 91 | string MostInMatLabel(MatrixXi &data, vector &properties); 92 | int destroyTree(TreeNode *root); 93 | }; 94 | 95 | #endif -------------------------------------------------------------------------------- /C++ source Code/Discrete/haha2.csv: -------------------------------------------------------------------------------- 1 | type,gender,vage,age,ageg,region,ee,num,cost 2 | B,F,1,18,1,BJ,26.89,20,33973.4 3 | B,F,1,18,1,SH,3.089,2,2167.5 4 | B,F,1,18,1,SZ,3.299,2,2082.5 5 | B,F,1,18,1,CQ,1,0,0 6 | B,F,1,19,1,BJ,31.493,23,36339.2 -------------------------------------------------------------------------------- /C++ source Code/Discrete/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "DTree.hpp" 3 | using std::cout; using std::cin; 4 | int main() 5 | { 6 | 7 | 8 | string fileAddress("./tianqi.csv"); 9 | //cout << "请输入文件的地址:"; 10 | //cin >> fileAddress; 11 | //cout << sizeof(unsigned int) << endl; 12 | DTree myDecisionTree; 13 | myDecisionTree.ReadTrainDataFile(fileAddress); 14 | myDecisionTree.BuildTree(myDecisionTree.trainDataMat, myDecisionTree.vectorAttr, "ID3"); 15 | 16 | vector result; 17 | vector> predictedData; 18 | predictedData = myDecisionTree.ReadPredictedDataFile("pre.csv"); 19 | result = myDecisionTree.Predicted(predictedData); 20 | cout << "预测的结果如下:" << endl; 21 | for (size_t i = 0; i < result.size(); i++) 22 | { 23 | cout << result[i] << endl; 24 | } 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /C++ source Code/Discrete/out.yml: -------------------------------------------------------------------------------- 1 | %YAML:1.0 2 | --- 3 | Attribute: Outlook 4 | typeNum: 3 5 | value : sunny 6 | value : overcast 7 | value : rainy 8 | Attribute: Temperature 9 | typeNum: 12 10 | value : "85" 11 | value : "80" 12 | value : "83" 13 | value : "70" 14 | value : "68" 15 | value : "65" 16 | value : "64" 17 | value : "72" 18 | value : "69" 19 | value : "75" 20 | value : "81" 21 | value : "71" 22 | Attribute: Humidity 23 | typeNum: 10 24 | value : "85" 25 | value : "90" 26 | value : "86" 27 | value : "96" 28 | value : "80" 29 | value : "70" 30 | value : "65" 31 | value : "95" 32 | value : "75" 33 | value : "91" 34 | Attribute: Windy 35 | typeNum: 2 36 | value : FALSE 37 | value : TRUE 38 | Attribute: PlayGolf 39 | typeNum: 2 40 | value : no 41 | value : yes 42 | dataMat: !!opencv-matrix 43 | rows: 14 44 | cols: 5 45 | dt: u 46 | data: [ 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 2, 2, 0, 1, 2, 3, 3, 0, 1, 2, 47 | 4, 4, 0, 1, 2, 5, 5, 1, 0, 1, 6, 6, 1, 1, 0, 7, 7, 0, 0, 0, 8, 5, 48 | 0, 1, 2, 9, 4, 0, 1, 0, 9, 5, 1, 1, 1, 7, 1, 1, 1, 1, 10, 8, 0, 1, 49 | 2, 11, 9, 1, 0 ] 50 | -------------------------------------------------------------------------------- /C++ source Code/Discrete/pre.csv: -------------------------------------------------------------------------------- 1 | sunny,85,85,FALSE 2 | sunny,80,90,TRUE 3 | overcast,83,86,FALSE 4 | rainy,70,96,FALSE 5 | rainy,68,80,FALSE 6 | rainy,65,70,TRUE 7 | overcast,64,65,TRUE 8 | sunny,72,95,FALSE 9 | sunny,69,70,FALSE 10 | rainy,75,80,FALSE 11 | sunny,75,70,TRUE 12 | overcast,72,90,TRUE 13 | overcast,81,75,FALSE 14 | rainy,71,91,TRUE -------------------------------------------------------------------------------- /C++ source Code/Discrete/tianqi.csv: -------------------------------------------------------------------------------- 1 | Outlook,Temperature,Humidity,Windy,PlayGolf 2 | sunny,85,85,FALSE,no 3 | sunny,80,90,TRUE,no 4 | overcast,83,86,FALSE,yes 5 | rainy,70,96,FALSE,yes 6 | rainy,68,80,FALSE,yes 7 | rainy,65,70,TRUE,no 8 | overcast,64,65,TRUE,yes 9 | sunny,72,95,FALSE,no 10 | sunny,69,70,FALSE,yes 11 | rainy,75,80,FALSE,yes 12 | sunny,75,70,TRUE,yes 13 | overcast,72,90,TRUE,yes 14 | overcast,81,75,FALSE,yes 15 | rainy,71,91,TRUE,no 16 | -------------------------------------------------------------------------------- /C++ source Code/data/ContinuousTest.csv: -------------------------------------------------------------------------------- 1 | 4.9,3.1,1.5,0.1,1 2 | 5.4,3.7,1.5,0.2,1 3 | 4.8,3.4,1.6,0.2,1 4 | 5.7,2.8,4.5,1.3,2 5 | 5.8,2.7,4.1,1,2 6 | 6.2,2.2,4.5,1.5,2 7 | 5.6,2.5,3.9,1.1,2 8 | 6.4,2.8,5.6,2.2,3 9 | 6.3,2.8,5.1,1.5,3 10 | 6.1,2.6,5.6,1.4,3 11 | 7.7,3,6.1,2.3,3 12 | 6.3,3.4,5.6,2.4,3 13 | 6.4,3.1,5.5,1.8,3 14 | 6,3,4.8,1.8,3 15 | -------------------------------------------------------------------------------- /C++ source Code/data/ContinuousTrain.csv: -------------------------------------------------------------------------------- 1 | 5.1,3.5,1.4,0.2,1 2 | 4.9,3,1.4,0.2,1 3 | 4.7,3.2,1.3,0.2,1 4 | 4.8,3,1.4,0.1,1 5 | 4.3,3,1.1,0.1,1 6 | 5.8,4,1.2,0.2,1 7 | 5.7,4.4,1.5,0.4,1 8 | 5.4,3.9,1.3,0.4,1 9 | 5.1,3.5,1.4,0.3,1 10 | 5.7,3.8,1.7,0.3,1 11 | 5.1,3.8,1.5,0.3,1 12 | 5.4,3.4,1.7,0.2,1 13 | 5.1,3.7,1.5,0.4,1 14 | 4.6,3.6,1,0.2,1 15 | 5.1,3.3,1.7,0.5,1 16 | 4.8,3.4,1.9,0.2,1 17 | 5,3,1.6,0.2,1 18 | 5,3.4,1.6,0.4,1 19 | 5.2,3.5,1.5,0.2,1 20 | 5.2,3.4,1.4,0.2,1 21 | 4.7,3.2,1.6,0.2,1 22 | 4.8,3.1,1.6,0.2,1 23 | 5.4,3.4,1.5,0.4,1 24 | 5.2,4.1,1.5,0.1,1 25 | 5,3.5,1.3,0.3,1 26 | 4.5,2.3,1.3,0.3,1 27 | 4.4,3.2,1.3,0.2,1 28 | 5,3.5,1.6,0.6,1 29 | 5.1,3.8,1.9,0.4,1 30 | 4.8,3,1.4,0.3,1 31 | 5.1,3.8,1.6,0.2,1 32 | 4.6,3.2,1.4,0.2,1 33 | 5.3,3.7,1.5,0.2,1 34 | 5,3.3,1.4,0.2,1 35 | 7,3.2,4.7,1.4,2 36 | 6.4,3.2,4.5,1.5,2 37 | 6.9,3.1,4.9,1.5,2 38 | 5.5,2.3,4,1.3,2 39 | 6.5,2.8,4.6,1.5,2 40 | 5.9,3.2,4.8,1.8,2 41 | 6.1,2.8,4,1.3,2 42 | 6.3,2.5,4.9,1.5,2 43 | 6.1,2.8,4.7,1.2,2 44 | 6.4,2.9,4.3,1.3,2 45 | 6.6,3,4.4,1.4,2 46 | 6.8,2.8,4.8,1.4,2 47 | 6.7,3,5,1.7,2 48 | 6,2.9,4.5,1.5,2 49 | 5.7,2.6,3.5,1,2 50 | 5.5,2.4,3.8,1.1,2 51 | 5.5,2.4,3.7,1,2 52 | 5.8,2.7,3.9,1.2,2 53 | 6,2.7,5.1,1.6,2 54 | 5.4,3,4.5,1.5,2 55 | 6,3.4,4.5,1.6,2 56 | 6.7,3.1,4.7,1.5,2 57 | 6.3,2.3,4.4,1.3,2 58 | 5.6,3,4.1,1.3,2 59 | 5.5,2.5,4,1.3,2 60 | 7.1,3,5.9,2.1,3 61 | 6.3,2.9,5.6,1.8,3 62 | 6.5,3,5.8,2.2,3 63 | 7.6,3,6.6,2.1,3 64 | 4.9,2.5,4.5,1.7,3 65 | 7.3,2.9,6.3,1.8,3 66 | 6.7,2.5,5.8,1.8,3 67 | 7.2,3.6,6.1,2.5,3 68 | 6.5,3.2,5.1,2,3 69 | 6.4,2.7,5.3,1.9,3 70 | 6.8,3,5.5,2.1,3 71 | 5.7,2.5,5,2,3 72 | 5.8,2.8,5.1,2.4,3 73 | 6.4,3.2,5.3,2.3,3 74 | 6.5,3,5.5,1.8,3 75 | 7.7,3.8,6.7,2.2,3 76 | 7.7,2.6,6.9,2.3,3 77 | 6,2.2,5,1.5,3 78 | 6.9,3.2,5.7,2.3,3 79 | 5.6,2.8,4.9,2,3 80 | 7.9,3.8,6.4,2,3 81 | 6.9,3.1,5.4,2.1,3 82 | 6.7,3.1,5.6,2.4,3 83 | 6.9,3.1,5.1,2.3,3 84 | 5.8,2.7,5.1,1.9,3 85 | 6.8,3.2,5.9,2.3,3 86 | 6.7,3.3,5.7,2.5,3 87 | 6.7,3,5.2,2.3,3 88 | 6.3,2.5,5,1.9,3 89 | 6.5,3,5.2,2,3 90 | 6.2,3.4,5.4,2.3,3 91 | 5.9,3,5.1,1.8,3 92 | -------------------------------------------------------------------------------- /C++ source Code/data/ContinuousValid.csv: -------------------------------------------------------------------------------- 1 | 4.6,3.1,1.5,0.2,1 2 | 5,3.6,1.4,0.3,1 3 | 5.4,3.9,1.7,0.4,1 4 | 4.6,3.4,1.4,0.3,1 5 | 5,3.4,1.5,0.2,1 6 | 4.4,2.9,1.4,0.2,1 7 | 5.5,4.2,1.4,0.2,1 8 | 4.9,3.1,1.5,0.2,1 9 | 5,3.2,1.2,0.2,1 10 | 5.5,3.5,1.3,0.2,1 11 | 4.9,3.6,1.4,0.1,1 12 | 4.4,3,1.3,0.2,1 13 | 5.1,3.4,1.5,0.2,1 14 | 6.3,3.3,4.7,1.6,2 15 | 4.9,2.4,3.3,1,2 16 | 6.6,2.9,4.6,1.3,2 17 | 5.2,2.7,3.9,1.4,2 18 | 5,2,3.5,1,2 19 | 5.9,3,4.2,1.5,2 20 | 6,2.2,4,1,2 21 | 6.1,2.9,4.7,1.4,2 22 | 5.6,2.9,3.6,1.3,2 23 | 6.7,3.1,4.4,1.4,2 24 | 5.6,3,4.5,1.5,2 25 | 5.5,2.6,4.4,1.2,2 26 | 6.1,3,4.6,1.4,2 27 | 5.8,2.6,4,1.2,2 28 | 5,2.3,3.3,1,2 29 | 5.6,2.7,4.2,1.3,2 30 | 5.7,3,4.2,1.2,2 31 | 5.7,2.9,4.2,1.3,2 32 | 6.2,2.9,4.3,1.3,2 33 | 5.1,2.5,3,1.1,2 34 | 5.7,2.8,4.1,1.3,2 35 | 6.3,3.3,6,2.5,3 36 | 5.8,2.7,5.1,1.9,3 37 | 7.7,2.8,6.7,2,3 38 | 6.3,2.7,4.9,1.8,3 39 | 6.7,3.3,5.7,2.1,3 40 | 7.2,3.2,6,1.8,3 41 | 6.2,2.8,4.8,1.8,3 42 | 6.1,3,4.9,1.8,3 43 | 6.4,2.8,5.6,2.1,3 44 | 7.2,3,5.8,1.6,3 45 | 7.4,2.8,6.1,1.9,3 46 | -------------------------------------------------------------------------------- /C++ source Code/data/Newslabel.csv: -------------------------------------------------------------------------------- 1 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 -------------------------------------------------------------------------------- /C++ source Code/data/连续样例数据.csv: -------------------------------------------------------------------------------- 1 | 5.1,3.5,1.4,0.2,1 2 | 4.9,3,1.4,0.2,1 3 | 4.7,3.2,1.3,0.2,1 4 | 4.6,3.1,1.5,0.2,1 5 | 5,3.6,1.4,0.3,1 6 | 5.4,3.9,1.7,0.4,1 7 | 4.6,3.4,1.4,0.3,1 8 | 5,3.4,1.5,0.2,1 9 | 4.4,2.9,1.4,0.2,1 10 | 4.9,3.1,1.5,0.1,1 11 | 5.4,3.7,1.5,0.2,1 12 | 4.8,3.4,1.6,0.2,1 13 | 4.8,3,1.4,0.1,1 14 | 4.3,3,1.1,0.1,1 15 | 5.8,4,1.2,0.2,1 16 | 5.7,4.4,1.5,0.4,1 17 | 5.4,3.9,1.3,0.4,1 18 | 5.1,3.5,1.4,0.3,1 19 | 5.7,3.8,1.7,0.3,1 20 | 5.1,3.8,1.5,0.3,1 21 | 5.4,3.4,1.7,0.2,1 22 | 5.1,3.7,1.5,0.4,1 23 | 4.6,3.6,1,0.2,1 24 | 5.1,3.3,1.7,0.5,1 25 | 4.8,3.4,1.9,0.2,1 26 | 5,3,1.6,0.2,1 27 | 5,3.4,1.6,0.4,1 28 | 5.2,3.5,1.5,0.2,1 29 | 5.2,3.4,1.4,0.2,1 30 | 4.7,3.2,1.6,0.2,1 31 | 4.8,3.1,1.6,0.2,1 32 | 5.4,3.4,1.5,0.4,1 33 | 5.2,4.1,1.5,0.1,1 34 | 5.5,4.2,1.4,0.2,1 35 | 4.9,3.1,1.5,0.2,1 36 | 5,3.2,1.2,0.2,1 37 | 5.5,3.5,1.3,0.2,1 38 | 4.9,3.6,1.4,0.1,1 39 | 4.4,3,1.3,0.2,1 40 | 5.1,3.4,1.5,0.2,1 41 | 5,3.5,1.3,0.3,1 42 | 4.5,2.3,1.3,0.3,1 43 | 4.4,3.2,1.3,0.2,1 44 | 5,3.5,1.6,0.6,1 45 | 5.1,3.8,1.9,0.4,1 46 | 4.8,3,1.4,0.3,1 47 | 5.1,3.8,1.6,0.2,1 48 | 4.6,3.2,1.4,0.2,1 49 | 5.3,3.7,1.5,0.2,1 50 | 5,3.3,1.4,0.2,1 51 | 7,3.2,4.7,1.4,2 52 | 6.4,3.2,4.5,1.5,2 53 | 6.9,3.1,4.9,1.5,2 54 | 5.5,2.3,4,1.3,2 55 | 6.5,2.8,4.6,1.5,2 56 | 5.7,2.8,4.5,1.3,2 57 | 6.3,3.3,4.7,1.6,2 58 | 4.9,2.4,3.3,1,2 59 | 6.6,2.9,4.6,1.3,2 60 | 5.2,2.7,3.9,1.4,2 61 | 5,2,3.5,1,2 62 | 5.9,3,4.2,1.5,2 63 | 6,2.2,4,1,2 64 | 6.1,2.9,4.7,1.4,2 65 | 5.6,2.9,3.6,1.3,2 66 | 6.7,3.1,4.4,1.4,2 67 | 5.6,3,4.5,1.5,2 68 | 5.8,2.7,4.1,1,2 69 | 6.2,2.2,4.5,1.5,2 70 | 5.6,2.5,3.9,1.1,2 71 | 5.9,3.2,4.8,1.8,2 72 | 6.1,2.8,4,1.3,2 73 | 6.3,2.5,4.9,1.5,2 74 | 6.1,2.8,4.7,1.2,2 75 | 6.4,2.9,4.3,1.3,2 76 | 6.6,3,4.4,1.4,2 77 | 6.8,2.8,4.8,1.4,2 78 | 6.7,3,5,1.7,2 79 | 6,2.9,4.5,1.5,2 80 | 5.7,2.6,3.5,1,2 81 | 5.5,2.4,3.8,1.1,2 82 | 5.5,2.4,3.7,1,2 83 | 5.8,2.7,3.9,1.2,2 84 | 6,2.7,5.1,1.6,2 85 | 5.4,3,4.5,1.5,2 86 | 6,3.4,4.5,1.6,2 87 | 6.7,3.1,4.7,1.5,2 88 | 6.3,2.3,4.4,1.3,2 89 | 5.6,3,4.1,1.3,2 90 | 5.5,2.5,4,1.3,2 91 | 5.5,2.6,4.4,1.2,2 92 | 6.1,3,4.6,1.4,2 93 | 5.8,2.6,4,1.2,2 94 | 5,2.3,3.3,1,2 95 | 5.6,2.7,4.2,1.3,2 96 | 5.7,3,4.2,1.2,2 97 | 5.7,2.9,4.2,1.3,2 98 | 6.2,2.9,4.3,1.3,2 99 | 5.1,2.5,3,1.1,2 100 | 5.7,2.8,4.1,1.3,2 101 | 6.3,3.3,6,2.5,3 102 | 5.8,2.7,5.1,1.9,3 103 | 7.1,3,5.9,2.1,3 104 | 6.3,2.9,5.6,1.8,3 105 | 6.5,3,5.8,2.2,3 106 | 7.6,3,6.6,2.1,3 107 | 4.9,2.5,4.5,1.7,3 108 | 7.3,2.9,6.3,1.8,3 109 | 6.7,2.5,5.8,1.8,3 110 | 7.2,3.6,6.1,2.5,3 111 | 6.5,3.2,5.1,2,3 112 | 6.4,2.7,5.3,1.9,3 113 | 6.8,3,5.5,2.1,3 114 | 5.7,2.5,5,2,3 115 | 5.8,2.8,5.1,2.4,3 116 | 6.4,3.2,5.3,2.3,3 117 | 6.5,3,5.5,1.8,3 118 | 7.7,3.8,6.7,2.2,3 119 | 7.7,2.6,6.9,2.3,3 120 | 6,2.2,5,1.5,3 121 | 6.9,3.2,5.7,2.3,3 122 | 5.6,2.8,4.9,2,3 123 | 7.7,2.8,6.7,2,3 124 | 6.3,2.7,4.9,1.8,3 125 | 6.7,3.3,5.7,2.1,3 126 | 7.2,3.2,6,1.8,3 127 | 6.2,2.8,4.8,1.8,3 128 | 6.1,3,4.9,1.8,3 129 | 6.4,2.8,5.6,2.1,3 130 | 7.2,3,5.8,1.6,3 131 | 7.4,2.8,6.1,1.9,3 132 | 7.9,3.8,6.4,2,3 133 | 6.4,2.8,5.6,2.2,3 134 | 6.3,2.8,5.1,1.5,3 135 | 6.1,2.6,5.6,1.4,3 136 | 7.7,3,6.1,2.3,3 137 | 6.3,3.4,5.6,2.4,3 138 | 6.4,3.1,5.5,1.8,3 139 | 6,3,4.8,1.8,3 140 | 6.9,3.1,5.4,2.1,3 141 | 6.7,3.1,5.6,2.4,3 142 | 6.9,3.1,5.1,2.3,3 143 | 5.8,2.7,5.1,1.9,3 144 | 6.8,3.2,5.9,2.3,3 145 | 6.7,3.3,5.7,2.5,3 146 | 6.7,3,5.2,2.3,3 147 | 6.3,2.5,5,1.9,3 148 | 6.5,3,5.2,2,3 149 | 6.2,3.4,5.4,2.3,3 150 | 5.9,3,5.1,1.8,3 151 | -------------------------------------------------------------------------------- /C++ source Code/data/连续样例数据.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/C++ source Code/data/连续样例数据.xlsx -------------------------------------------------------------------------------- /Coninuous_DecisionTree/.~draw.pptx: -------------------------------------------------------------------------------- 1 | liana liana -------------------------------------------------------------------------------- /Coninuous_DecisionTree/CDTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/CDTree.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/Readme.md: -------------------------------------------------------------------------------- 1 | ##写在前面 2 | 这是好久之前遗留的一篇博客,最近要好好谢谢文字,所以把之前落下的补上,欢迎大家批评指正。关于决策树的理论部分,我之前写过一篇博客,同时也实现了决策树的算法[离散型决策树的C++实现](https://blog.csdn.net/luoluonuoyasuolong/article/details/78696829),但是当时的那个实现只能针对训练数据是离散型变量的,不能处理连续型数值。这篇文章是继承上面那一篇文章的,所有的理论部分全部都可以在上一篇文章中看到,这篇文章着重处理连续型变量怎样用决策树处理。所以在读这篇文章之前可以看一看前面那篇,兴许会对决策树本身的算法理解上有很大帮助。 3 | 4 | ## 举个简单的例子 5 | 首先我们要弄清楚,什么是离散型随机变量,什么是连续型随机变量。这个问题其实非常的简单,我们可以举个简单的例子,比如女孩子选择男朋友这件事,我们仅仅举一个简单的例子,这里不对这件事情本身做任何讨论,毕竟感情这比较复杂,而分类器比较简单。好,就拿女孩子选择男朋友这件事,假设每个女孩子在自己的心目中都由一棵选择男孩子的决策树,假设女孩子找男朋友只看中四个标准,1. 帅气程度,2.科研能力 3. 身高 4. 体重。在这个四个指标中,我们就可以看出第一项和第二项是明显的离散型变量,因为帅气程度一般我们就分为:帅到爆,一般般,看得过去,ugly。 6 | ![](./handsome.png) 7 | 而科研能力一般就分为:大神(可以科研带飞型),普通(可以共同学习型),菜鸟(隐藏的大神)。而第三和第四项是明显的连续型变量,身高大致取值是[150-220cm]这个区间的任意值都有可能,体重同样大概取值在[20-100kg]之间。所以决策树在解决离散型和连续型变量时是有很大差异的。原则上决策树并不能处理连续型数据,只能处理离散型数据,为什么呢?因为在决策树中某个属性有几个值就会有几条分支,而连续型变量有无穷多个取值,但决策树不可能有无穷多个分支,所以要想办法将连续型变量进行离散化,这是问题的关键。 8 | 9 | 我们可以看下面一个既有离散型变量,又有连续型变量的例子 10 | ![](./decisiontree.png) 11 | 上图是女孩A心中的一棵与找男朋友有关的决策树,首先女孩子比较看中帅气程度这个属性,然后比较看中科研能力,再然后是身高、体重。大家可以看到这个女孩子对于帅气程度的要求既不能太高也不能太低,所以我第一个就被pass了,为什么呢,这个我就不多解释了,都是泪,看图,这说明了,我们没有缘分。其次,该女孩可能是一位科研大佬,需要另一半也有很强的科研能力才可以。重点是身高和体重,我们看女孩A心中的决策树把身高划分为>180和<180两个离散变量,这就是连续变量离散化的最简单的一种方式。好了,我们要解决的问题就是上面所述那样,在用决策树处理分类问题时同时解决离散型变量和连续型变量。具体在理论上和实际中是怎么处理这样的问题的呢?下面,我们继续讨论。 12 | 13 | ## 理论部分 14 | 这个问题当时我调研了好久,发现很久很久以前就有人做过相关的工作了,我找到了最早的一篇是 15 | [Compression-Based Discretization of Continuous Attributes](1995), 16 | 但实际上我编程用的方法是 17 | 18 | [二分法基于C4.5的机制](1993), 19 | 20 | 1996年也有一篇文章: 21 | 22 | [Finding Optimal Multi-Splits for Numerical Attributes in Decision Tree Learning](1996) 23 | 24 | 还有一篇2003年的文章 25 | 26 | [Numerical Attributes in Decision Tress:A Hierarchical Approach](2003) 27 | 28 | 其中各类树形算法比如XGBoost 29 | 30 | [XGBoost: A Scalable Tree Boosting System](xgboost) 31 | 32 | 都使用了类似的连续属性离散化的方法。不同的方法详细内容可以参考论文,但其实背后的原理都比较类似,就是划分区间,只是不同的方法进行划分的方法不同,标准也不同。总之,最终的结果就是将连续的区间划分为多个区间,然后在某个小区间内的所有数值算是一个类别,还是上面的例子,把身高进行划分,按照某个女孩的标准她可能会将男生的身高分为: 33 | ![](./hight.png) 34 | 当然了,不同的人划分方法是不同的,这就是不同离散算法之间的差异啦。 35 | 36 | ### 二分法 37 | 这篇文章只介绍最简单的一种方法:二分法,后面的编程部分也是实现了这种方法,虽然这个方法比较简单,但是比较好理解,最能说明问题,同时该方法也是著名的C4.5决策树采用的机制,这里的介绍同样是借用了周志华老师的那本西瓜书,有书的同学可以直接看书啦。 38 | 39 | 假设给定样本集D,这个样本集就是有很多男孩子的信息啦,和连续属性hight(身高),假设hight在样本集D中出现了n个不同的取值,将这些值从小到大进行排序,记为$\{h^1,h^2,...h^n\}$。接下来就要在这个数列中找到一个划分t,这个划分将整个数列分为两部分,一部分是t左边的,记为$D^{-}_t$,一部分是t右边的,记为$D^+_t$。关键的问题是怎样取这个划分呢?这个就是二分法的核心:根据信息增益选取划分点。 40 | 41 | 首先将排好序的数列每两个数值算一个平均值,将该平均值作为一个划分 42 | $$ 43 | T = \{t_i=\frac{h^i + h^{i+1}}{2}\mid 1 \leq i \leq n-1\} 44 | $$ 45 | 46 | 然后我们需要找到一个使得信息增益(下面的式子)最大的一个划分$t_j$。 47 | $$ 48 | Gain(D, hight) = \max\limits_{t\in T}Gain(D, hight, t) \\ 49 | =\max\limits_{t\in T} Ent(D) - \sum\limits_{\lambda\in\{-,+\}}\frac{\mid D^{\lambda}_t\mid}{\mid D \mid}Ent(D^{\lambda}_t) 50 | $$ 51 | 这里Ent(D)表示数据集D下的信息熵,这个熵是根据数据集下的标签计算的,具体的计算过程可以参考周志华老师的书,也可以看后面代码部分,这样更容易理解。 52 | 53 | 原理就是这么简单,具体怎么计算呢?我们举个简单的例子,假设有6个男孩子的信息,身高经过排名后分别是 54 | ![](./hight_sort.png) 55 | 生成的5个划分是 56 | ![](./cut.png) 57 | 这里我们省去计算的部分,假设最终计算出来以168.4为切割的信息增益最大,那么我们第一次切割产生的两个区间就是[158.2,168.4]和(168.4, 185]。但是这样也只是产生了两个离散取值,如果连续区间内的取值很多,两个离散取值不能满足我们的要求怎么办呢?不用担心,既然可以解决两个就可以解决多个,古文曾说:一生二,二生三,三生万物,大道至简。 58 | 我们生成了两部分区间后可以分别在某个区间内再进行二分,这样的操作可以一直进行下去,直到你满意为止。 59 | 下图是上面的例子生成的最终三个区间示意图,其实这个过程我们可以理解为二叉树的建立过程,所有的叶子节点都是最终的划分的区间。 60 | ![](./interval_tree.png) 61 | 62 | ## C++代码实现 63 | 开始实践部分,这才是真正遇到的挑战呢,因为在这个过程中我遇到了各种各样的问题,调试了很久的代码才把最终的demo跑通,当然这里面还有很多待完善的内容,后面有时间再慢慢完善吧,但是To be honest,写出来以后就再也没有用心看过它啦,哈哈,懒,太懒。 64 | 65 | 下面的图片是我在写代码过程的总的流程,大致分为3个步骤: 66 | 1. 离散化 67 | 2. 建立树结构 68 | 3. 减枝 69 | 4. 预测 70 | 哦,是4个步骤。 71 | ![](./CDTree.png) 72 | 73 | 值得一提的是,机器学习问题第一个重要的问题是用什么结构存储矩阵,以前我写离散决策树的时候用的是OpenCV的Mat类存储矩阵,确实很方便,但是OpenCV安转起来很麻烦,所以这次我用了另外一个科学计算的C++库:Eign。据说tensorflow的底层计算都是借用这个库,并且这个库只有头文件,不需要安装就可以使用啦,可以说是既方便有高效将,所以这里我用到了Eigen处理矩阵的科学计算部分。 74 | 75 | 怎么跑通我的代码呢? 76 | 这个很简单啦,我的代码只有下面4个接口 77 | 78 | ``` 79 | 80 | CDTree(int deepestTree, int max_bin, float thresholdInfoGain); 81 | int buildTree(const MatrixXf &trainX, const MatrixXi &trainY, const MatrixXf &validateX, const MatrixXi &validateY, string Algorithm); 82 | int buildTree(const MatrixXf &trainX, const MatrixXi &trainY, string Algorithm); 83 | MatrixXi predict(const MatrixXf &testX); 84 | ``` 85 | `CDTree()`是构造函数,需要输入一些参数 86 | `buildTree()`是构建树的接口,有两个实现,其中一种是有验证集的构建,另一种是没有验证集的构建 87 | `predict`是预测函数 88 | 不出意外的话,这个类的输入输出数据都是通过Eigen结构存储的,那数据是怎样读取到Eigen的结构当中的呢?为了方便,我还写了将csv数据读入到Eigen结构中的类 89 | 90 | ``` 91 | template 92 | class RFCSV 93 | { 94 | public: 95 | string csvFileName; 96 | RFCSV() 97 | { 98 | this->csvFileName = ""; 99 | } 100 | RFCSV(string fileName) 101 | { 102 | this->csvFileName = fileName; 103 | } 104 | 105 | std::pair getData(string fileName) 106 | { 107 | 108 | 109 | } 110 | std::pair getData() 111 | { 112 | 113 | } 114 | 115 | template 116 | Type stringToNum(const string& str) 117 | { 118 | 119 | } 120 | 121 | }; 122 | ``` 123 | 124 | 为了节省空间,类的实现没有写出来,文章最后我将源代码放在git上,感兴趣的同学慢慢看。 125 | 126 | 最后,我们看一个完整的样例: 127 | 128 | 主函数是这样的 129 | ``` 130 | #include 131 | #include "CDTree.hpp" 132 | #include "RFCSV.hpp" 133 | #include 134 | using Eigen::MatrixXf; using Eigen::MatrixXi; 135 | int main() 136 | { 137 | 138 | std::pair trainData, testData; 139 | RFCSV readcsv; 140 | trainData = readcsv.getData("../data/ContinuousTrain.csv"); 141 | testData = readcsv.getData("../data/ContinuousTest.csv"); 142 | CDTree myCDTree(4, 3, 0.0001); 143 | myCDTree.buildTree(trainData.first, trainData.second, "ID3"); 144 | MatrixXi predictresult = myCDTree.predict(testData.first); 145 | float accuracy = 0; 146 | for (int i = 0; i < predictresult.size(); i++) 147 | { 148 | if (testData.second(i) == predictresult(i)) 149 | { 150 | accuracy += 1.0 / predictresult.size(); 151 | } 152 | } 153 | cout << "准确率为:" << accuracy * 100 << "\% 你很棒棒哦!" << endl; 154 | } 155 | ``` 156 | 数据样例是这样的 157 | ![](./data.png) 158 | 前面4列是连续属性,最后一列是标签。 159 | 最终的输出结果是: 160 | ![](./result.png) 161 | 162 | 总结:代码中用到了k-means聚类,合成最小区间数,但是这个操作使得算法稳定性极差,我觉得应该采用更加简单的方法解决这个问题,其实离散属性不宜划分的过多,过多的离散值会造成决策树过拟合,所以什么时候停止划分区间这个问题是亟待解决的。 163 | 164 | 最后,遇到了喜欢的女孩子,希望我能契合她心目中的那棵决策树,从树根到数叶,那不是机器学习的过程,是我们相互学习的过程,不契合也没有关系,能喜欢上你已经是万分荣幸啦! 165 | 166 | 掌管天堂的空之王者,于地狱唱响容光之歌! 167 | -------------------------------------------------------------------------------- /Coninuous_DecisionTree/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/cut.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/data.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/decisiontree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/decisiontree.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/draw.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/draw.pptx -------------------------------------------------------------------------------- /Coninuous_DecisionTree/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/example.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/handsome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/handsome.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/hight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/hight.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/hight_sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/hight_sort.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/interval_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/interval_tree.png -------------------------------------------------------------------------------- /Coninuous_DecisionTree/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Coninuous_DecisionTree/result.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/.~draw.pptx: -------------------------------------------------------------------------------- 1 | liana liana -------------------------------------------------------------------------------- /Continuous_DecisionTree/CDTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/CDTree.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/Readme.md: -------------------------------------------------------------------------------- 1 | ##写在前面 2 | 这是好久之前遗留的一篇博客,最近要好好谢谢文字,所以把之前落下的补上,欢迎大家批评指正。关于决策树的理论部分,我之前写过一篇博客,同时也实现了决策树的算法[离散型决策树的C++实现](https://blog.csdn.net/luoluonuoyasuolong/article/details/78696829),但是当时的那个实现只能针对训练数据是离散型变量的,不能处理连续型数值。这篇文章是继承上面那一篇文章的,所有的理论部分全部都可以在上一篇文章中看到,这篇文章着重处理连续型变量怎样用决策树处理。所以在读这篇文章之前可以看一看前面那篇,兴许会对决策树本身的算法理解上有很大帮助。 3 | 4 | ## 举个简单的例子 5 | 首先我们要弄清楚,什么是离散型随机变量,什么是连续型随机变量。这个问题其实非常的简单,我们可以举个简单的例子,比如女孩子选择男朋友这件事,我们仅仅举一个简单的例子,这里不对这件事情本身做任何讨论,毕竟感情这比较复杂,而分类器比较简单。好,就拿女孩子选择男朋友这件事,假设每个女孩子在自己的心目中都由一棵选择男孩子的决策树,假设女孩子找男朋友只看中四个标准,1. 帅气程度,2.科研能力 3. 身高 4. 体重。在这个四个指标中,我们就可以看出第一项和第二项是明显的离散型变量,因为帅气程度一般我们就分为:帅到爆,一般般,看得过去,ugly。 6 | ![](./handsome.png) 7 | 而科研能力一般就分为:大神(可以科研带飞型),普通(可以共同学习型),菜鸟(隐藏的大神)。而第三和第四项是明显的连续型变量,身高大致取值是[150-220cm]这个区间的任意值都有可能,体重同样大概取值在[20-100kg]之间。所以决策树在解决离散型和连续型变量时是有很大差异的。原则上决策树并不能处理连续型数据,只能处理离散型数据,为什么呢?因为在决策树中某个属性有几个值就会有几条分支,而连续型变量有无穷多个取值,但决策树不可能有无穷多个分支,所以要想办法将连续型变量进行离散化,这是问题的关键。 8 | 9 | 我们可以看下面一个既有离散型变量,又有连续型变量的例子 10 | ![](./decisiontree.png) 11 | 上图是女孩A心中的一棵与找男朋友有关的决策树,首先女孩子比较看中帅气程度这个属性,然后比较看中科研能力,再然后是身高、体重。大家可以看到这个女孩子对于帅气程度的要求既不能太高也不能太低,所以我第一个就被pass了,为什么呢,这个我就不多解释了,都是泪,看图,这说明了,我们没有缘分。其次,该女孩可能是一位科研大佬,需要另一半也有很强的科研能力才可以。重点是身高和体重,我们看女孩A心中的决策树把身高划分为>180和<180两个离散变量,这就是连续变量离散化的最简单的一种方式。好了,我们要解决的问题就是上面所述那样,在用决策树处理分类问题时同时解决离散型变量和连续型变量。具体在理论上和实际中是怎么处理这样的问题的呢?下面,我们继续讨论。 12 | 13 | ## 理论部分 14 | 这个问题当时我调研了好久,发现很久很久以前就有人做过相关的工作了,我找到了最早的一篇是 15 | [Compression-Based Discretization of Continuous Attributes](1995), 16 | 但实际上我编程用的方法是 17 | 18 | [二分法基于C4.5的机制](1993), 19 | 20 | 1996年也有一篇文章: 21 | 22 | [Finding Optimal Multi-Splits for Numerical Attributes in Decision Tree Learning](1996) 23 | 24 | 还有一篇2003年的文章 25 | 26 | [Numerical Attributes in Decision Tress:A Hierarchical Approach](2003) 27 | 28 | 其中各类树形算法比如XGBoost 29 | 30 | [XGBoost: A Scalable Tree Boosting System](xgboost) 31 | 32 | 都使用了类似的连续属性离散化的方法。不同的方法详细内容可以参考论文,但其实背后的原理都比较类似,就是划分区间,只是不同的方法进行划分的方法不同,标准也不同。总之,最终的结果就是将连续的区间划分为多个区间,然后在某个小区间内的所有数值算是一个类别,还是上面的例子,把身高进行划分,按照某个女孩的标准她可能会将男生的身高分为: 33 | ![](./hight.png) 34 | 当然了,不同的人划分方法是不同的,这就是不同离散算法之间的差异啦。 35 | 36 | ### 二分法 37 | 这篇文章只介绍最简单的一种方法:二分法,后面的编程部分也是实现了这种方法,虽然这个方法比较简单,但是比较好理解,最能说明问题,同时该方法也是著名的C4.5决策树采用的机制,这里的介绍同样是借用了周志华老师的那本西瓜书,有书的同学可以直接看书啦。 38 | 39 | 假设给定样本集D,这个样本集就是有很多男孩子的信息啦,和连续属性hight(身高),假设hight在样本集D中出现了n个不同的取值,将这些值从小到大进行排序,记为$\{h^1,h^2,...h^n\}$。接下来就要在这个数列中找到一个划分t,这个划分将整个数列分为两部分,一部分是t左边的,记为$D^{-}_t$,一部分是t右边的,记为$D^+_t$。关键的问题是怎样取这个划分呢?这个就是二分法的核心:根据信息增益选取划分点。 40 | 41 | 首先将排好序的数列每两个数值算一个平均值,将该平均值作为一个划分 42 | $$ 43 | T = \{t_i=\frac{h^i + h^{i+1}}{2}\mid 1 \leq i \leq n-1\} 44 | $$ 45 | 46 | 然后我们需要找到一个使得信息增益(下面的式子)最大的一个划分$t_j$。 47 | $$ 48 | Gain(D, hight) = \max\limits_{t\in T}Gain(D, hight, t) \\ 49 | =\max\limits_{t\in T} Ent(D) - \sum\limits_{\lambda\in\{-,+\}}\frac{\mid D^{\lambda}_t\mid}{\mid D \mid}Ent(D^{\lambda}_t) 50 | $$ 51 | 这里Ent(D)表示数据集D下的信息熵,这个熵是根据数据集下的标签计算的,具体的计算过程可以参考周志华老师的书,也可以看后面代码部分,这样更容易理解。 52 | 53 | 原理就是这么简单,具体怎么计算呢?我们举个简单的例子,假设有6个男孩子的信息,身高经过排名后分别是 54 | ![](./hight_sort.png) 55 | 生成的5个划分是 56 | ![](./cut.png) 57 | 这里我们省去计算的部分,假设最终计算出来以168.4为切割的信息增益最大,那么我们第一次切割产生的两个区间就是[158.2,168.4]和(168.4, 185]。但是这样也只是产生了两个离散取值,如果连续区间内的取值很多,两个离散取值不能满足我们的要求怎么办呢?不用担心,既然可以解决两个就可以解决多个,古文曾说:一生二,二生三,三生万物,大道至简。 58 | 我们生成了两部分区间后可以分别在某个区间内再进行二分,这样的操作可以一直进行下去,直到你满意为止。 59 | 下图是上面的例子生成的最终三个区间示意图,其实这个过程我们可以理解为二叉树的建立过程,所有的叶子节点都是最终的划分的区间。 60 | ![](./interval_tree.png) 61 | 62 | ## C++代码实现 63 | 开始实践部分,这才是真正遇到的挑战呢,因为在这个过程中我遇到了各种各样的问题,调试了很久的代码才把最终的demo跑通,当然这里面还有很多待完善的内容,后面有时间再慢慢完善吧,但是To be honest,写出来以后就再也没有用心看过它啦,哈哈,懒,太懒。 64 | 65 | 下面的图片是我在写代码过程的总的流程,大致分为3个步骤: 66 | 1. 离散化 67 | 2. 建立树结构 68 | 3. 减枝 69 | 4. 预测 70 | 哦,是4个步骤。 71 | ![](./CDTree.png) 72 | 73 | 值得一提的是,机器学习问题第一个重要的问题是用什么结构存储矩阵,以前我写离散决策树的时候用的是OpenCV的Mat类存储矩阵,确实很方便,但是OpenCV安转起来很麻烦,所以这次我用了另外一个科学计算的C++库:Eign。据说tensorflow的底层计算都是借用这个库,并且这个库只有头文件,不需要安装就可以使用啦,可以说是既方便有高效将,所以这里我用到了Eigen处理矩阵的科学计算部分。 74 | 75 | 怎么跑通我的代码呢? 76 | 这个很简单啦,我的代码只有下面4个接口 77 | 78 | ``` 79 | 80 | CDTree(int deepestTree, int max_bin, float thresholdInfoGain); 81 | int buildTree(const MatrixXf &trainX, const MatrixXi &trainY, const MatrixXf &validateX, const MatrixXi &validateY, string Algorithm); 82 | int buildTree(const MatrixXf &trainX, const MatrixXi &trainY, string Algorithm); 83 | MatrixXi predict(const MatrixXf &testX); 84 | ``` 85 | `CDTree()`是构造函数,需要输入一些参数 86 | `buildTree()`是构建树的接口,有两个实现,其中一种是有验证集的构建,另一种是没有验证集的构建 87 | `predict`是预测函数 88 | 不出意外的话,这个类的输入输出数据都是通过Eigen结构存储的,那数据是怎样读取到Eigen的结构当中的呢?为了方便,我还写了将csv数据读入到Eigen结构中的类 89 | 90 | ``` 91 | template 92 | class RFCSV 93 | { 94 | public: 95 | string csvFileName; 96 | RFCSV() 97 | { 98 | this->csvFileName = ""; 99 | } 100 | RFCSV(string fileName) 101 | { 102 | this->csvFileName = fileName; 103 | } 104 | 105 | std::pair getData(string fileName) 106 | { 107 | 108 | 109 | } 110 | std::pair getData() 111 | { 112 | 113 | } 114 | 115 | template 116 | Type stringToNum(const string& str) 117 | { 118 | 119 | } 120 | 121 | }; 122 | ``` 123 | 124 | 为了节省空间,类的实现没有写出来,文章最后我将源代码放在git上,感兴趣的同学慢慢看。 125 | 126 | 最后,我们看一个完整的样例: 127 | 128 | 主函数是这样的 129 | ``` 130 | #include 131 | #include "CDTree.hpp" 132 | #include "RFCSV.hpp" 133 | #include 134 | using Eigen::MatrixXf; using Eigen::MatrixXi; 135 | int main() 136 | { 137 | 138 | std::pair trainData, testData; 139 | RFCSV readcsv; 140 | trainData = readcsv.getData("../data/ContinuousTrain.csv"); 141 | testData = readcsv.getData("../data/ContinuousTest.csv"); 142 | CDTree myCDTree(4, 3, 0.0001); 143 | myCDTree.buildTree(trainData.first, trainData.second, "ID3"); 144 | MatrixXi predictresult = myCDTree.predict(testData.first); 145 | float accuracy = 0; 146 | for (int i = 0; i < predictresult.size(); i++) 147 | { 148 | if (testData.second(i) == predictresult(i)) 149 | { 150 | accuracy += 1.0 / predictresult.size(); 151 | } 152 | } 153 | cout << "准确率为:" << accuracy * 100 << "\% 你很棒棒哦!" << endl; 154 | } 155 | ``` 156 | 数据样例是这样的 157 | ![](./data.png) 158 | 前面4列是连续属性,最后一列是标签。 159 | 最终的输出结果是: 160 | ![](./result.png) 161 | 162 | 总结:代码中用到了k-means聚类,合成最小区间数,但是这个操作使得算法稳定性极差,我觉得应该采用更加简单的方法解决这个问题,其实离散属性不宜划分的过多,过多的离散值会造成决策树过拟合,所以什么时候停止划分区间这个问题是亟待解决的。 163 | 164 | 最后,遇到了喜欢的女孩子,希望我能契合她心目中的那棵决策树,从树根到数叶,那不是机器学习的过程,是我们相互学习的过程,不契合也没有关系,能喜欢上你已经是万分荣幸啦! 165 | 166 | 掌管天堂的空之王者,于地狱唱响容光之歌! 167 | -------------------------------------------------------------------------------- /Continuous_DecisionTree/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/cut.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/data.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/decisiontree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/decisiontree.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/draw.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/draw.pptx -------------------------------------------------------------------------------- /Continuous_DecisionTree/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/example.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/handsome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/handsome.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/hight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/hight.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/hight_sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/hight_sort.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/interval_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/interval_tree.png -------------------------------------------------------------------------------- /Continuous_DecisionTree/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Continuous_DecisionTree/result.png -------------------------------------------------------------------------------- /Finding Optimal Decision Trees.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/Finding Optimal Decision Trees.pdf -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2017, 达达 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MachineLearning-DecisionTree 2 | MachineLearning-DecisionTree Algorithm realized by C++ 3 | ## DecisionTree说明文档 4 | ``` 5 | class DedisionTree 6 | { 7 | public: 8 | struct Attr //每一列的属性 9 | { 10 | int colIndex; 11 | string Attribute; 12 | int typeNum; //属性取值的个数 13 | vector AttributeValue; 14 | map typeMap; //属性取值对应的整数值; 15 | }; 16 | struct TreeNode 17 | { //节点信息 18 | string Attribute; //此节点对应的属性 19 | bool LeafNode; //如果是叶子节点,此值反映分类结果。 //其他情况都是0; 20 | vector children; //孩子节点的地址。 21 | map AttributeLinkChildren; 22 | //属性指向孩子节点,也就是对应的树形结构中的树枝 23 | }; 24 | //attributes 25 | cv::Mat trainDataMat; 26 | vector> predictedDataMat; 27 | //MatInfo trainMatrixInfo; 28 | TreeNode *root; //根节点 29 | vector vectorAttr; //存储所有的矩阵信息,但不存储矩阵。 30 | 31 | //functions 32 | DecisionTree(); //默认构造函数 33 | int ReadTrainDataFile(string fileAddress); //数据预处理 34 | TreeNode* BuildTree(cv::Mat &data, vector &dataAttr, string AlgorithmName); 35 | // 指定是哪种算法 36 | vector> ReadPredictedDataFile(string fileAddreess); 37 | vector Predicted(TreeNode* root, vector> &pData); 38 | //返回值为int类型表示数据的分类。 39 | ~DecisionTree(); 40 | } 41 | ``` 42 | **TreeNode** 43 | TreeNode 结构体用来存储树的节点信息, Attribute 是std::string类型的数据用来存储当前节点的属性名称,如果该节点是中间节点(分支节点),那么该值就是对应的属性名称,如果该节点是叶子节点,那么该值就是对应的分类结果。 44 | ** Attr ** 45 | Attr 结构体用来存储每一种属性的信息,包括这种属性有多少种不同的离散值,如下表所示表示根据不同的信息得出是否去打高尔夫的简单数据,以第一列数据为例,第一列表示天气属性,那么这一列信息对应着一个Attr结构,Attribute在这里的值就是Outlook,LeafNode及是标志,是否为叶子节点,如果是叶子节点,那么Attr存储的是最后一行分类的某个结果,比如说yes,children存储的是孩子节点的地址,AttributeLinkChildren存储的是孩子节点和属性值的映射关系,仍然以第一列数据为例,如果Outlook的结果是sunny那么此时指向sunny对应的叶子节点的地址。 46 | ![](./pic/data.png =100x100) 47 | 48 | **trainDataMat** 49 | cv::Mat trainDataMat 存储训练集的数据,此结构由函数ReadTrainDataFile()生成 50 | 51 | **predictedDataMat** 52 | vector> predictedDataMat 存储的是待预测的数据矩阵,此矩阵由vector> ReadPredictedDataFile()函数生成 53 | 54 | **root** 55 | TreeNode *root 该属性存储决策树的根节点地址 56 | 57 | **vectorAttr** 58 | vector vectorAttr; 存储所有的属性信息 59 | 60 | **DecisionTree()** 默认构造函数 61 | 62 | **ReadTrainDataFile()** 63 | int ReadTrainDataFile(string fileAddress) 64 | 此函数执行读取训练数据的功能,输入值为待训练的数据集的地址,数据集的文件要求是必须为csv文件,关于csv文件参考[百度百科](https://baike.baidu.com/item/CSV/10739?fr=aladdin) 并且第一行的属性名称行是不能省略的,如下图的红色部分。此函数内部运行结束直接生成trainDataMat和vectorAttr个数据,这两个数据在后面的操作中非常重要。 65 | ![](./pic/trainData.png) 66 | 67 | **BuildTree()** 68 | TreeNode* BuildTree(cv::Mat &data, vector &dataAttr, string AlgorithmName) 69 | 此函数用于生成决策树,函数的返回值是决策树根节点的地址,需要将此值返回给root属性,留给后面的预测时使用。 70 | * data 是训练集数据,类型为OpenCV中的Mat类型,对应类中的trainDataMat 71 | * dataAttr 是训练数据的属性信息,对应类中的vectorAttr 72 | * AlgorithmName 是需要指定的决策树划分节点属性类型的方法,这个类中只支持ID3、C4_5、和Gini这三种方法。 73 | 74 | **ReadPredictedDataFile()** 75 | vector> ReadPredictedDataFile(string fileAddreess); 76 | 此函数执行读取待预测数据信息的功能,函数输入为待预测的数据,输出为字符串格式的矩阵。同样该文件是csv文件格式,但和ReadTrainDataFile有所差别就是该数据集不需要第一行的属性信息,如果有第一行的属性信息程序可能会出错,同时也不需要最后一列的标签列,对应的该矩阵的列数一定比训练矩阵的列数少1,行数没有限制。此函数输入的文件格式如下图, 77 | ![](./pic/predicted.png) 78 | 79 | **Predicted()** 80 | vector Predicted(TreeNode* root, vector> &pData) 81 | 此函数执行预测的功能,函数的输入参数包括根节点地址root和预测数据矩阵pData。 82 | 83 | ##Example 84 | 下面是简单的应用举例 85 | ### 输入数据说明 86 | 该类的两次输入分别是训练集和预测的测试集,并且都是csv格式的文件,此外目前算法只支持离散数据的分类,对于连续性数据不能使用,且每一列的属性个数不得多于255种,这是因为在程序设计中,每一列的数据个数的这个属性是采用uchar数据类型,所以不能多于255种,当然我们也可以根据自己的实际情况进行更改。程序的执行流程如下图所示 87 | ![](./pic/流程.png) 88 | 89 | ``` 90 | da::DecisionTree myDecisionTree; 91 | //对训练数据进行操作 92 | myDecisionTree.ReadTrainDataFile("data.csv"); 93 | //构建决策树 94 | myDecisionTree.root = myDecisionTree.BuildTree(myDecisionTree.trainDataMat, myDecisionTree.vectorAttr, "ID3"); 95 | // 96 | vector result; 97 | vector> predictedData; 98 | //对带预测数据进行操作 99 | predictedData = myDecisionTree.ReadPredictedDataFile("pre.csv"); 100 | //预测 101 | result = myDecisionTree.Predicted(myDecisionTree.root, predictedData); 102 | ``` 103 | 在最后一步的预测中也可以不额外开辟 predictedData数据,因为在ReadPredictedDataFile()函数执行过程中已经备份一份数据到对象的predictedDataMat属性中,所以按照下面的方法会节省空间和时间 104 | ``result = myDecisionTree.Predicted(myDecisionTree.root, myDecisionTree.predictedDataMat);``直接调用对象中的数据即可。 105 | 106 | **~DecisionTree()** 107 | ~DecisionTree() 为构析函数 108 | 109 | [连续型的决策树](./Continuous_DecisionTree/Readme.md) 110 | -------------------------------------------------------------------------------- /SogouCA.mini.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/SogouCA.mini.tar.gz -------------------------------------------------------------------------------- /SogouCA.mini.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/SogouCA.mini.txt -------------------------------------------------------------------------------- /XGboost.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/XGboost.pdf -------------------------------------------------------------------------------- /how to deal with continuous attribute.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/how to deal with continuous attribute.pdf -------------------------------------------------------------------------------- /pic/data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/pic/data.png -------------------------------------------------------------------------------- /pic/predicted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/pic/predicted.png -------------------------------------------------------------------------------- /pic/trainData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/pic/trainData.png -------------------------------------------------------------------------------- /pic/流程.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/pic/流程.png -------------------------------------------------------------------------------- /ppt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/ppt.pdf -------------------------------------------------------------------------------- /连续数据的决策树.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/连续数据的决策树.png -------------------------------------------------------------------------------- /连续数据的决策树.xmind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PiggyGaGa/MachineLearning-DecisionTree/3c063024405021739509e6cdb3655d5ebf417ebd/连续数据的决策树.xmind --------------------------------------------------------------------------------