classifiers
- class thefittest.classifiers.GeneticProgrammingClassifier(*, n_iter: int = 300, pop_size: int = 1000, functional_set_names: ~typing.Tuple[str, ...] = ('cos', 'sin', 'add', 'sub', 'mul', 'div'), optimizer: ~typing.Type[~thefittest.optimizers._selfcgp.SelfCGP] | ~typing.Type[~thefittest.optimizers._geneticprogramming.GeneticProgramming] = <class 'thefittest.optimizers._selfcgp.SelfCGP'>, optimizer_args: dict[str, ~typing.Any] | None = None, random_state: int | ~numpy.random.mtrand.RandomState | None = None, use_fitness_cache: bool = False)
- predict(X: ndarray[tuple[Any, ...], dtype[float64]])
- predict_proba(X: ndarray[tuple[Any, ...], dtype[float64]])
- set_score_request(*, sample_weight: bool | None | str = '$UNCHANGED$') GeneticProgrammingClassifier
Configure whether metadata should be requested to be passed to the
scoremethod.Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with
enable_metadata_routing=True(seesklearn.set_config()). Please check the User Guide on how the routing mechanism works.The options for each parameter are:
True: metadata is requested, and passed toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.Added in version 1.3.
- Parameters:
- sample_weightstr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED
Metadata routing for
sample_weightparameter inscore.
- Returns:
- selfobject
The updated object.
- class thefittest.classifiers.GeneticProgrammingNeuralNetClassifier(*, n_iter: int = 15, pop_size: int = 50, input_block_size: int = 1, max_hidden_block_size: int = 9, offset: bool = True, test_sample_ratio: float = 0.5, optimizer: ~typing.Type[~thefittest.optimizers._selfcgp.SelfCGP] | ~typing.Type[~thefittest.optimizers._geneticprogramming.GeneticProgramming] = <class 'thefittest.optimizers._selfcgp.SelfCGP'>, optimizer_args: dict[str, ~typing.Any] | None = None, weights_optimizer: ~typing.Type[~thefittest.optimizers._differentialevolution.DifferentialEvolution] | ~typing.Type[~thefittest.optimizers._jde.jDE] | ~typing.Type[~thefittest.optimizers._shade.SHADE] | ~typing.Type[~thefittest.optimizers._geneticalgorithm.GeneticAlgorithm] | ~typing.Type[~thefittest.optimizers._selfcga.SelfCGA] | ~typing.Type[~thefittest.optimizers._shaga.SHAGA] | ~typing.Type[~torch.optim.optimizer.Optimizer] = <class 'thefittest.optimizers._shade.SHADE'>, weights_optimizer_args: dict[str, ~typing.Any] | None = None, net_size_penalty: float = 0.0, random_state: int | ~numpy.random.mtrand.RandomState | None = None, device: str = 'cpu', use_fitness_cache: bool = False, fitness_cache_size: int = 1000)
- predict(X: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])
- predict_proba(X: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) ndarray[tuple[Any, ...], dtype[float64]]
- set_score_request(*, sample_weight: bool | None | str = '$UNCHANGED$') GeneticProgrammingNeuralNetClassifier
Configure whether metadata should be requested to be passed to the
scoremethod.Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with
enable_metadata_routing=True(seesklearn.set_config()). Please check the User Guide on how the routing mechanism works.The options for each parameter are:
True: metadata is requested, and passed toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.Added in version 1.3.
- Parameters:
- sample_weightstr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED
Metadata routing for
sample_weightparameter inscore.
- Returns:
- selfobject
The updated object.
- class thefittest.classifiers.MLPEAClassifier(*, n_iter: int = 100, pop_size: int = 500, hidden_layers: ~typing.Tuple[int, ...] = (0, ), activation: str = 'sigma', offset: bool = True, weights_optimizer: ~typing.Type[~thefittest.optimizers._differentialevolution.DifferentialEvolution] | ~typing.Type[~thefittest.optimizers._jde.jDE] | ~typing.Type[~thefittest.optimizers._shade.SHADE] | ~typing.Type[~thefittest.optimizers._geneticalgorithm.GeneticAlgorithm] | ~typing.Type[~thefittest.optimizers._selfcga.SelfCGA] | ~typing.Type[~thefittest.optimizers._shaga.SHAGA] | ~typing.Type[~torch.optim.optimizer.Optimizer] = <class 'thefittest.optimizers._shade.SHADE'>, weights_optimizer_args: dict[str, ~typing.Any] | None = None, random_state: int | ~numpy.random.mtrand.RandomState | None = None, device: str = 'cpu')
- predict(X: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])
- predict_proba(X: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) ndarray[tuple[Any, ...], dtype[float64]]
- set_score_request(*, sample_weight: bool | None | str = '$UNCHANGED$') MLPEAClassifier
Configure whether metadata should be requested to be passed to the
scoremethod.Note that this method is only relevant when this estimator is used as a sub-estimator within a meta-estimator and metadata routing is enabled with
enable_metadata_routing=True(seesklearn.set_config()). Please check the User Guide on how the routing mechanism works.The options for each parameter are:
True: metadata is requested, and passed toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.Added in version 1.3.
- Parameters:
- sample_weightstr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED
Metadata routing for
sample_weightparameter inscore.
- Returns:
- selfobject
The updated object.