Jump to content

patjdixon

Super Seeqer
  • Posts

    94
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by patjdixon

  1. I think you are right.  Everything seems to work.  I do want the links in the template, but I need to figure out how to get the instance to have those figures (Trend, XY Plot, Table) configured so I don't have to manually recreate them.  I think the Mustache templating system will help.

    Actually, looking at the "Workbook Templates" help, it looks like Mustache would only allow variables that are text or signals, not worksteps that would open preset Trend, XY Plot, Table, etc.  Therefore, I think I just have to live with the error messages; I don't see another way.

  2. I found a problem.  Append does not append the worksheets in the workbook.  The template worksheet ID gets pushed and just replaces the worksheet that is there.  When you change the worksheet name, the ID is retained so you do not add another worksheet.  It just renames the worksheet already there.  I need a way to append a workbook with instances of the template worksheet.  Ideas?

  3. I am trying to follow 'Workbook Templates' example in SPy documentation to push a worksheet template into a workbook.  I believe the correct command is:

    spy.push(workbook={new workbook ID that I am pushing to}, worksheet={template worksheet ID that I want to insert into the new workbook})

    I find the push gives me a link to the correct workbook that I want to push to, but no worksheet is inserted.  I know that the template worksheet is the correct ID.  If I replace the worksheet ID with a string for a worksheet name, it will insert a blank worksheet with that name.  

    See attached files.  What am I doing wrong?

     

    seeq_push_code_2023-06-21 at 9.25.11 PM.jpg

    seeq_push_instance_2023-06-21 at 9.23.53 PM.jpg

    seeq_push_template_2023-06-21 at 9.22.57 PM.jpg

    CreateInstancesFromTemplates.ipynb

  4. Until R60 I had a script that used ".document" to save images to file.  Now I get a warning that this is a deprecated function.  It is suggested to replace it with AnalysisWorksheet "journal" or TopicDocument "report".  I am looking for some examples of what this should be changed to.  Any suggestions?

     

    seeq_depracateddocument_2023-06-07 at 12.52.17 PM.jpg

    seeq_depracateddocument_code1_2023-06-08 at 2.52.59 PM.jpg

    seeq_depracateddocument_code2_2023-06-08 at 2.52.35 PM.jpg

    seeq_depracateddocument_code3_2023-06-08 at 2.53.28 PM.jpg

  5. I have a DataLab script that has worked until R60.  Now I get 

    InvalidIndexError: (slice(None, None, None), None)

    on the "plot" argument of matplotlib.pyplot.  I suspect the issue is that the format of the ydata argument has changed:

    Lab_Pred_Fig = plt.figure(figsize=[20,10])
    ax = Lab_Pred_Fig.add_subplot(1, 1, 1) 

    ax.plot(xdata, ydata)

    xdata is a simple list, but ydata is obtained from a spy.pull as shown here:

    322753013_seeq_plotbroker60_22023-06-05at4_08_52PM.jpg.37b93e84197656034da82bbd03197a69.jpg

    How do I fix this in R60?

     

    seeq_plotbroker60_2023-06-05 at 4.05.51 PM.jpg

  6. If you use a formula to create a regression model, such as:

    $target.regressionModelOLS($training,
        false,
        $signal1, $signal2)

    you cannot access model statistics and coefficients, like these:

    298794437_Screenshot2023-05-20at11_51_50PM.thumb.jpg.21377445bb217e3184815cd469f54494.jpg

    Therefore, to get this data you need to use the Get() function.  However, it does not work on an existing model.  It only seems to work if the model is created in the same formula as the Get() function

    Is there any work around?  I was hoping DataLab might help, but if I search the prediction tag for all properties I get 23 columns, none of which are coefficients.

    1964657804_seeq_get_2023-05-20at11_56_53PM.thumb.jpg.4782e5c648296e0020ca6cc540f0a048.jpg

    seeq_get_2023-05-20 at 11.35.32 PM.jpg

    seeq_get_2023-05-20 at 11.40.59 PM.jpg

  7. Hurrah, done!  

    Mark, thanks for hanging in there.  I know I was slow on the uptick, but when I finally figured out the dictionary list thing it worked.  The problem I had is that I did not know what format Formula Parameters was.  

    The fixed code is attached.

    My next issue is going to be getting model coefficients.  When you create a regression model with a formula instead of using the WorkBench 'Model & Predict' interface, you cannot see the statistics and model coefficients.  The Get() formula does not seem to work unless you re-specify the model formula.  I am going to create a separate topic on that.

    seeq_formparams_2023-05-20 at 11.24.12 PM.jpg

    seeq_formparams_2023-05-20 at 11.24.48 PM.jpg

    seeq_formparams_2023-05-20 at 11.25.10 PM.jpg

    PM_SIM_SetModels_230416.ipynb

  8. The issue is that a variable used for Formula Parameters requires some unknown format or syntax, or can't be done at all.

    In the first attachment, I use a hard coded Formula Parameters argument, and it works as expected

    In the next attachment, I use the variable FormulaList with the ID appended and I get a syntax error

    In the last attachment, I format FormulaList as a string and the push fails

    Has anyone ever done this successfully? 

     

    seeq_formparams_2023-05-20 at 9.49.12 AM.jpg

    seeq_formparams_2023-05-20 at 9.50.07 AM.jpg

    seeq_formparams_2023-05-20 at 9.50.57 AM.jpg

×
×
  • Create New...