eqdisco.models.SymbolicTransformer#

class eqdisco.models.SymbolicTransformer(n_components=2, goal='sammon', population_size=200, generations=40, functions=('add', 'sub', 'mul', 'div', 'sqrt', 'log', 'exp'), init_depth=(1, 3), max_depth=5, selection='tournament', tournament_size=5, p_crossover=0.8, p_high_level=0.3, p_constant=0.2, const_range=(-5.0, 5.0), parsimony=0.0, variable_penalty=0.0, max_samples=200, standardize=True, elitism=1, patience=None, time_limit=None, feature_names=None, random_state=None, verbose=0)[source]#

Bases: _GeneOps, EvolutionaryEstimator, TransformerMixin

Evolve \(k\) explicit features \(z_j=F_j(\mathbf{x})\) for a goal.

Parameters:
n_componentsint, default=2

Number of features \(k\) (2 for a map of the data).

goal{“sammon”, “fisher”, “knn”, “target”} or callable()
  • sammon – preserve the distances of the standardized data (Sammon stress, the features are compared up to a common scale);

  • fisher – separate the classes y (inverse Fisher criterion);

  • knn – leave-one-out error of a 5-nearest-neighbour classifier of y in the feature space;

  • target – predict the target y by a linear model of the features (goal-oriented projection for soft sensors);

  • callable cost(Z, X, y) -> float to minimize.

variable_penaltyfloat, default=0.0

Cost per distinct input variable used (feature selection pressure).

max_samplesint, default=200

Samples used to evaluate distance-based goals.

The evolutionary parameters are those of :class:`MultiGeneRegressor`.
Attributes:
equations_list of Equation

The \(k\) features.

history_pandas.DataFrame
transform(X)[source]#

Feature values; standardized with the training mean and scale if standardize.