0

I am trying to figure out Logistic Regression implemented in Knime tool. Pls see https://github.com/knime/knime-core/blob/master/org.knime.base/src/org/knime/base/node/mine/regression/logistic/learner3/Learner.java

In the irlsRls method, there are many Array2DRowRealMatrix used like

    RealMatrix x = new Array2DRowRealMatrix(1, rC + 1);
    RealMatrix eBetaTx = new Array2DRowRealMatrix(1, tcC - 1);
    RealMatrix pi = new Array2DRowRealMatrix(1, tcC - 1);

I have gone through the documentation for RealMatrix and understood the arguments say the row and column dimension. But can someone say with what values it is initialised when declared as I see lot of usage of these declared variables before assigning any values to it. Any help appreciated. Advance Thanks

Devi
  • 109
  • 1
  • 1
  • 10

2 Answers2

0

It takes the Number of rows and columns in the new matrix

public Array2DRowRealMatrix(int rowDimension,
                int columnDimension)
                 throws NotStrictlyPositiveException

Parameters: rowDimension - Number of rows in the new matrix. columnDimension - Number of columns in the new matrix.

and

NotStrictlyPositiveException - if the row or column dimension is not positive.

You can find more about it

here.

Dishonered
  • 8,449
  • 9
  • 37
  • 50
0

As it is based on double[][], almost certainly full of 0.0 if using that constructor

SteveR
  • 583
  • 2
  • 12