mirror of
https://github.com/rmontanana/mdlp.git
synced 2025-08-16 07:55:58 +00:00
Update sample
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
Reference in New Issue
Block a user