Generic classes

The different algorithms in this library inherits from these generic classes.

Predictor

class pyridge.generic.predictor.Predictor(classification: bool = True, logging: bool = True)[source]
get_indicator(test_data)[source]
Parameters

test_data (numpy.array) – array like.

Returns

predicted labels.

instance_param_(train_data, train_target, parameter)[source]

Instance parameters from dict.

Parameters
  • train_data (numpy.matrix) –

  • train_target (numpy.array) –

  • parameter (dict) –

Returns

predict_classifier(test_data)[source]

Predict the label.

Parameters

test_data (numpy.array) – array like.

Returns

predicted labels.

predict_proba(test_data)[source]

Predict the probability.of class.

Parameters

test_data (numpy.array) – array like.

Returns

predicted labels.

predict_regressor(test_data)[source]

Predict the value (for linear).

Parameters

test_data (numpy.array) – array like.

Returns

predicted values.

target_classification(train_target)[source]
Parameters

train_target

Returns

target_regression(train_target)[source]
Parameters

train_target

Returns

Neural Method

class pyridge.generic.NeuralMethod(classification: bool = True, logging: bool = True)[source]
get_h_matrix(data)[source]
Parameters

data

Returns

Kernel Method

class pyridge.generic.KernelMethod(classification: bool = True, logging: bool = True)[source]