Skip to content

Commit

Permalink
fixed bug with reopening JASP files
Browse files Browse the repository at this point in the history
- previously the selected prediction models disappeared in-between saves and reopening of the jasp file
- by calculating the available/possible models in an invisible availableVariableList, and then using this as a source for another variable list, the models stay selected
- i also added months to the periodical prediction
  • Loading branch information
petersen-f committed Nov 8, 2023
1 parent 471d10b commit 5152029
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion inst/qml/predictiveAnalytics.qml
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,14 @@ Form

VariablesForm
{
// this function dynamically selects the available models based on users input
// due to some bug however, the values can't be directly selected as they dissapear in between saves
// instead the values are computed, hidden and then used as input for another AvailableVariables List
visible: false
AvailableVariablesList
{
name:"availableModels"
name:"availableModelsHidden"

// at the current moment, the user can choose models from a variety of predefined models
// some of these models contain a regressive component or lagged values
// but they only work if the user provided covariates or created some in the feature engineering section
Expand Down Expand Up @@ -426,6 +431,18 @@ Form
}
source: getAvailableModels()
}
}

VariablesForm
{
// this function dynamically selects the available models based on users input
// due to some bug however, the values can't be directly selected as they dissapear in between saves
// instead the values are computed, hidden and then used as input for another AvailableVariables List
AvailableVariablesList
{
name: "availableModels"
source: "availableModelsHidden"
}
AssignedVariablesList
{
name: "selectedModels"
Expand Down Expand Up @@ -672,6 +689,7 @@ Form
{ label: qsTr("Hours"), value: "hours" },
{ label: qsTr("Days"), value: "days" },
{ label: qsTr("Weeks"), value: "weeks" },
{ label: qsTr("Months"), value: "months" },
{ label: qsTr("Years"), value: "years" }
]
}
Expand Down

0 comments on commit 5152029

Please sign in to comment.