yHatR property Null safety

NormalOperation yHatR
final

Implementation

static final NormalOperation yHatR = NormalOperation.floatOnly(
    floatCalc: (Model m) {
      final lr = LinearRegression(m.memory.registers);
      final x = m.xF;
      m.resultXF = lr.r;
      // Do set LastX - checked on 15C.
      m.pushStack();
      // We do push the stack, without regard to stack lift.  This is how
      // the real 15C behaves, and is checked with a regression test.
      m.yF = lr.r;
      m.xF = lr.yHat(x);
    },
    name: 'yHat,r');