PlainModelHyperParams#

class PlainModelHyperParams#

A struct for the hyperparameters of the plain AI model.

property aml_delta#

The weight of the risk of the other banks in the evaluation of the risks of the next iteration in the Aml model

property aml_iterations#

The number of iterations in the AML model.

property d#

number of differentiations

Type:

Arima model parameter

property feature_ranges#

A list of pairs specifying the minimum and maximum supported values for each feature for XGBoost and DTree

property features_bin_size#

Controls the approximation of the feature values and thresholds for XGBoost and DTree. The feature values will be approximated to the closest multiple of features_bin_size. The thresholds will be approximated to the mid-point between the two closest multiples of features_bin_size.

property features_scale_target#

Controls the scale of the features and thresholds for XGBoost and DTree. The features and thresholds will be scaled so they will be in the range [0, featuresScaleTarget]. Defaults to 500.

property fit_hyper_params#

Hyper parameters common to most fitting algorithm

property frep#

Controls the accuracy of the comparison approximation in XGBoost and DTree prediction. A higher frep increases the accuracy on the account of deeper and slower computation.

property grep#

Controls the accuracy of the comparison approximation in XGBoost and DTree prediction. A higher grep increases the accuracy on the account of deeper and slower computation.

property init_random_weights#

Initialize the PlainModel with random weights.

property inverse_approximation_precision#

The approximation precision of the linear regression inverse operation.

property linear_regression_distribution_x#

The distribution type of X values in linear regression training

property linear_regression_max_x#

The maximum of the values of X in linear regression training with uniform or unknown distribution.

property linear_regression_mean_x#

The mean of the values of X in linear regression training with normal distribution.

property linear_regression_min_x#

The minimum of the values of X in linear regression training with uniform or unknown distribution.

property linear_regression_std_x#

The standard deviation of the values of X in linear regression training with normal distribution.

load(self: pyhelayers.PlainModelHyperParams, file: str) None#

Load the object from JSON file.

Parameters:

file – The name of the JSON file.

load_from_buffer(self: pyhelayers.PlainModelHyperParams, buffer: bytes) None#

Load the object from JSON buffer.

Parameters:

buffer – The buffer to load from.

property logistic_regression_activation#

Activation used in logistic regression.

property max_rand_value#

Relevant when init_random_weights is set to True. An upper limit for the random values.

property min_rand_value#

Relevant when init_random_weights is set to True. A lower limit for the random values.

property model_specified_fixed_batch_size#

Indication to whether a model-specified fixed batch size is effective (default: false). With such fixed batch size, the batch size is fixed to the batch size specified in the plain NN model, and future runs of predict with the plain model and the HE model created from it, must provide exactly that much elements per batch. If this flag is turned off, the batch size is dynamic, meaning it can be changed and the HE model can be optimized for any batch size desired, but in this case the batch dimension must not be changed, manipulated or involved in operations by the NN in any way.

property model_subclass#

A named parameter allowing to specify some specific model type, e.g., a specific class of NN architecture.

property mu#

The mu coefficient of the Arima model.

property negate_sigmoid_input#

Whether to negate the input to the Sigmoid activation function.

property num_accounts#

The combined number of accounts at all banks in the Aml model.

property num_centers#

The number of centers for KMeans.

property num_samples#

Number of values to use for fitting and training.

property num_values_used_for_prediction#

The number of previous values of the time series to be used in prediction. A greater value will increase the prediction precision (compared to a plain ARIMA model) on the account of higher multiplication depth.

property number_of_cached_nodes#

Number of nodes that are shared among trees and their results are cached as an optimization.

property number_of_classes#

Number of classes.

property number_of_features#

Number of features in an input sample. Value of -1 indicates it will be determined by the model file.

property p#

number of past values effecting current value

Type:

Arima model parameter

property phi#

The phi coefficients of the Arima model.

property plain_batch_norm_in_encrypted_nn#

An indication to whether the batch normalization constants of an encrypted NN should remain exposed in a plaintext form and not be encrypted. May often result in improved performance. Not relevant for non-encrypted NN.

property plain_poly_activation_coeffs_in_encrypted_nn#

An indication to whether the coefficients of a polynomial activation function of an encrypted NN should remain exposed in a plaintext form and not be encrypted. May often result in improved performance. Not relevant for non-encrypted NN.

property q#

number of past errors effecting current value

Type:

Arima model parameter

property round_before_storing_thresholds#

In case storeThresholds is true, decides whether the thresholds should be scaled and rounded before they are stored. Turning this flag on makes close thresholds considered the same one, thus reducing runtime on the account of possibly reducing accuracy.

property sparse_rate#

Relevant when init_random_weights is set to True. The rate of zeroed values. Must be in the range of [0,1]. For example, 0 means no values will be set to zero, while 0.3 means ~30% of the values will be set to zero and ~70% will get values in the range of [min,max).

property store_thresholds#

If true, XGBoost and DTree will store all thresholds of the model in the user side, in the plain. This has the advantage of making prediction faster and more accurate, on the account of storing additional, possibly sensitive, data in the user side, and requiring the user to do some additional pre-processing. Note that the additional data will be kept in the user side and it will not be exposed to the server at any time.

property theta1#

The theta1 coefficient of the Arima model.

property trainable#

Whether the PlainModel object should allow to call fit().

property use_linear_regression_estimator#
property varw#

The error variance of the Arima model.

property verbose#

Verbosity flag.