lale.lib.autogen.additive_chi2_sampler module

class lale.lib.autogen.additive_chi2_sampler.AdditiveChi2Sampler(*, sample_steps=2, sample_interval=None)

Bases: PlannedIndividualOp

Combined schema for expected data and hyperparameters.

This documentation is auto-generated from JSON schemas.

Parameters
  • sample_steps (integer, >=1 for optimizer, <=5 for optimizer, uniform distribution, default 2) –

    Gives the number of (complex) sampling points.

    See also constraint-1.

  • sample_interval (union type, default None) –

    Sampling interval

    • float, >=0.1 for optimizer, <=1.0 for optimizer, uniform distribution

    • or None

    See also constraint-1.

Notes

constraint-1 : union type

From /kernel_approximation.py:AdditiveChi2Sampler:fit, Exception: raise ValueError( ‘If sample_steps is not in [1, 2, 3], you need to provide sample_interval’)

  • sample_interval : negated type of None

  • or sample_steps : 1, 2, or 3

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters

X (array of items : array of items : float) – Training data, where n_samples in the number of samples and n_features is the number of features.

transform(X, y=None)

Transform the data.

Note: The transform method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (array of items : array of items : float) –

Returns

result – Whether the return value is an array of sparse matrix depends on the type of the input X.

Return type

Any