lale.lib.autogen.nu_svc module¶
- class lale.lib.autogen.nu_svc.NuSVC(*, nu=0.5, kernel='rbf', degree=3, gamma='scale', coef0=0.0, shrinking=True, probability=False, tol=0.001, cache_size=200, class_weight='balanced', verbose=False, max_iter=-1, decision_function_shape='ovr', break_ties=False, random_state=None)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
nu (float, not for optimizer, default 0.5) – An upper bound on the fraction of training errors and a lower bound of the fraction of support vectors
kernel (‘linear’, ‘poly’, ‘precomputed’, ‘sigmoid’, or ‘rbf’, default ‘rbf’) – Specifies the kernel type to be used in the algorithm
degree (integer, >=2 for optimizer, <=3 for optimizer, uniform distribution, default 3) – Degree of the polynomial kernel function (‘poly’)
gamma (union type, default 'scale') –
Kernel coefficient for ‘rbf’, ‘poly’ and ‘sigmoid’
float, not for optimizer
or ‘scale’ or ‘auto’
coef0 (float, not for optimizer, default 0.0) – Independent term in kernel function
shrinking (boolean, default True) – Whether to use the shrinking heuristic.
probability (boolean, default False) – Whether to enable probability estimates
tol (float, >=1e-08 for optimizer, <=0.01 for optimizer, default 0.001) – Tolerance for stopping criterion.
cache_size (float, >=0.0 for optimizer, <=1.0 for optimizer, uniform distribution, default 200) – Specify the size of the kernel cache (in MB).
class_weight (‘dict’ or ‘balanced’, not for optimizer, default ‘balanced’) – Set the parameter C of class i to class_weight[i]*C for SVC
verbose (boolean, not for optimizer, default False) – Enable verbose output
max_iter (integer, >=10 for optimizer, <=1000 for optimizer, uniform distribution, default -1) – Hard limit on iterations within solver, or -1 for no limit.
decision_function_shape (‘ovr’ or ‘ovo’, default ‘ovr’) – Whether to return a one-vs-rest (‘ovr’) decision function of shape (n_samples, n_classes) as all other classifiers, or the original one-vs-one (‘ovo’) decision function of libsvm which has shape (n_samples, n_classes * (n_classes - 1) / 2)
break_ties (boolean, not for optimizer, default False) – If true, decision_function_shape=’ovr’, and number of classes > 2, predict will break ties according to the confidence values of decision_function; otherwise the first class among the tied classes is returned.
random_state (union type, not for optimizer, default None) –
The seed of the pseudo random number generator used when shuffling the data for probability estimates
integer
or numpy.random.RandomState
or None
Notes
constraint-1 : any type
- 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 (array of items : array of items : float) –
- Returns
result – Returns the decision function of the sample for each class in the model
- 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 vectors, where n_samples is the number of samples and n_features is the number of features
y (array of items : float) – Target values (class labels in classification, real numbers in regression)
sample_weight (array, optional of items : float) – Per-sample weights
- 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 (array of items : array of items : float) – For kernel=”precomputed”, the expected shape of X is [n_samples_test, n_samples_train]
- Returns
result – Class labels for samples in X.
- 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) – For kernel=”precomputed”, the expected shape of X is [n_samples_test, n_samples_train]
- Returns
result – Returns the probability of the sample for each class in the model
- Return type
array of items : array of items : float