The updating is done in two steps:
PMMLlib p ( fileName, log ); # Set the model p.SetCurrentModel( modelName, modelType ); # Delete the XML node of the model p.UnlinkNode( ); # Recreate the model with new parameters p.AddRegressionModel(« monModele », PMMLlib::kREGRESSION, « regression » ); p.AddDataField( ….); # Save the PMML file p.Write( );
It is done in two steps:
PMMLlib p ( fileName, log ); # Set the model p.SetCurrentModel( « monModele », modelType ); # Save the model in a new XML node p.BackupNode( ); # Modify p.AddRegressionModel(« monModele », PMMLlib::kREGRESSION, « regression » ); p.AddDataField( ….); # Save the PMML file p.Write( );
PMMLlib p ( fileName, log ); # Create the model p.AddRegressionModel(« monModele », PMMLlib::kREGRESSION, « regression » ); p.AddDataField( ….); # Save the PMML file p.Write( );
P = PMMLlib( fileName, log ); p.SetCurrentModel( modelName, modelType ); pyStrCode = p.ExportPythonStr( « myPyFunc », « function header » ); exec pyStrCode; # Eval myPyFunc which is now known as a python function inputs = [1.,2.,3.,4.] res = myPyFunc(inputs)