Skip to content

Commit

Permalink
Upgrade also model terms of Regression Linear
Browse files Browse the repository at this point in the history
  • Loading branch information
boutinb committed Jun 28, 2024
1 parent cea4f99 commit 2191b11
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions inst/Upgrades.qml
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,37 @@ Upgrades
ChangeRename { from: "prPlotAddCutoffLabels"; to: "precisionRecallPlotCutoffLabel" }
}

Upgrade
{
functionName: "RegressionLinear"
fromVersion: "0.18.3"
toVersion: "0.19.0"

ChangeJS
{
name: "modelTerms"
jsFunction: function(options)
{
let oldModels = options["modelTerms"];
let model0 = {components: [], name: "model0", title: "Model 0"}
let model1 = {components: [], name: "model1", title: "Model 1"}

for (let i = 0; i < oldModels.length; i++)
{
let components = oldModels[i].components
let isNuisance = oldModels[i].isNuisance

if (isNuisance)
model0.components.push(components)
model1.components.push(components)
}

return [model0, model1]
}
}
}


Upgrade
{
functionName: "RegressionLogistic"
Expand Down

0 comments on commit 2191b11

Please sign in to comment.