Variable Trigonometric Threshold

A linear classifier to be used in conjunction with the Scikit Learn python package.

class vtt.VTT(weights=None, bias=None, *args, **kwargs)[source]

The Variable Trigonometric Threshold (VTT) linear classifier class

coef_

array-like

Feature weights. Also known as the coefficients.

intercept

array-like

This is the classifier bias. For a linear classifier also known as the intercept.

fit(X, y)[source]

Fit the VTT classifier model

Parameters:
  • X (sparse matrix, shape = [n_samples, n_features]) – Training data
  • y (array-like, shape = [n_samples]) – Target values
set_params(**params)[source]

Set the parameters of the estimator.

Parameters:
  • bias (NER) – bias of the estimator. Also known as the intercept
  • weights (array-like) – weights of the features. Also known as coeficients.
  • bias – NER entities infering column position on X and bias value. Ex: b_4=10, b_5=6.

Example

>>> cls = VTT()
>>> cls.set_params(b_4=10, b_5=6, b_6=8)
get_params(deep=True)[source]

Get parameters for the estimator.

Parameters:deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
Returns:mapping of string to any contained subobjects that are estimators.
Return type:params
fit_transform(X, y=None, **fit_params)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters:
  • X (numpy array of shape [n_samples, n_features]) – Training set.
  • y (numpy array of shape [n_samples]) – Target values.
Returns:

X_new – Transformed array.

Return type:

numpy array of shape [n_samples, n_features_new]