| fitRecordFactor | R Documentation |
Suite-level record scaling of the spectral-match workflow: one scale
coefficient per record (shape.recordFactor in the batch JSON
contract), solved as a bounded quadratic program against the target
band (global band-conditioned objective).
fitRecordFactor(
.x,
target,
records,
factorMin = 0,
factorMax = Inf,
bandWeight = 2,
deficitWeight = 1
)
.x |
data.table. Suite PSA long table with columns |
target |
data.table. Target band with columns |
records |
character. RecordIDs of the completed records to scale (at least two). |
factorMin |
numeric. Lower bound of the record factors
( |
factorMax |
numeric. Upper bound of the record factors
( |
bandWeight |
numeric. Weight of the band-violation term.
Default |
deficitWeight |
numeric. Extra weight of the suite-mean deficit
below the target. Default |
list with scale (data.table RecordID, scaleFactor) and
stage (one-row solver diagnostics; the stage column keeps the
frozen product label "B").
## Not run:
Suite <- fitRecordFactor(.x = PSA, target = Band,
records = Metrics[status == "done", RecordID],
factorMin = 0.5, factorMax = 1.6)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.