Update sample

This commit is contained in:
2023-03-14 11:36:38 +01:00
parent ed7433672d
commit 770502c8e5

View File

@@ -174,18 +174,10 @@ int main(int argc, char** argv)
process_all_files(datasets, path, max_depth, min_length, max_cutpoints); process_all_files(datasets, path, max_depth, min_length, max_cutpoints);
else { else {
process_file(path, file_name, datasets[file_name], max_depth, min_length, max_cutpoints); process_file(path, file_name, datasets[file_name], max_depth, min_length, max_cutpoints);
cout << "File name: " << file_name << endl; cout << "File name ....: " << file_name << endl;
cout << "Max depth: " << max_depth << endl; cout << "Max depth ....: " << max_depth << endl;
cout << "Min length: " << min_length << endl; cout << "Min length ...: " << min_length << endl;
} cout << "Max cutpoints : " << max_cutpoints << endl;
mdlp::CPPFImdlp test = mdlp::CPPFImdlp(min_length, max_depth, max_cutpoints);
samples_t X = { 4.7, 4.7, 4.7, 4.7, 4.8, 4.8, 4.8, 4.8, 4.9, 4.95, 5.7, 5.3, 5.2, 5.1, 5.0, 5.6, 5.1, 6.0, 5.1, 5.9 };
labels_t y = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 };
test.fit(X, y);
vector<precision_t> computed = test.getCutPoints();
cout << "Computed cut points: " << endl;
for (auto item : computed) {
cout << item << endl;
} }
return 0; return 0;
} }