Declaration: TRndForest.LoadModel (FName, Pwd: string): integer;
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:
  1. Assume the RF model is not encrypted and try to read it.
  2. Try to read the model using the license ID of the current user.
  3. Assume the RF model has been bound to a license group and try all groups of the current user.
  4. 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
-1 ... cannot find or read the file
-2 ... the specified file does not contain a valid random forest
-3 ... the file cannot be decrypted
Please note that in the case of any error the random forest instance remains in an undefined state.