snowflake.ml.modeling.svm.NuSVR¶
- class snowflake.ml.modeling.svm.NuSVR(*, nu=0.5, C=1.0, kernel='rbf', degree=3, gamma='scale', coef0=0.0, shrinking=True, tol=0.001, cache_size=200, verbose=False, max_iter=- 1, input_cols: Optional[Union[str, Iterable[str]]] = None, output_cols: Optional[Union[str, Iterable[str]]] = None, label_cols: Optional[Union[str, Iterable[str]]] = None, drop_input_cols: Optional[bool] = False, sample_weight_col: Optional[str] = None)¶
Bases:
BaseTransformer
Nu Support Vector Regression For more details on this class, see sklearn.svm.NuSVR
- nu: float, default=0.5
An upper bound on the fraction of training errors and a lower bound of the fraction of support vectors. Should be in the interval (0, 1]. By default 0.5 will be taken.
- C: float, default=1.0
Penalty parameter C of the error term.
- kernel: {‘linear’, ‘poly’, ‘rbf’, ‘sigmoid’, ‘precomputed’} or callable, default=’rbf’
Specifies the kernel type to be used in the algorithm. If none is given, ‘rbf’ will be used. If a callable is given it is used to precompute the kernel matrix.
- degree: int, default=3
Degree of the polynomial kernel function (‘poly’). Must be non-negative. Ignored by all other kernels.
- gamma: {‘scale’, ‘auto’} or float, default=’scale’
Kernel coefficient for ‘rbf’, ‘poly’ and ‘sigmoid’.
if
gamma='scale'
(default) is passed then it uses 1 / (n_features * X.var()) as value of gamma,if ‘auto’, uses 1 / n_features
if float, must be non-negative.
- coef0: float, default=0.0
Independent term in kernel function. It is only significant in ‘poly’ and ‘sigmoid’.
- shrinking: bool, default=True
Whether to use the shrinking heuristic. See the User Guide.
- tol: float, default=1e-3
Tolerance for stopping criterion.
- cache_size: float, default=200
Specify the size of the kernel cache (in MB).
- verbose: bool, default=False
Enable verbose output. Note that this setting takes advantage of a per-process runtime setting in libsvm that, if enabled, may not work properly in a multithreaded context.
- max_iter: int, default=-1
Hard limit on iterations within solver, or -1 for no limit.
- input_cols: Optional[Union[str, List[str]]]
A string or list of strings representing column names that contain features. If this parameter is not specified, all columns in the input DataFrame except the columns specified by label_cols and sample-weight_col parameters are considered input columns.
- label_cols: Optional[Union[str, List[str]]]
A string or list of strings representing column names that contain labels. This is a required param for estimators, as there is no way to infer these columns. If this parameter is not specified, then object is fitted without labels(Like a transformer).
- output_cols: Optional[Union[str, List[str]]]
A string or list of strings representing column names that will store the output of predict and transform operations. The length of output_cols mus match the expected number of output columns from the specific estimator or transformer class used. If this parameter is not specified, output column names are derived by adding an OUTPUT_ prefix to the label column names. These inferred output column names work for estimator’s predict() method, but output_cols must be set explicitly for transformers.
- sample_weight_col: Optional[str]
A string representing the column name containing the examples’ weights. This argument is only required when working with weighted datasets.
- drop_input_cols: Optional[bool], default=False
If set, the response of predict(), transform() methods will not contain input columns.
Methods
fit
(dataset)Fit the SVM model according to the given training data For more details on this function, see sklearn.svm.NuSVR.fit
predict
(dataset)Perform regression on samples in X For more details on this function, see sklearn.svm.NuSVR.predict
score
(dataset)Return the coefficient of determination of the prediction For more details on this function, see sklearn.svm.NuSVR.score
set_input_cols
(input_cols)Input columns setter.
to_sklearn
()Get sklearn.svm.NuSVR object.
Attributes
model_signatures
Returns model signature of current class.