INNER CODE UNIT · Python

yt_h

dmarienko/QuantTradingResearch · models/helpers.py:91

        yt_h = m.predict(xt, y=yt, **kwargs) if isinstance(m, Model) else m.predict(xt, **kwargs)
        yt_h = pd.Series(yt_h, index=xt.index) if isinstance(yt_h, np.ndarray) else yt_h
        
        return mstruct(
            model=m,
            description=tracker.description,
            mode=on,
            train = mstruct(
                x = xn, y = yn, yh = yn_h, w = tracking_error(yn, yn_h, mode=on)
            ),
            test = mstruct(
                x = xt, y = yt, yh = yt_h, w = tracking_error(yt, yt_h, mode=on)
            )
        )

    
def plot_results(m: mstruct):
    """

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…