hi!
By following your suggestion, i successfully serialized the model to txt.
I didnot find any demo code in guidebook, is it correct to use dfunserialize function following the code below?
i use C++ to finish this work
Code:
string loadModel(string serializedModelFileStringFormatPath) {
ifstream serializedModelFile(serializedModelFileStringFormatPath);
if (!serializedModelFile.is_open()) {
cout << cannot open serialized data" << endl;
return "cannot open serialized data";
}
ostringstream tmp;
tmp << serializedModelFile.rdbuf();
string data = tmp.str();
serializedModelFile.close();
return data;
}
int main(
string inModelFilePath = "c:/test/inmodel.txt";
string modelContent = loadModel(inModelFilePath);
decisionforest model;
dfunserialize(modelContent, model);
double esti = dfprocess0(model, rowItem);
{
I would appreciate a lot!!
shaos