cPMML
cPMML copied to clipboard
Is isotonice supported ?
Hi, I am trying to read pmml file for isotonic regressions and I am getting 0 predicted value for any inputs.
here is my c++ code. the pmml file already verified it is working with jpmml evaluator,
#include <iostream>
#include <unordered_map>
#include "cPMML.h"
template<typename K, typename V>
void print_map(std::unordered_map<K, V> const &m)
{
for (auto const &pair: m) {
std::cout << "{" << pair.first << ": " << pair.second << "}\n";
}
}
// using namespace std;
int main() {
std::string model_filepath = "calib_isotonic_model.xml";
cpmml::Model model(model_filepath);
std::unordered_map<std::string, std::string> sample = {
{"prob_pred","16000000"}
};
print_map(sample);
std::cout << "score: " << model.predict(sample) << std::endl;
return 0;
}