MArgarida Posted April 17, 2023 Share Posted April 17, 2023 Hello, i defined some conditions, using identify->value search, etc, which is very convenient and easy to get started but i'd like to update this definition or add other criteria. this could be easily done using formula. i see we can duplicate to formula, is it also possible to convert to formula? thank you Link to comment Share on other sites More sharing options...
Seeq Team Kin How Posted April 18, 2023 Seeq Team Share Posted April 18, 2023 Hi Margarida, The only way to convert it in Workbench is by duplicating it to a formula. After that, update all calculations with this variable by substituting the old condition created with Workbench's tool with the new duplicate. Regards, Kin How Link to comment Share on other sites More sharing options...
Seeq Team Patrick Posted April 18, 2023 Seeq Team Share Posted April 18, 2023 To add what Kin How mentioned above, I would encourage you to submit a feature request for this capability as I could see this being very helpful when iterating analyses over time. To do so, go to support.seeq.com, click on "Support Portal" in the lower right, and submit an "Analytics Help" request referencing this post. A one-liner will be sufficient. We will make sure it gets linked to a developer feature request. 1 Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted May 2, 2023 Share Posted May 2, 2023 Hi Margarida, as a workaround you can use the REST API to convert an element to a formula. Each item has a property called "UIConfig" that stores the information which user interface should be used when editing the element. You can use the endpoint /items/{id}/properties/{propertyName} to update (POST) or remove (DELETE) it. However you should be careful using the API, as you may break things. Both removing and updating the property had the effect that Seeq is opening the formula editor instead of the UI tool. Regards, Thorsten Link to comment Share on other sites More sharing options...
MArgarida Posted May 4, 2023 Author Share Posted May 4, 2023 Hello Thorsten, thanks for your suggestion. i was going to try it but could not really find it, the "You can use the endpoint /items/{id}/properties/{propertyName} to update (POST) or remove (DELETE) it", i mean i can't see your second screenshot. not sure anything to do with my version (R60.1.2)? thanks Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted May 4, 2023 Share Posted May 4, 2023 Hello Margarida, you can access the API Reference by clicking the hamburger button at the top right corner of Seeq: In the API reference you will find an entry called "Items" which has the appropriate methods available. Regards, Thorsten Link to comment Share on other sites More sharing options...
MArgarida Posted May 4, 2023 Author Share Posted May 4, 2023 got it! thank you Link to comment Share on other sites More sharing options...
MArgarida Posted May 5, 2023 Author Share Posted May 5, 2023 Good morning Thorsten, i do see a different screen (i see"property information" instead of "body". I was testing with a different condition, with the respective ID and i thought i would need to use the original text in the UIConfig field and update it? highlighted is the text in my UIConfig? or how exactly should i proceed? Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted May 5, 2023 Share Posted May 5, 2023 Hi Margarida, you can use the following settings in the request body: { "unitOfMeasure": "string", "value": "{\"type\":\"formula\",\"advancedParametersCollapsed\":true,\"helpShown\":false}" } If you want to switch back to the UI tool you should save your previous value somewhere, so you could reuse this in the POST request. Regards, Thorsten 1 Link to comment Share on other sites More sharing options...
patjdixon Posted July 17, 2023 Share Posted July 17, 2023 This is very helpful. I found that you can convert a formula to a tool interface this way. In my case I had prediction models built in DataLab using formulas, but formulas do not show model coefficients. This technique allows me to specify UIConfig as: {"value": "{\"type\":\"prediction\"}”} This converts the formula to a tool interface It should be noted that if you do a "Get" on the property UIConfig for an item created in DataLab, it won't find UIConfig: However, you can still use the API to create UIConfig and it works. When using: {"value": "{\"type\":\"prediction\"}”} it produces to Tool user interface: When using: {"value": "{\"type\":\"formula\"}”} it produces: Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted July 18, 2023 Share Posted July 18, 2023 Hi Pat, that is interesting. When writing the posts above I had tested changing the UIConfig property back and forth with a Value Search and ran into problems: UIConfig is set to "value-search": After changing to "formula" Seeq displays the formula editor when editing the tool: When changing the property back to "value-search" the Value Search tool has no configuration: I just tested this with a daily periodic condition with specific days selected which gave the same results. A prediction that does not have the default values set behaves the same: After changing "UIConfig" to "formula" and back to "prediction" the regression method in the UI has changed to OLS instead of Ridge Regression. although in formula it still uses the regressionModelRidge() function: Executing the tool changes the formula to use regressionModelOLS(). My conclusion: I would not rely on converting a formula back to a tool as long as you do not know the exact parameters for the tool and therefore have the complete UIConfig string. Seeq seems not be able to extract these from the formula. Regards, Thorsten Link to comment Share on other sites More sharing options...
patjdixon Posted August 16, 2023 Share Posted August 16, 2023 Thorsten, unfortunately your right. When I convert to "prediction\" I always get the default configuration of the model, which is linear. My formula has a 3rd order polynomial model, but the conversion makes it linear. That does not work for me. I guess I am really stuck. Link to comment Share on other sites More sharing options...
patjdixon Posted August 16, 2023 Share Posted August 16, 2023 Is there any documentation on the property names or parameters? Perhaps if I knew them I could use the API to set the type as well as the scale, order, regression method, etc so that I could get what I need? Does anyone know where to find such documentation? Link to comment Share on other sites More sharing options...
patjdixon Posted August 26, 2023 Share Posted August 26, 2023 I notice the UIConfig does not show the advanced setting "Limit to condition within training window". In the user interface you can select a condition for limiting the training window. This is different from the hard coded training window dates. If I look for this parameter in UIConfig it does now show up. The WindowStart and WindowEnd are the hard coded dates for Training Window, not related to the condition configured for "Limit to condition ..." The limit to condition does not appear in the formula parameter either: Is there any way to access this parameter from DataLab? Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted August 26, 2023 Share Posted August 26, 2023 Hi Pat, I think "$condition" in the formula is the parameter you are searching for: In Data Lab you should be able to access it via the "Formula Parmeters" column of the data frame: Regards, Thorsten 1 Link to comment Share on other sites More sharing options...
patjdixon Posted August 29, 2023 Share Posted August 29, 2023 Thorsten, yup, that's it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now