Skip to content

Adaptive soft sensor: static.hotellings_t2_limit() raises on AdaptivePLS; the monitoring subsection stops there #280

Description

@kgdunn

product-development-product-improvement/adaptive-soft-sensor.rst:217:

t2_lim = float(static.hotellings_t2_limit(conf_level=0.99))

raises AttributeError: 'AdaptivePLS' object has no attribute 'n_components_' on process-improve 1.78.0, because the adaptive estimators inherit the limit method but never set the attribute it reads (library bug, kgdunn/process-improve#542). Every block after it in "Monitoring shows the model ageing" is unreachable.

The value the text wants (12.19) is already computed and returned by the update() Bunch that the very next line calls for spe_limit. Reading both limits from one probe update works on the released library today and removes a redundant call:

probe = static.update(vp[tags].to_numpy()[0])
t2_lim = float(probe.hotellings_t2_limit)
spe_lim = float(probe.spe_limit)

Every other number in the chapter reproduced (RMSEP 6.8 / 12.6 / 8.0 / 7.5 kPa, bias +11.1 / +1.3 kPa, 1045 SPE crossings, the four-model table, the eight weak tags). Found by executing every code block of the book (#274).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions