Jump to content

Sanman Mehta

Seeq Team
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Sanman Mehta

  1. Check out the data lab script and video that walks through it to automate data pull->apply ml->push results to workbench in an efficient manner. Of course you can skin the cat many different ways however this gives a good way to do it in bulk. Use case details: Apply ML on Temperature signals across the whole Example Asset Tree on a weekly basis. For your case, you can build you own asset tree and filter the relevant attributes instead of Temperature and set spy.jobs.schedule frequency to whatever works for you. Let me know if there are any unanswered questions in my post or demo. Happy to update as needed. apply_ml_at_scale.mp4 Apply ML on Asset Tree Rev0.ipynb
  2. Yes, in Data Lab users can use spy.pull to get the data and then write it to S3. See attached notebook example written by @Chris Herrera that shows an example of how to write data to S3. Disclaimer: User will have to add their own credentials and unlimited performance is not a guarantee. Reach out to support@seeq.com if your use case is not performing up to your expectations. Publish to S3.ipynb
  3. Hi RMC, I have "been there done that!" Now there is an archive parameter which when set to True will only keep the items from your push the unwanted "append" will not occur. Instead it will give you exactly what you are pushing and archive the rest.
  4. Yes! You can deploy ipywidgets from jupyter notebooks in data lab. Widgets can be great for wrapping code in UI for No-code experience from workbench using Seeq Add-on tools for implementing Machine Learning models. Here is one example for datepicker. import ipywidgets as widgets #import the library widgets.DatePicker( description='Start:', style={'description_width': '150px'}, layout={'width': '300px'}) You can read more about various widgets here: https://ipywidgets.readthedocs.io/en/latest/examples/Widget List.html
  5. Hi Bharat, Check out Table Across Assets: https://seeq.atlassian.net/wiki/spaces/KB/pages/1617592515/Tables#Tables-across-Assets Regards, Sanman
  6. Hi John, The error is pointing to column name having a period (.) Can you try after removing any period from column name in csv file? If you can email me the csv file to (sanman.mehta@seeq.com) I can take a look as well.
  7. Many of you asked for a video so here it is. I too prefer video over text and images. Sanman 1099034144_assettreefromcsvfile.mp4
  8. Here is an example of Scatter plot push. @Asset.Display() def Display(self,metadata,analysis): #define name of worksheet worksheet = analysis.worksheet(self.definition['Name']+' Scatter') #define name of workstep workstep = worksheet.workstep('Trends') # make sure workstep is in Scatter Plot view workstep.view = 'Scatter Plot' # define the display items - need to have at least the 2 signals you want in scatterplot workstep.display_items = [{ 'Item': self.Temperature(metadata) },{ 'Item': self.Relative_Humidity(metadata) }] # define the 2 scatterplot signals workstep.scatter_plot_series = { 'X': {'ID': self.Temperature(metadata)}, 'Y': {'ID': self.Relative_Humidity(metadata)} } return workstep #Thanks @Kjell Raemdonck for the code snippet
  9. TLDR Asset trees are great way to scale your analysis to N number of assets. Currently one needs working knowledge of SPy(Seeq-python) to build multi layered asset tree. With the attached jupyter notebook, Add-on tool can be created as shown here so that users can generate their own multi layered asset trees in their workbenches which can then be shared with colleagues. Pre-Requisite: Seeq Data Lab (powered by SPy module) Detail steps: 1. Get a CSV file (can be done in excel and saved as CSV format) that has hierarchy of your asset tree structure. The columns in screenshot below represent various hierarchical levels (columns A,B,C &D). You don't need exactly 4 columns, the solution supports any number of columns/hierarchical levels. 2. Include a column for "Process Value" (column F in screenshot below) which are your tag values and a column for "Asset Tree Name" which will appear in the tree and are the common attribute names among assets (column E in screenshot below). 3. Use the attached jupyter notebook and create Add-on tool so any user can access the tool from Tools pane in workbench. This is one time step and should be done by someone who has experience with Seeq Data Lab. The Tool name can be "Create Asset Tree from CSV File". Here is KB article on setting up new Add-on tool. https://support.seeq.com/space/KB/961675391/Add-on%20Tool%20Administration%20and%20Development 4. Use attached csv file and have your colleague who knows nothing about python, run the tool. UI is self explanatory as seen below. 5. Refresh the workbench from which user created the Asset Tree and watch the results appear like so: Optional step 6: If there is no Add-on tool available, or you would like to build it step by step then add calculations, roll ups etc., check out the jupyter notebook named step_by_step_asset_tree attached below. Example_SDL_Asset Tree (1).csv Create_asset_tree_with_dynamic_class_attributes.ipynb Step_by_step_asset_tree.ipynb
  10. Hi Tim, If above does not work then reach out to your organization IT helpdesk. Many organizations have internal white listed repositories for users that you should be able point your install commands.
  11. Hi Ali, check out this link: https://www.seeq.com/resources/seeq-university/297-using-formulas-for-calculating-rate-of-change-on-a-process-variable Regards, Sanman
  12. Hi Banderson, you can create a duration signal from each capsule in a condition, using "signal from condition" tool. As you may know these point and click tools create a Seeq formula underneath. So after using point and click signal from condition tool, you can find the syntax of formula in item properties of that calculation. You can copy this syntax and paste it in Formula and use it to further develop your calculations.
  13. Starting with Seeq R. release, user can specify maxValue() and maxKey() on a signal during a capsule to return the scalar values of maximum value and associated time stamp respectively. The example below shows that on Temperature signal, during 16th October (capsule), maxValue() function results in 106.07 ºF and maxKey() function results in associated timestamp 2019-10-16 02:18 am i.e. when maximum temperature occurred. See the 1st image for this example in Seeq: Feel free to try out these formulas on your own: $temperature.maxKey(capsule('2019-10-16T00:00Z','2019-10-17T00:00Z')) $temperature.maxValue(capsule('2019-10-16T00:00Z','2019-10-17T00:00Z')) Oh one more thing, you can also create signals that return one value from each capsule within a condition. Where value can be maxValue(), minValue(), maxKey(), minKey(). Below is one such example and an image showing that you can create signal that represents minimum values at minimum key (time) on daily basis: $signal.aggregate(minValue(), $condition, minKey()) As always detailed information can be found in formula tool panel documentation search box in Seeq application. Still want more Seeq info? Check out what else is new in R21.0.44.00: https://seeq12.atlassian.net/wiki/spaces/KB/pages/571375775/What+s+New+in+R21.0.44
  14. There are many ways to accomplish this task. See below for one example formula that you can paste into the formula tool and apply to input signal. You can also checkout the comments to see how it works and ways to tweak it. The transform function is very powerful and it allows the user to evaluate expressions from input signals to create new derived signals with applied logic. $boolean = $signal.transform($s ->sample($s.getkey(), 1 * $s.getValue().isValid()), 1 d).toStep() //in the above formula, $signal is the input signal that has missing data gaps. //boolean variable is created and will return either 1 or 0 based on whether "isValid()" is true or not respectively. When there is gaps in the data the //resulting signal is zero and when there is valid value, the result is 1. $boolean * $signal.setMaxInterpolation(1wk).validValues() //the next step is to use the calculated $boolean signal above and multiply it (0 or 1) with original input signal to get actual values and gaps will be //replaced with zeros. //$signal again is the input signal with missing data. //setMaxInterpolation (1wk) can be increased as needed to fill the data gap with zero.
  • Create New...