lale.lib.autogen.linear_discriminant_analysis module¶
- class lale.lib.autogen.linear_discriminant_analysis.LinearDiscriminantAnalysis(*, solver='svd', shrinkage=None, priors=None, n_components=None, store_covariance=False, tol=0.0001, covariance_estimator=None)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
solver (‘eigen’, ‘lsqr’, or ‘svd’, default ‘svd’) –
Solver to use, possible values: - ‘svd’: Singular value decomposition (default)
See also constraint-1, constraint-2, constraint-3, constraint-4, constraint-4.
shrinkage (union type, default None) –
Shrinkage parameter, possible values: - None: no shrinkage (default)
’auto’
or float, >0, >=0 for optimizer, <1, <=1 for optimizer, uniform distribution
or None
See also constraint-1, constraint-4.
priors (None, not for optimizer, default None) – Class priors.
n_components (union type, default None) –
Number of components (< n_classes - 1) for dimensionality reduction.
integer, >=2 for optimizer, <=’X/items/maxItems’, <=256 for optimizer, uniform distribution
or None
store_covariance (boolean, not for optimizer, default False) –
Additionally compute class covariance matrix (default False), used only in ‘svd’ solver
See also constraint-2.
tol (float, >=1e-08 for optimizer, <=0.01 for optimizer, default 0.0001) – Threshold used for rank estimation in SVD solver
covariance_estimator (union type, optional, not for optimizer, default None) –
type of (covariance estimator). Estimate the covariance matrices instead of relying on the empirical covariance estimator (with potential shrinkage)
string, not for optimizer
or None
See also constraint-3, constraint-4.
Notes
constraint-1 : union type
shrinkage, only with ‘lsqr’ and ‘eigen’ solvers
shrinkage : None
or solver : ‘lsqr’ or ‘eigen’
constraint-2 : union type
store_covariance, only in ‘svd’ solver
store_covariance : False
or solver : ‘svd’
constraint-3 : union type
covariance estimator is not supported with svd solver. Try another solver
solver : negated type of ‘svd’
or covariance_estimator : None
constraint-4 : union type
covariance_estimator and shrinkage parameters are not None. Only one of the two can be set.
solver : ‘svd’ or ‘lsqr’
or solver : negated type of ‘eigen’
or covariance_estimator : None
or shrinkage : None or 0
- decision_function(X)¶
Confidence scores for all classes.
Note: The decision_function method is not available until this operator is trained.
Once this method is available, it will have the following signature:
- Parameters
X (union type) –
Samples.
array of items : Any
or array of items : array of items : float
- Returns
result – Confidence scores per (sample, class) combination
- Return type
Any
- 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.
y (array of items : float) – Target values.
- predict(X, **predict_params)¶
Make predictions.
Note: The predict method is not available until this operator is trained.
Once this method is available, it will have the following signature:
- Parameters
X (union type) –
Samples.
array of items : Any
or array of items : array of items : float
- Returns
result – Predicted class label per sample.
- Return type
array of items : float
- predict_proba(X)¶
Probability estimates for all classes.
Note: The predict_proba 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) – Input data.
- Returns
result – Estimated probabilities.
- Return type
array of items : array of items : float
- 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) – Input data.
- Returns
result – Transformed data.
- Return type
array of items : array of items : float