LoadFromDisk

Declaration: TRndForest.LoadFromDisk (FName, Pwd: string): integer;
The method LoadFromDisk reads the file specified by FName and loads the random forest class with a trained classifier. For binary (encrypted) files you need to specify a password in the parameter Pwd in order to be able to load the classifier. If Pwd is left empty the method assumes that the classifier is not encrypted.

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 (binary) file cannot be decrypted
Please note that in the case of any error the random forest instance remains in an undefined state.

Hint 1: Please note that binary classifier files load much faster than text classifier files (see SaveOnDisk for more).

Hint 2: RF models which have been encrypted using the encryption tool of Epina ImageLab have be loaded by the method LoadModel.