Module light_labyrinth.utils
The light_labyrinth.utils
module includes tools for controlling e.g.
mid-learning progress reporting and verbosity level.
Expand source code
"""
The `light_labyrinth.utils` module includes tools for controlling e.g.
mid-learning progress reporting and verbosity level.
"""
from ._learning_process import LearningProcess, LearningProcess3D, LearningProcessDynamic
from ._utils import LightLabyrinthLearningHistory, set_random_state
from .._light_labyrinth_c._light_labyrinth_c import LightLabyrinthVerbosityLevel
__all__ = ["LearningProcess", "LearningProcess3D", "LearningProcessDynamic",
"LightLabyrinthLearningHistory", "set_random_state",
"LightLabyrinthVerbosityLevel"]
Functions
def set_random_state(state)
-
Expand source code
def set_random_state(state): _libwrapper._set_random_state(state)
Classes
class LearningProcess
-
Expand source code
class LearningProcess(_LearningProcessBase): def __init__(self): super().__init__("full", "_c_LearningProcess", "free_learning_process")
Ancestors
- light_labyrinth.utils._learning_process._LearningProcessBase
class LearningProcess3D (process_type)
-
Expand source code
class LearningProcess3D(_LearningProcessBase): class ProcessType(Enum): full = 1 multilabel = 2 mixed = 3 def __init__(self, process_type): super().__init__(process_type.name, "_c_LearningProcess_3d", "free_learning_process_3d")
Ancestors
- light_labyrinth.utils._learning_process._LearningProcessBase
Class variables
var ProcessType
-
An enumeration.
class LearningProcessDynamic
-
Expand source code
class LearningProcessDynamic(_LearningProcessBase): def __init__(self, ): super().__init__("full", "_c_LearningProcess_dynamic", "free_learning_process_dynamic")
Ancestors
- light_labyrinth.utils._learning_process._LearningProcessBase
class LightLabyrinthLearningHistory (accs_train, errs_train, accs_val=array([], dtype=float64), errs_val=array([], dtype=float64), calculated=None)
-
Expand source code
class LightLabyrinthLearningHistory: def __init__(self, accs_train, errs_train, accs_val=np.array([]), errs_val=np.array([]), calculated=None): self.accs_train = accs_train self.accs_val = accs_val self.errs_train = errs_train self.errs_val = errs_val if calculated is not None: self.calculated = calculated def to_dict(self): return { "accs_train" : deep_tolist(self.accs_train), "accs_val" : deep_tolist(self.accs_val), "errs_train" : deep_tolist(self.errs_train), "errs_val" : deep_tolist(self.errs_val) }
Methods
def to_dict(self)
-
Expand source code
def to_dict(self): return { "accs_train" : deep_tolist(self.accs_train), "accs_val" : deep_tolist(self.accs_val), "errs_train" : deep_tolist(self.errs_train), "errs_val" : deep_tolist(self.errs_val) }
class LightLabyrinthVerbosityLevel (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
An enumeration.
Expand source code
class LightLabyrinthVerbosityLevel(Enum): Nothing = 0 Basic = 1 # Currently same as 'Full' Full = 2
Ancestors
- enum.Enum
Class variables
var Basic
var Full
var Nothing