repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/ftl_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 3,684 | 61.457627 | 117 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/secure_information_retrieval_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 2,064 | 48.166667 | 115 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/homo_label_encoder_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,368 | 38.114286 | 112 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_decision_tree_transfer_variable_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 2,885 | 53.45283 | 115 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/homo_boosting_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,733 | 42.35 | 114 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_secure_boost_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,452 | 39.361111 | 113 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/homo_lr_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 3,515 | 61.785714 | 118 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_secure_boosting_tree_transfer_variable_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,452 | 39.361111 | 113 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_secure_boosting_predict_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,717 | 43.051282 | 111 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_nn_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,538 | 40.594595 | 107 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_poisson_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 2,676 | 54.770833 | 118 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/cipher_compressor_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,246 | 35.676471 | 101 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/feldman_verifiable_sum_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,804 | 45.282051 | 115 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/secure_add_example_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,430 | 38.75 | 97 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/raw_intersect_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,721 | 43.153846 | 113 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/sshe_model_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,522 | 40.162162 | 106 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/sample_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,230 | 35.205882 | 95 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_feature_selection_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,728 | 43.333333 | 107 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/batch_generator_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,357 | 37.8 | 107 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_feature_binning_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 2,061 | 46.953488 | 109 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/cross_validation_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,329 | 37 | 93 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_linr_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 3,308 | 60.277778 | 118 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/converge_checker_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,341 | 37.342857 | 101 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_boosting_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,448 | 39.25 | 113 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/intersection_func_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 2,526 | 53.934783 | 117 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/__init__.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 616 | 37.5625 | 75 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/homo_binning_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,765 | 43.15 | 107 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/match_id_intersect_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,362 | 37.942857 | 109 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/data_split_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,417 | 38.388889 | 97 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_dnn_lr_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,593 | 42.081081 | 114 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/stepwise_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,473 | 39.944444 | 116 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/homo_onehot_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,462 | 39.638889 | 116 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/homo_decision_tree_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,535 | 39.421053 | 120 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/dh_intersect_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,876 | 43.690476 | 101 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/homo_secure_boost_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,921 | 47.05 | 114 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/hetero_decision_tree_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 3,005 | 54.666667 | 119 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/oblivious_transfer_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,391 | 37.666667 | 89 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/ecdh_intersect_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,848 | 43.02381 | 101 | py |
FATE | FATE-master/python/federatedml/transfer_variable/transfer_class/validation_strategy_transfer_variable.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 1,259 | 36.058824 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/__init__.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 2,974 | 48.583333 | 119 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/algorithm_prototype.py | import abc
from abc import ABC
class BasicAlgorithms(ABC):
@abc.abstractmethod
def get_sample_weights(self, *args):
pass
@abc.abstractmethod
def fit(self, *args):
pass
@abc.abstractmethod
def predict(self, *args):
pass
@abc.abstractmethod
def get_model(self,... | 413 | 14.923077 | 40 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/__init__.py | from federatedml.ensemble.basic_algorithms.algorithm_prototype import BasicAlgorithms
from federatedml.ensemble.basic_algorithms.decision_tree.hetero.hetero_decision_tree_guest import \
HeteroDecisionTreeGuest
from federatedml.ensemble.basic_algorithms.decision_tree.hetero.hetero_decision_tree_host import HeteroDec... | 763 | 57.769231 | 119 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/__init__.py | 0 | 0 | 0 | py | |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/feature_importance.py | class FeatureImportance(object):
def __init__(self, importance=0, importance_2=0, main_type='split'):
self.legal_type = ['split', 'gain']
assert main_type in self.legal_type, 'illegal importance type {}'.format(main_type)
self.importance = importance
self.importance_2 = importance_... | 1,837 | 33.679245 | 115 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/feature_histogram.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 32,237 | 40.067516 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/node.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 2,413 | 38.57377 | 115 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/splitter.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 23,387 | 44.063584 | 122 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/decision_tree.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 15,297 | 32.474836 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/g_h_optim.py | import functools
import numpy as np
from federatedml.secureprotol.fixedpoint import FixedPointNumber
from federatedml.secureprotol import PaillierEncrypt, IpclPaillierEncrypt
from federatedml.cipher_compressor.packer import GuestIntegerPacker, cipher_list_to_cipher_tensor
from federatedml.ensemble.basic_algorithms.deci... | 7,759 | 38.794872 | 124 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/tree_plan.py | from typing import Tuple, List
from federatedml.util import LOGGER
from federatedml.util import consts
tree_type_dict = {
'guest_feat_only': 0, # use only guest feature to build this tree
'host_feat_only': 1, # use only host feature to build this tree
'normal_tree': 2, # a normal decision tree
'laye... | 3,192 | 33.333333 | 92 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/__init__.py | 0 | 0 | 0 | py | |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/criterion.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 3,491 | 35.757895 | 109 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/cross_entropy.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 6,115 | 26.182222 | 110 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/loss.py | from federatedml.statistic.data_overview import with_weight
class Loss(object):
@staticmethod
def initialize(y):
raise NotImplementedError()
@staticmethod
def predict(value):
raise NotImplementedError()
@staticmethod
def compute_loss(y, y_pred, sample_weights=None):
... | 1,016 | 28.057143 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/regression_loss.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 8,258 | 32.437247 | 119 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/__init__.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,775 | 51.235294 | 117 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/test/regression_loss_test.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 11,824 | 39.775862 | 117 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/test/__init__.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 616 | 37.5625 | 75 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/tree_core/loss/test/cross_entropy_test.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 4,683 | 40.451327 | 116 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/homo/homo_decision_tree_client.py | import functools
import numpy as np
import sklearn
from typing import List
from federatedml.util import LOGGER
from federatedml.protobuf.generated.boosting_tree_model_meta_pb2 import CriterionMeta
from federatedml.protobuf.generated.boosting_tree_model_meta_pb2 import DecisionTreeModelMeta
from federatedml.protobuf.gen... | 27,219 | 38.853587 | 119 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/homo/homo_decision_tree_aggregator.py | from typing import List, Dict
from federatedml.util import LOGGER
from federatedml.framework.weights import DictWeights
from federatedml.framework.homo.aggregator.secure_aggregator import SecureAggregatorClient, SecureAggregatorServer
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.feature_histogram ... | 2,457 | 35.147059 | 114 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/homo/homo_decision_tree_arbiter.py | from typing import List
from federatedml.protobuf.generated.boosting_tree_model_param_pb2 import DecisionTreeModelParam
from federatedml.transfer_variable.transfer_class.homo_decision_tree_transfer_variable import \
HomoDecisionTreeTransferVariable
from federatedml.util import consts
from federatedml.ensemble impor... | 6,520 | 33.321053 | 118 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/hetero/hetero_fast_decision_tree_host.py | import numpy as np
import functools
import copy
from federatedml.ensemble.basic_algorithms import HeteroDecisionTreeHost
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core import tree_plan as plan
from federatedml.util import consts
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.spli... | 19,006 | 39.613248 | 117 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/hetero/hetero_fast_decision_tree_guest.py | import functools
import copy
from federatedml.ensemble.basic_algorithms import HeteroDecisionTreeGuest
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core import tree_plan as plan
from federatedml.util import consts
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.node import Node
from ... | 18,485 | 44.308824 | 124 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/hetero/hetero_decision_tree_guest.py | import copy
import functools
from fate_arch.session import computing_session as session
from federatedml.util import LOGGER
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.decision_tree import DecisionTree
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.node import Node
from federa... | 38,119 | 44.927711 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/basic_algorithms/decision_tree/hetero/hetero_decision_tree_host.py | import numpy as np
import functools
from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.node import Node
from federatedml.util import LOGGER
from federatedml.protobuf.generated.boosting_tree_model_meta_pb2 import DecisionTreeModelMeta
from federatedml.protobuf.generated.boosting_tree_model_param_pb2 impo... | 23,965 | 41.796429 | 117 | py |
FATE | FATE-master/python/federatedml/ensemble/secureboost/__init__.py | 0 | 0 | 0 | py | |
FATE | FATE-master/python/federatedml/ensemble/secureboost/hetero_secoreboost/hetero_secureboost_guest.py | import numpy as np
from operator import itemgetter
from federatedml.util import consts
from federatedml.util import LOGGER
from federatedml.ensemble.boosting import HeteroBoostingGuest
from federatedml.param.boosting_param import HeteroSecureBoostParam, DecisionTreeParam
from federatedml.util.io_check import assert_io_... | 23,216 | 45.157058 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/secureboost/hetero_secoreboost/__init__.py | 0 | 0 | 0 | py | |
FATE | FATE-master/python/federatedml/ensemble/secureboost/hetero_secoreboost/hetero_secureboost_host.py | from operator import itemgetter
from federatedml.util import LOGGER
from federatedml.util import consts
from federatedml.util.io_check import assert_io_num_rows_equal
from federatedml.protobuf.generated.boosting_tree_model_param_pb2 import FeatureImportanceInfo
from federatedml.ensemble.basic_algorithms.decision_tree.t... | 13,864 | 46.320819 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/secureboost/homo_secureboost/homo_secureboost_client.py | import copy
import functools
import numpy as np
from typing import List
from operator import itemgetter
from federatedml.util import LOGGER
from federatedml.util import consts
from federatedml.statistic.data_overview import with_weight
from federatedml.feature.sparse_vector import SparseVector
from federatedml.feature.... | 16,769 | 41.348485 | 119 | py |
FATE | FATE-master/python/federatedml/ensemble/secureboost/homo_secureboost/homo_secureboost_arbiter.py | import numpy as np
from numpy import random
from federatedml.util import LOGGER
from federatedml.util import consts
from federatedml.ensemble.boosting.homo_boosting import HomoBoostingArbiter
from federatedml.param.boosting_param import HomoSecureBoostParam
from federatedml.ensemble.basic_algorithms.decision_tree.homo.... | 3,150 | 35.218391 | 119 | py |
FATE | FATE-master/python/federatedml/ensemble/secureboost/homo_secureboost/__init__.py | 0 | 0 | 0 | py | |
FATE | FATE-master/python/federatedml/ensemble/secureboost/secureboost_util/tree_model_io.py | from federatedml.param.boosting_param import DecisionTreeParam
from federatedml.ensemble.basic_algorithms import HeteroFastDecisionTreeGuest, HeteroFastDecisionTreeHost, \
HeteroDecisionTreeGuest, HeteroDecisionTreeHost
from federatedml.util import consts
def produce_hetero_tree_learner(role, tree_param: Decision... | 4,470 | 38.219298 | 115 | py |
FATE | FATE-master/python/federatedml/ensemble/secureboost/secureboost_util/boosting_tree_predict.py | import functools
import numpy as np
import random
from typing import List
from federatedml.util import consts
from federatedml.secureprotol import PaillierEncrypt
from federatedml.ensemble.basic_algorithms import HeteroDecisionTreeGuest, HeteroDecisionTreeHost, \
HeteroFastDecisionTreeGuest, HeteroFastDecisionTreeH... | 21,769 | 37.059441 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/secureboost/secureboost_util/subsample.py | import numpy as np
from fate_arch.session import computing_session
# TODO
def random_sampling():
"""
Normal random row subsample
"""
pass
def goss_sampling(grad_and_hess, top_rate, other_rate):
"""
sampling method introduced in LightGBM
"""
sample_num = grad_and_hess.count()
g_h_... | 2,065 | 31.28125 | 113 | py |
FATE | FATE-master/python/federatedml/ensemble/test/hack_encrypter.py | class HackDecrypter():
def encrypt(self, val):
return val
def decrypt(self, val):
return val
| 119 | 14 | 27 | py |
FATE | FATE-master/python/federatedml/ensemble/test/gh_packing_compressing_test.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 11,648 | 37.193443 | 133 | py |
FATE | FATE-master/python/federatedml/ensemble/test/criterion_test.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 2,008 | 33.637931 | 111 | py |
FATE | FATE-master/python/federatedml/ensemble/test/node_test.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,866 | 32.945455 | 84 | py |
FATE | FATE-master/python/federatedml/ensemble/test/__init__.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 616 | 37.5625 | 75 | py |
FATE | FATE-master/python/federatedml/ensemble/test/feature_histogram_test.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 4,570 | 38.068376 | 111 | py |
FATE | FATE-master/python/federatedml/ensemble/boosting/hetero_boosting.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 15,350 | 37.961929 | 119 | py |
FATE | FATE-master/python/federatedml/ensemble/boosting/predict_cache.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | 2,276 | 30.191781 | 85 | py |
FATE | FATE-master/python/federatedml/ensemble/boosting/homo_boosting.py | from abc import ABC
import abc
import numpy as np
from federatedml.ensemble.boosting.boosting import Boosting
from federatedml.feature.homo_feature_binning.homo_split_points import HomoFeatureBinningClient, \
HomoFeatureBinningServer
from federatedml.util.classify_label_checker import ClassifyLabelChecker, Regressi... | 13,545 | 39.195846 | 120 | py |
FATE | FATE-master/python/federatedml/ensemble/boosting/boosting.py | import copy
import functools
import typing
from abc import ABC
import abc
from numpy import random
import numpy as np
from federatedml.param.boosting_param import BoostingParam, ObjectiveParam
from federatedml.param.predict_param import PredictParam
from federatedml.param.feature_binning_param import FeatureBinningPara... | 19,801 | 36.291902 | 115 | py |
FATE | FATE-master/python/federatedml/ensemble/boosting/__init__.py | from federatedml.ensemble.boosting.boosting import Boosting
from federatedml.ensemble.boosting.hetero_boosting import HeteroBoostingGuest, HeteroBoostingHost
__all__ = ["Boosting", "HeteroBoostingGuest", "HeteroBoostingHost"]
| 227 | 44.6 | 97 | py |
FATE | FATE-master/python/federatedml/protobuf/__init__.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,769 | 37.478261 | 99 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/component_converter.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,039 | 30.515152 | 75 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/homo_model_convert.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 6,574 | 38.136905 | 94 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/__init__.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 616 | 37.5625 | 75 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/lightgbm/gbdt.py | import numpy as np
import lightgbm as lgb
from ..component_converter import ComponentConverterBase
from federatedml.protobuf.generated.boosting_tree_model_meta_pb2 import BoostingTreeModelMeta
from federatedml.protobuf.generated.boosting_tree_model_param_pb2 import BoostingTreeModelParam, \
DecisionTreeModelParam, ... | 11,820 | 31.03523 | 115 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/lightgbm/__init__.py | 0 | 0 | 0 | py | |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/test/homo_nn_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lice... | 3,476 | 33.425743 | 106 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/test/homo_lr_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lice... | 2,649 | 33.415584 | 106 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/tf_keras/nn.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,695 | 35.869565 | 103 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/tf_keras/__init__.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 616 | 37.5625 | 75 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/sklearn/logistic_regression.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,812 | 37.574468 | 78 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/sklearn/__init__.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 616 | 37.5625 | 75 | py |
FATE | FATE-master/python/federatedml/protobuf/homo_model_convert/pytorch/nn.py | #
# Copyright 2021 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 1,278 | 28.744186 | 80 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.