Class LinearRegressionParams

  • All Implemented Interfaces:
    ml.shifu.guagua.io.Bytable

    public class LinearRegressionParams
    extends ml.shifu.guagua.io.HaltBytable
    A model class to store linear regression weight on first iteration by using parameters, while in other iterations parameters is used to store gradients.

    To make all workers started at the same model, master will compute a consistent model weights at the first iteration and then send to all the workers. Workers will start computing from the second iteration.

    Workers are responsible to compute local accumulated gradients and send to master while master accumulates all gradients together to build a global model.

    • Constructor Detail

      • LinearRegressionParams

        public LinearRegressionParams()
      • LinearRegressionParams

        public LinearRegressionParams​(double[] parameters)
      • LinearRegressionParams

        public LinearRegressionParams​(double[] parameters,
                                      double error)
    • Method Detail

      • getParameters

        public double[] getParameters()
      • setParameters

        public void setParameters​(double[] parameters)
      • getError

        public double getError()
      • setError

        public void setError​(double error)
      • doReadFields

        public void doReadFields​(DataInput in)
                          throws IOException
        Specified by:
        doReadFields in class ml.shifu.guagua.io.HaltBytable
        Throws:
        IOException