SafeSVC

An example Python Notebook is available Here

Privacy protected Support Vector Classifier.

class aisdc.safemodel.classifiers.safesvc.SafeSVC(C=1.0, gamma='scale', dhat=1000, eps=10, **kwargs)[source]

Privacy protected Support Vector Classifier.

Methods

additional_checks(curr_separate, saved_separate)

SVC specific checks.

examine_seperate_items(curr_vals, saved_vals)

Comparison of more complex structures in the super class we just check these model-specific items exist in both current and saved copies.

fit(train_features, train_labels)

Do fit and then store model dict.

get_current_and_saved_models()

Makes a copy of self.__dict__ and splits it into dicts for the current and saved versions.

get_params([deep])

Gets dictionary of parameter values restricted to those expected by base classifier.

k_hat_svm(x[, y])

Define the version which is sent to sklearn.svm.

phi_hat(input_vector)

Project a single feature.

phi_hat_multi(input_features)

Compute feature space for a matrix of inputs.

posthoc_check()

Checks whether model has been interfered with since fit() was last run.

predict(test_features)

Make predictions.

predict_proba(test_features)

Predictive probabilities.

preliminary_check([verbose, apply_constraints])

Checks whether current model parameters violate the safe rules.

request_release(path, ext[, target])

Saves model to filename specified and creates a report for the TRE output checkers.

run_attack([target, attack_name, ...])

Runs a specified attack on the trained model and saves a report to file.

save([name])

Writes model to file in appropriate format.

set_params(**kwargs)

Set params.

additional_checks(curr_separate: dict, saved_separate: dict) tuple[str, str][source]

SVC specific checks.

fit(train_features: ndarray, train_labels: ndarray) None[source]

Do fit and then store model dict.