SaveOnDisk

Declaration: TRndForest.SaveOnDisk (FName, Pwd: string; Binary: boolean): integer;
The method SaveOnDisk stores the trained random forest in the file specified by the parameter FName. The parameter Pwd defines the password for encrypting the classifier.1 The parameter Binary controls whether the random forest is stored in readable text format or in encrypted binary form. In general, the binary format should be used except for debugging purposes, as the binary format can be stored and read much faster (by an order of magnitude). The function returns the following error codes:
 0 ... everything is OK, the random forest has been stored
-1 ... the data cannot be stored (for unknown reasons)



1 Classifiers in binary format can be encrypted when storing them on disk, classifiers in text format cannot be encrypted (they are intended for debugging purposes only). Specifying a non-empty password when the parameter Binary is TRUE causes the SaveOnDisk routine to encrypt it.


Last Update: 2019-Jun-19