base

class thefittest.base.EphemeralNode(generator: Callable)

Methods

__call__()

Call self as a function.

class thefittest.base.FunctionalNode(value: Any, sign: str | None = None)
class thefittest.base.Net(inputs: Set | None = None, hidden_layers: List | None = None, outputs: Set | None = None, connects: ndarray[Any, dtype[int64]] | None = None, weights: ndarray[Any, dtype[float64]] | None = None, activs: Dict[int, int] | None = None)

Methods

copy

forward

get_graph

plot

copy() Net
forward(X: ndarray[Any, dtype[float64]], weights: ndarray[Any, dtype[float64]] | None = None) ndarray[Any, dtype[float64]]
get_graph() Dict
plot(ax=None) None
class thefittest.base.TerminalNode(value: Any, name: str)
class thefittest.base.Tree(nodes: List[FunctionalNode | TerminalNode | EphemeralNode], n_args: List[int] | ndarray[Any, dtype[int64]] | None = None)

Methods

__call__()

Call self as a function.

concat

copy

full_growing_method

get_args_id

get_common_region

get_graph

get_levels

get_max_level

growing_method

plot

random_tree

set_terminals

subtree

subtree_id

concat(index: int, other_tree: Tree) Tree
copy() Tree
classmethod full_growing_method(uniset: UniversalSet, max_level: int) Tree
get_args_id(index: int) ndarray[Any, dtype[int64]]
get_common_region(other_trees: List | ndarray[Any, dtype[_ScalarType_co]]) Tuple
get_graph(keep_id: bool = False) Dict
get_levels(index: int) ndarray[Any, dtype[int64]]
get_max_level() int64
classmethod growing_method(uniset: UniversalSet, max_level: int) Tree
plot(ax: Any = None) None
classmethod random_tree(uniset: UniversalSet, max_level: int) Tree
set_terminals(**kwargs: Any) Tree
subtree(index: int) Tree
subtree_id(index: int) Tuple[int, int]
class thefittest.base.UniversalSet(functional_set: Tuple[FunctionalNode, ...], terminal_set: Tuple[TerminalNode | EphemeralNode, ...])
thefittest.base.init_symbolic_regression_uniset(X: ndarray[Any, dtype[float64]], functional_set_names: Tuple[str, ...] = ('cos', 'sin', 'add', 'sub', 'mul', 'div'), ephemeral_node_generators: Tuple[Callable, ...] | None = None)