linearRegression property Null safety

NormalOperation linearRegression
final

Implementation

static final NormalOperation linearRegression =
    StackLiftingNormalOperation.floatOnly(
        floatCalc: (Model m) {
          final lr = LinearRegression(m.memory.registers);
          m.xF = lr.slope;
          // Don't set LastX - checked on 15C
          m.pushStack();
          m.xF = lr.yIntercept;
        },
        needsStackLiftIfEnabled: (m) {
          LinearRegression(m.memory.registers); // Throw exception if error
          return true;
        },
        name: 'L.R.');