Class LogisticRegression

java.lang.Object
dk.alexandra.fresco.stat.regression.logistic.LogisticRegression
All Implemented Interfaces:
dk.alexandra.fresco.framework.builder.Computation<ArrayList<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>>,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>

public class LogisticRegression
extends Object
implements dk.alexandra.fresco.framework.builder.Computation<ArrayList<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>>,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>
A naive implementation of logistic regression, not optimized for secure computation. Given a data set consisting of column vectors and a list of expected classifications (0 or 1), this computation performs a linear regression on the data and the expected outcome as log-odds. See also https://en.wikipedia.org/wiki/Logistic_regression.
  • Constructor Summary

    Constructors 
    Constructor Description
    LogisticRegression​(dk.alexandra.fresco.lib.common.collections.Matrix<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>> data, ArrayList<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>> expected, double[] beta, IntToDoubleFunction rate, int epochs)  
  • Method Summary

    Modifier and Type Method Description
    dk.alexandra.fresco.framework.DRes<ArrayList<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>>> buildComputation​(dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric builder)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogisticRegression

      public LogisticRegression​(dk.alexandra.fresco.lib.common.collections.Matrix<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>> data, ArrayList<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>> expected, double[] beta, IntToDoubleFunction rate, int epochs)
  • Method Details

    • buildComputation

      public dk.alexandra.fresco.framework.DRes<ArrayList<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>>> buildComputation​(dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric builder)
      Specified by:
      buildComputation in interface dk.alexandra.fresco.framework.builder.Computation<ArrayList<dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.lib.fixed.SFixed>>,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>