srlearn.system_manager.FileSystem¶

class srlearn.system_manager.FileSystem[source]¶

BoostSRL File System

BoostSRL has an implicit assumption that it has access to a file system. At runtime it needs to both read and write with files. This object provides a view into the files needed, requests files from the operating system, and (most importantly) prepares and cleans up the file system at allocation/de-allocation time.

Notes

Ideally, each instance of a srlearn.rdn.BoostedRDN should have its own directory where it can operate independently. But this can be problematic and will often lead to duplicated data and other problems if multiple models are learned in parallel on the same database.

Another option (which may be more suited to parallel tree learning) would be to store data in a single location, but write the log files and models to separate locations.

Examples

This first example may not appear to do much, but behind the scenes it is creating directories for each instance of FileSystem, and removing them upon exit().

>>> from srlearn.system_manager import FileSystem
>>> systems = []
>>> for _ in range(5):
...     systems.append(FileSystem())
Attributes
filesenum.Enum

Enum providing key,value pairs for a BoostSRL database

__init__()[source]¶

Initialize a BoostSRL File System.

This will create directories that are cleaned up when the instance is de-allocated.