class_docstr: Secure multi-party linear regression at plaintext speed.
  
  Computes the necessary components of the normal equations solution to a
  linear regression.
docstr: Trains the linear regressor.
  
  Arguments:
    training_players: Data owners used for joint training. Must implement the
        compute_estimators as a tfe.local_computation.
    summary: Controls what kind of summary statistics are generated after the
        linear regression fit.
    validation_split: Mimics the behavior of the Keras validation_split kwarg.
docstr_tok: ["Trains","the","linear","regressor",".","Arguments",":","training_players",":","Data","owners","used","for","joint","training",".","Must","implement","the","compute_estimators","as","a","tfe.local_computation",".","summary",":","Controls","what","kind","of","summary","statistics","are","generated","after","the","linear","regression","fit",".","validation_split",":","Mimics","the","behavior","of","the","Keras","validation_split","kwarg","."]
code: def fit(self, training_players, summary=0, validation_split=None):
      """Trains the linear regressor.
  
      Arguments:
        training_players: Data owners used for joint training. Must implement the
            compute_estimators as a tfe.local_computation.
        summary: Controls what kind of summary statistics are generated after the
            linear regression fit.
        validation_split: Mimics the behavior of the Keras validation_split kwarg.
      """
      if validation_split is not None:
          raise NotImplementedError()
  
      partial_estimators = [
          player.compute_estimators(self.estimator_fn)
          for player in training_players
      ]
  
      for attr, partial_estimator in zip(
          self.components, zip(*partial_estimators)
      ):
          setattr(self, attr, tfe.add_n(partial_estimator))
  
      with tfe.Session() as sess:
          for k in self.components:
              op = getattr(self, k)
              setattr(self, k, sess.run(op.reveal()))
  
      tf_graph = tf.Graph()
      with tf_graph.as_default():
          self._inverted_covariate_square = tf.linalg.inv(
              self.covariate_square
          )
          self.coefficients = tf.matmul(
              self._inverted_covariate_square,
              self.covariate_label_product,
          )
  
      with tf.Session(graph=tf_graph) as sess:
          for k in ["_inverted_covariate_square", "coefficients"]:
              setattr(self, k, sess.run(getattr(self, k)))
  
      if not summary:
          return self
  
      return self.summarize(summary_level=summary)
  
file_path: tf-encrypted/examples/bloom/regressor.py
imports: import numpy
  import tensorflow
  import tf_encrypted
label_desc: Use image node_id 3 for calling the BloomRegressor obj's underlying member method code with example usage: obj.fit(training_players, summary, validation_split) and returns: self, self