mirror of
https://github.com/Doctorado-ML/FImdlp.git
synced 2025-08-17 16:35:52 +00:00
22 lines
463 B
C++
22 lines
463 B
C++
#include "FImdlp.h"
|
|
namespace FImdlp {
|
|
FImdlp::FImdlp()
|
|
{
|
|
}
|
|
FImdlp::~FImdlp()
|
|
{
|
|
}
|
|
samples FImdlp::cutPoints(labels& X, labels& y)
|
|
{
|
|
samples cutPts;
|
|
int i, ant = X.at(0);
|
|
int n = X.size();
|
|
for (i = 1; i < n; i++) {
|
|
if (X.at(i) != ant) {
|
|
cutPts.push_back(precision_t(X.at(i) + ant) / 2);
|
|
ant = X.at(i);
|
|
}
|
|
}
|
|
return cutPts;
|
|
}
|
|
} |