mirror of
https://github.com/Doctorado-ML/FImdlp.git
synced 2025-08-19 01:15:51 +00:00
Refactor tests
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
#include "FImdlp.h"
|
||||
namespace FImdlp
|
||||
{
|
||||
namespace FImdlp {
|
||||
FImdlp::FImdlp()
|
||||
{
|
||||
}
|
||||
FImdlp::~FImdlp()
|
||||
{
|
||||
}
|
||||
std::vector<float> FImdlp::cutPoints(std::vector<int> &X, std::vector<int> &y)
|
||||
samples FImdlp::cutPoints(labels& X, labels& y)
|
||||
{
|
||||
std::vector<float> cutPts;
|
||||
samples cutPts;
|
||||
int i, ant = X.at(0);
|
||||
int n = X.size();
|
||||
for (i = 1; i < n; i++)
|
||||
{
|
||||
if (X.at(i) != ant)
|
||||
{
|
||||
for (i = 1; i < n; i++) {
|
||||
if (X.at(i) != ant) {
|
||||
cutPts.push_back(float(X.at(i) + ant) / 2);
|
||||
ant = X.at(i);
|
||||
}
|
||||
|
@@ -2,14 +2,12 @@
|
||||
#define FIMDLP_H
|
||||
#include <vector>
|
||||
#include <Python.h>
|
||||
namespace FImdlp
|
||||
{
|
||||
class FImdlp
|
||||
{
|
||||
namespace FImdlp {
|
||||
class FImdlp {
|
||||
public:
|
||||
FImdlp();
|
||||
~FImdlp();
|
||||
std::vector<float> cutPoints(std::vector<int> &, std::vector<int> &);
|
||||
samples cutPoints(labels&, labels&);
|
||||
};
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user