The method LoadModel loads any kind of random forest model from the file FName (unencrypted, encrypted and bound models, see the section Encryption of a Random Forest Model for details). This happens by performing several attempts in the following order until the loading of the model is successful:
- Assume the RF model is not encrypted and try to read it.
- Try to read the model using the license ID of the current user.
- Assume the RF model has been bound to a license group and try all groups of the current user.
- Try to read it using the password specified in the parameter Pwd.
The function returns the following error codes:
0 ... everything is OK, the random forest has been loaded
Please note that in the case of any error the random forest instance remains in an undefined state.
-1 ... cannot find or read the file
-2 ... the specified file does not contain a valid random forest
-3 ... the file cannot be decrypted