Skip to content

Commit

Permalink
Merge pull request #3 from DEIS-Tools/prepare-1.0.8
Browse files Browse the repository at this point in the history
Prepare 1.0.8
  • Loading branch information
petergjoel authored Sep 10, 2021
2 parents dc79aac + 4668278 commit 65df567
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
*.exe
*.out
*.app
/build/
7 changes: 3 additions & 4 deletions src/MLearning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ namespace prlearn {
_nodes[rnd].update(rnd, minimization, clouds, _nodes, dimen, false, delta, options);
}

qvar_t MLearning::lookup(size_t label, const double* f_var, size_t dimen) const {
qvar_t MLearning::lookup(size_t label, const double* f_var, size_t) const {
for (auto& el : _mapping) {
if (el._label == label) {
auto n = _nodes[el._nid].find_node(_nodes, f_var, el._nid);
Expand All @@ -176,7 +176,7 @@ namespace prlearn {
return qvar_t(std::numeric_limits<double>::quiet_NaN(), 0.0, 0.0);
}

void MLearning::print(std::ostream& s, size_t tabs, std::map<size_t, size_t>& edge_map, const std::vector<MLearning>& clouds) const {
void MLearning::print(std::ostream& s, size_t tabs, std::map<size_t, size_t>& edge_map, const std::vector<MLearning>&) const {
s << std::setprecision (std::numeric_limits<double>::digits10 + 1);
for (size_t i = 0; i < tabs; ++i) s << "\t";
s << "{";
Expand Down Expand Up @@ -225,9 +225,8 @@ namespace prlearn {
}
}

void MLearning::update(const std::vector<MLearning>& clouds, bool minimization)
void MLearning::update(const std::vector<MLearning>&, bool)
{
std::cerr << "SIZE " << this << " " << _nodes.size() << std::endl;
}

std::unique_ptr<size_t[] > MLearning::findIntersection(const double* point) const {
Expand Down
2 changes: 1 addition & 1 deletion src/RefinementTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace prlearn {
}

qvar_t
RefinementTree::lookup(size_t label, const double* point, size_t dimen) const {
RefinementTree::lookup(size_t label, const double* point, size_t) const {
el_t lf(label);
auto res = std::lower_bound(std::begin(_mapping), std::end(_mapping), lf);
if (res == std::end(_mapping) || res->_label != label)
Expand Down
6 changes: 3 additions & 3 deletions src/SimpleRegressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace prlearn {
auto res = std::lower_bound(std::begin(_labels), std::end(_labels), lf);

if (res != std::end(_labels) && res->_label == label)
return res->_value;
return qvar_t{res->_value.avg(), (double)res->_cnt, res->_value._variance};
else
return qvar_t{std::numeric_limits<double>::quiet_NaN(), 0, 0};
}
Expand Down Expand Up @@ -109,9 +109,9 @@ namespace prlearn {
el_t(size_t label, double d) : _label(label) {
_value += d;
};
size_t _label;
size_t _label = 0;
qvar_t _value;
size_t _cnt;
size_t _cnt = 0;

bool operator<(const el_t& other) const {
return _label < other._label;
Expand Down

0 comments on commit 65df567

Please sign in to comment.