SVMPowerCurve

Support Vector Machine (SVM) based power curve estimation.

from dwse import SVMPowerCurve
model = SVMPowerCurve()
model.fit(X_train, y_train)
prediction = model.predict(X_test)
class dswe.svm.SVMPowerCurve(kernel='rbf', degree=3, gamma='scale', C=1.0)[source]
Parameters
  • kernel (string) – Kernel type to be used in the algorithm. Default is ‘rbf’ else can be ‘linear’, ‘poly’, ‘sigmoid’. ‘poly’ mean polynomial and ‘rbf’ means radial basis function.

  • degree (int) – Degree of the polynomial kernel function (‘poly’). Ignored by all other kernels.

  • gamma (string) – Kernel coefficient for ‘poly’, ‘radial’ and ‘sigmoid’. Can take ‘scale’ or ‘auto’ or float value. If ‘scale’ (default), the gamma value is 1/(number_of_features*variance_of_X_train). If ‘auto’, the gamma value is 1/number_of_features.

  • C (float) – Regularization parameter. The strength of the regularization is inversely proportional to C. Must be strictly positive.

fit(X_train, y_train)[source]
Parameters
  • X_train (np.ndarray or pd.DataFrame) – A matrix or dataframe of input variable values in the training dataset.

  • y_train (np.array) – A numeric array for response values in the training dataset.

Returns

self with trained parameter values.

Return type

SVMPowerCurve

predict(X_test)[source]
Parameters

X_test (np.ndarray or pd.DataFrame) – A matrix or dataframe of test input variable values to compute predictions.

Returns

A numeric array for predictions at the data points in X_test.

Return type

np.array