Skip to content

Commit

Permalink
Add logistic regression functions to API.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 463645193
  • Loading branch information
schien1729 authored and tensorflower-gardener committed Jul 27, 2022
1 parent 17cd0c5 commit 848cfc7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tensorflow_privacy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ py_library(
"//tensorflow_privacy/privacy/dp_query:tree_range_query",
"//tensorflow_privacy/privacy/estimators:dnn",
"//tensorflow_privacy/privacy/keras_models:dp_keras_model",
"//tensorflow_privacy/privacy/logistic_regression:datasets",
"//tensorflow_privacy/privacy/logistic_regression:multinomial_logistic",
"//tensorflow_privacy/privacy/logistic_regression:single_layer_softmax",
"//tensorflow_privacy/privacy/optimizers:dp_optimizer_keras",
"//tensorflow_privacy/privacy/optimizers:dp_optimizer_keras_vectorized",
"//tensorflow_privacy/v1:tensorflow_privacy_v1",
Expand Down
9 changes: 9 additions & 0 deletions tensorflow_privacy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,13 @@
from tensorflow_privacy.privacy.optimizers.dp_optimizer_keras_vectorized import VectorizedDPKerasSGDOptimizer
from tensorflow_privacy.privacy.optimizers.dp_optimizer_keras_vectorized import make_vectorized_keras_optimizer_class

# Logistic regression
from tensorflow_privacy.privacy.logistic_regression.datasets import linearly_separable_labeled_examples
from tensorflow_privacy.privacy.logistic_regression.datasets import synthetic_linearly_separable_data

from tensorflow_privacy.privacy.logistic_regression.multinomial_logistic import logistic_objective_perturbation
from tensorflow_privacy.privacy.logistic_regression.multinomial_logistic import logistic_dpsgd

from tensorflow_privacy.privacy.logistic_regression.single_layer_softmax import single_layer_softmax_classifier

# module `bolt_on` not yet available in this version of TF Privacy
5 changes: 5 additions & 0 deletions tensorflow_privacy/privacy/logistic_regression/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ package(default_visibility = ["//visibility:public"])

licenses(["notice"])

py_library(
name = "logistic_regression",
srcs = ["__init__.py"],
)

py_library(
name = "multinomial_logistic",
srcs = ["multinomial_logistic.py"],
Expand Down
13 changes: 13 additions & 0 deletions tensorflow_privacy/privacy/logistic_regression/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2022, The TensorFlow Authors.
#
# 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 applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

0 comments on commit 848cfc7

Please sign in to comment.