Skip to content

secure_add_example_param

secure_add_example_param

SecureAddExampleParam (BaseParam)

Source code in federatedml/param/secure_add_example_param.py
class SecureAddExampleParam(BaseParam):
    def __init__(self, seed=None, partition=1, data_num=1000):
        self.seed = seed
        self.partition = partition
        self.data_num = data_num

    def check(self):
        if self.seed is not None and type(self.seed).__name__ != "int":
            raise ValueError("random seed should be None or integers")

        if type(self.partition).__name__ != "int" or self.partition < 1:
            raise ValueError("partition should be an integer large than 0")

        if type(self.data_num).__name__ != "int" or self.data_num < 1:
            raise ValueError("data_num should be an integer large than 0")
__init__(self, seed=None, partition=1, data_num=1000) special
Source code in federatedml/param/secure_add_example_param.py
def __init__(self, seed=None, partition=1, data_num=1000):
    self.seed = seed
    self.partition = partition
    self.data_num = data_num
check(self)
Source code in federatedml/param/secure_add_example_param.py
def check(self):
    if self.seed is not None and type(self.seed).__name__ != "int":
        raise ValueError("random seed should be None or integers")

    if type(self.partition).__name__ != "int" or self.partition < 1:
        raise ValueError("partition should be an integer large than 0")

    if type(self.data_num).__name__ != "int" or self.data_num < 1:
        raise ValueError("data_num should be an integer large than 0")

Last update: 2021-12-03
Back to top