Skip to content

Is isotonice supported ? #10

@EagleDangar

Description

@EagleDangar

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions