Jump to content
  • To Search the Seeq Knowledgebase:

    button_seeq-knowledgebase.png.ec0acc75c6f5b14c9e2e09a6e4fc8d12.png.4643472239090d47c54cbcd358bd485f.png

Search the Community

Showing results for tags 'prediction'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • Tips & Tricks
    • General Seeq Discussions
    • Seeq Data Lab
    • Seeq Developer Club
    • Seeq Admin Forum
    • Feature Requests

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Company


Title


Level of Seeq User

Found 13 results

  1. Hello everyone, recently I started a project and one of my goals is create a forecast profile for my HCl tank level. When we do a regeneration in Ion Exchanger columns my tank level decreases. I want to predict when my level tank reaches 28%, but because of the behavior of the signal looks like a ladder, and we have the load of tanking, my forecast only can predict near to the target. For example, if my tank level is 80%, my forecast shows stable consumption is lower variation, whereas in fact my consumption is more like a drop. How can I teach SeeQ to understand the decreasing rate tank to predict in advance?
  2. I am currently testing the idea to run a prediction for a large number of signals, generated from an Asset Tree. Are there any performance traps to be careful of? Are there any events that can cause the prediction model to be refit (other than updating the training window or inputs)? This is the function we are looking at using. $target.regressionModelOLS($training, false, $signal) .predict($signal) These signals will be used to generate treemaps, organizer topics and potentially Odata endpoints.
  3. Seeq Version: R21.0.42+ Question: How can i create a signal that forcasts a value out into the future based on some rolling period of historical data? For this example say i want to predict the Area A Temperature 3 days in the future based on the previous week (7 days) of data.
  4. When creating signal forecasts, especially for cyclic signals that degrade, we often use forecastLinear() in formula to easily forecast a signal out into the future to determine when a threshold is met. The methodology is often the same regardless of if we are looking at a filter, a heat exchanger, or any other equipment that fouls overtime or any equipment that needs to go through some periodic maintenance when a KPI threshold is met. A question that comes up occasionally from users is how to create a signal forecast that only uses data from the current operation cycle for signal forecasting. The forecastlinear() operator only takes into account a historical training period and does not determine if that data is coming from the current cycle or not (which results in unexpected results). Before entering the formula, you will need to define: a condition that identifies the current cycle, here i have called it "$runningCycle" a Signal to do a linear forecast on, i have called it "$signal" To forecast out into the future based on only the most recent cycle, the following code snippet can be used in formula: $training = $runningCycle.setmaximumduration(10d).toGroup(capsule(now()-2h, now())) $forecast=$Signal.predict($training, timesince(toTime('2000-01-01T00:00Z'))) $signal.forecastSplice($forecast, 1d) In this code snippet, there are a few parameters that you might want to change: .setMaximumDuration(10d): results in a longest cycle duration of 10 days, this should be changed to be longer than the longest cycle you would expect to see capsule(now-2h, now()): this creates a period during which seeq will look for the most recent cycle. In this case it is any time in the last 2 hours. If you have very frequent data (data comes in every few seconds to minutes) then 2 hours or less will work. If you have infrequent data (data that comes in once a day or less) then extend this so that it covers the last 3-4 data points. $signal.forecastSplice($forecast, 1d): When using forecastLinear(), there is an option to force the prediction through the last sample point. This date parameter (1 day in this case) does something similar- it blends the last historical data point with the forecast over the given time range. In other words, if the last data point was a value of 5, but my first forecasted datapoint had a value of 10, this parameter is the time frame over which to smooth from the historical data point to the forecast. Here is a screenshot of my formula : and the formula in action:
  5. When you are evaluating the efficacy of a regression, there a few commons methods. You might simply take the difference between your predicted value and your actual value, then create capsules when this value deviates from some critical magnitude. I'll outline an alternative approach, by calculating the r-squared (r2) value over each capsule (in my case, days), but this can be applied to any condition like batches or a Manual Condition of training and validation. The general outline is: 1. Build a prediction in Seeq using the Prediction tool. You can specify your training window by a condition or simply start and end time. More details in our Knowledge Base article: https://support.seeq.com/space/KB/143163422/Prediction 2. Create a condition in which you want to compare R2 values. In this example, I'll simply use a Periodic Condition of days. 3. Resample your predicted value based on your original value. Seeq's resample function allows an input of another signal, which is particularly critical if your model inputs have varying sample rates. This will eliminate any error that would of otherwise been introduced by oversampling of your prediction and interpolation issues. 4. Calculate the R2 value over the condition from Step #2 using the following Formula. $ym = $signal.aggregate(average(), $days, startkey()).toStep() $total = (($signal-$ym)^2).aggregate(sum(), $days, startkey()) $residual = (($signal-$prediction)^2).aggregate(sum(), $days, startkey()) $r2 = (1-($residual/$total)).toStep() return $r2 You can continue your Analysis by building a Value Search for when your R2 deviates below a given threshold - or summarize your results in your Organizer Topic. Feel free to reach out with any questions or improvement ideas! Happy Seeqing! -Chris O, Seeq Analytics Engineer
  6. The following steps will create a prediction model for every capsule in a condition. Step 1. pick a condition with capsules that isolate the desired area of regression. Any condition with non-overlapping capsules will work as long as there are enough sample points within its duration. For this example, an increasing temperature condition will be used. However, periodic conditions and value search conditions will work as well. Step 2. Create a time counter for each capsule in the condition. This can be done with the new timesince() function in the formula tool. The timesince() function will have samples spaced depending on the selected period so it is important to select a period that has enough points to build a model with. See below for details on the timesince() formula setup. Step 3. In this step a condition with capsule properties that hold the regression constants will be made. This will be done in the formula tool with one formula. The concept behind the formula below is to split the condition from step one into individual capsules and use each of the capsules as the training window for a regression model. Once the regression model is done for one capsule the coefficients of the model are assigned as properties to the capsule used for the training window. The formula syntax for a linear model-based condition can be seen below. An example of a polynomial regression model can be found in the post below. $Condtition.removeLongerThan(24h).transform($cap-> { $model=$SignalToModel.validValues().regressionModelOLS( group($cap),false,$Time) $cap.setProperty('Slope',$model.get('coefficient1')) .setProperty('Intercept',$model.get('intercept'))}) Below is a screenshot of how the formula looks in Seeq. Note: The regression constants can be added to the capsule pane by clicking on the black stats button and selecting add column. Below is a screen shot of the results. Step 4. Once a condition with the regression coefficients has been created the information will need to be extracted to a signal form. The following formula syntax will extract the information. This will need to be repeated for every constant from your regression model. e.g.(So for a linear model this must be done for both the slope and for the intercept.) The formula syntax for extracting the regression coefficients can be seen below. $signal=$Condition.transformToSamples( $cap -> sample($cap.getmiddle(), $cap.getProperty('Intercept').toNumber()), 1min) $signal.aggregate(average(),$Condition,durationKey()) Below is a screenshot of the formula in Seeq. Below is a screenshot of the display window of how the signals should look. Step 5. Use the formula tool to plot the equation. See screenshot below for details. Final Result
  7. Another common question through the support portal this morning that is of general interest To help with this example I am going to create a quick polynomial prediction using Data from Area C in the example set. Our target is going to be to try to predict compressor power as a function of all of the input weather signals If you wanted to re-create this prediction model in excel or another tool you need the coefficients from block #1 in the screenshot above and the y-intercept from block #2 in the screenshot. Inside of the workbench tool you will see rounded values for each of the coefficients and intercepts but the full values are available when you copy them to the clipboard by clicking the little button highlighted in red. To fill out the example in excel the formula will look like the following $temperature^2 * -0.000230 + $temperature * 0.0607 + $WB^2 * 0.000646 + $WB * -0.101 + 6.5946 A final point to mention here is that for multi-variable regressions with many input signals it is important to take a minute and evaluate the p-values listed in the coefficient table. If the p-values for any coefficient are above 0.05 it is best practices to rethink if that signal needs to be included in the model at all or if you may need to perform data data cleansing or re-alignment to create a better performing model. Good blog post on P-values - https://medium.com/analytics-vidhya/understanding-the-p-value-in-regression-1fc2cd2568af Great reference post on how to optimize regression models using time shifting -
  8. Using some of the new Asset Group features in R52 we can easily create unique prediction training ranges for each asset. In this example we are going to create three separate training ranges for three assets. Step 1 - Find the assets you want to model with your prediction and add them to a new asset group Step 2 - Create a Manual Condition for each asset with your desired training range for each particular asset. These training ranges can be as simple as single capsules or as complex as a Manual Condition combined with a mode of operation condition. Step 3 - Add the manual conditions to your asset group as a new "Training Range" column Step 4 - Create the prediction using the signals and the condition from the asset group. Key points in the prediction tool is to make sure that you select a wide training window that encompasses the ranges of all the individual assets. Under the advanced section select the training range condition we created in Step 3. You now have a Temperature Model signal that you can "swap" across all assets in your group with different training ranges in on each of the assets.
  9. Use Case: It is common in industry to seek to use the behavior of upstream process variables to predict what the behavior of a downstream variable might be minutes, hours or days from the present time. Solution: A traditional predictive modeling workflow can be applied to solve this problem. Identify an appropriate training data set Perform any necessary data cleansing Create a predictive model Evaluate the model fit Improve the model Operationalize the model What differentiates this use case from any other predictive modeling use case is a specific data cleansing step for adjusting signals to remove process lag. 1. Load Data Load your target signal and the relevant upstream signals into the display pane. In this example, the target signal is the product viscosity, measured in an analytical lab based off a sample from a downstream sample point. Three upstream signals: the reactor temperature, reactant conversion, and viscosity modifier flow to the reactor significantly influence the product viscosity measurement and will be used as inputs into the model signal. 2. Identify Training Data Set Identify an appropriate training data set for your regression model. This may involve a longer time window to include variability in product type or seasonality. In this example, we will pan out to 3 months to capture multiple cycles of different product types. With an appropriate training window identified, you can also limit your training data set to a subset of samples present during a particular condition. If this interests you, consult the "advanced options" section of the Prediction Tool KB article for more information. This method is particularly useful if you're wishing to create different models for different modes of operation. 3. Cleanse Signals -- Adjust for Process Lag We can time-shift our upstream signals using either a known constant delay, a known variable delay (like a calculated residence time signal), or an unknown delay of maximum correlation to the target signal. The first two of these options will utilize the .move() function in Formula (or .delay() in earlier versions of Seeq). The latter will utilize the .correlationOffset() function. In this example, we have a known lag of 1.5 hours between the reactor and the product sampling point. We will use the move function with an input scalar of 1.5h, as shown below. The time shift calculation should be applied across all relevant input signals. More information on the different options for time shifting signals using fixed, variable, or calculated offsets is available in this forum post: 4. Cleanse Signals -- Remove signal noise, outliers, abnormal operating data In this example, we apply an agileFilter to each of our time-shifted model input signals. Apply the same technique to each of the model inputs. Note that steps 3 & 4 could have been combined into a single formula. An example of this would be: $reactor_temp.move(1.5h).agileFilter(1min) For guidance on additional cleansing techniques, consult the Interactive Training. 5. Build the Predictive Model Use the Prediction tool panel to create a model of your target signal based on your cleansed, time-adjusted input signals. Ensure your model training window matches the date range that you identified in step 2. You can view the model parameters like coefficients, rSquared, and p-values using the "+ Prediction Model" option. 6. Evaluate the Model Fit Use Scatter Plot view and the model parameters to evaluate the goodness of fit of the model. Switch to a time range outside of your training data set to ensure your model is a good fit for data throughout time. 7. Improve Model (as needed) If the scatter plot indicates a non-linear relationship, test out additional model scales in the prediction tool panel. Consider eliminating variables with p-values higher than your significance level cutoff (frequently 0.05). Add additional variables if relevant. If distinct modes of operation introduce significant signal variability, consider creating a model for each operating mode and stitch the models together into a single model using the splice() function in Formula. 8. Deploy the Model The model should project out into the future by the amount of the process lag between the upstream and target signals.
  10. When addressing a business problem with analytics, we should always start by asking ourselves 4 key questions: Why are we talking about this: what is the business problem we are trying to address, and what value will solving this problem generate? What data do I have available to help with solving this problem? How can I build an effective analysis to identify the root of my problem (both in the past, and in future)? How will I visualize the outputs to ensure proactive action to prevent the problem from manifesting? This is where you extract the value. With that in mind, please read below how we approach the above 4 questions while working in Seeq to deal with heat exchanger performance issues. What is the business problem? Issues with heat exchanger performance can lead to downstream operational issues which may lead to lost production and revenue. To effectively monitor the exchanger, a case-specific approach is required depending on the performance driver: Fouling in the exchanger is limiting heat transfer, requiring further heating/cooling downstream Fouling in the exchanger is limiting system hydraulics, causing flow restrictions or other concerns Equipment integrity, identify leaks inside the exchanger What Data do we have available? Process Sensors – flow rates, temperatures, pressures, control valve positions Design Data – drawings, datasheets Maintenance Data – previous repairs or cleaning, mean-time between cleanings How can we tackle the business problem with the available data? There are many ways to monitor a heat exchanger's performance, and the selection of the appropriate indicator depends on a) the main driver for monitoring and b) the available data. The decision tree below is merely meant to guide what indicators can be applied based on your dataset. Generally speaking, the more data available, the more robust an analysis you can create (ie. first principles based calculations). However, in the real world, we are often working with sparse datasets, and therefore may need to rely on data-based approaches to identify subtle trends which indicate changes in performance over time. Implementing each of the indicators listed above follow a similar process in Seeq Workbench, as outlined in the steps below. In this example, we focus on a data-based approach (middle category above). For an example of a first-principles based approach, check out this Seeq University video. Step 1 - Gather Data In a new Workbench, search in the Data Tab for relevant process signals Use Formula to add scalars or use the .toSignal() function to convert supplemental data such as boundary limits or design values Use Formula, Value Search or Custom Condition to enter maintenance period(s) and heat exchanger cycle(s) conditions (if these cannot be imported from a datasource) Step 2 - Identify Periods of Interest •Use Value Search, Custom Condition, Composite Condition or Formula to identify downtime periods, periods where exchanger is bypassed, or periods of bad data which should be ignored in the analysis Step 3 - Cleanse Data Use Formula to remove periods of bad data or downtime from the process signals, using functions such as $signal.remove($condition) or $signal.removeOutliers() Use Formula to smooth data as needed, using functions such as $signal.agileFilter() or the Low Pass Filter tool Step 4 - Quantify Use Formula to calculate any required equations In this example, no calculations are required. Step 5 - Model & Predict Use Prediction and choose a process signal to be the Target Variable, and use other available process signals as Input Variables; choose a Training Period when it is known the exchanger is in good condition Using Boundaries: establish an upper and lower boundary signal based on the predicted (model) signal from previous step (e.g. +/-5% of the modeled signal represents the boundaries) Step 6 - Monitor Use Deviation Search or Value Search to find periods where the target signal exceeds a boundary(ies) The deviation capsules created represent areas where heat exchanger performance is not as expected Aggregate the Total Duration or Percent Duration statistic using Scorecard or Signal From Condition to assess deteriorating exchanger health over time How can we visualize the outputs to ensure proactive action in future? Step 7 - Publish Once the analysis has been built in a Seeq Workbench, it can be published in a monitoring dashboard in Seeq Organizer as seen in the examples below. This dashboard can then be shared among colleagues in the organization, with the ability to monitor the exchanger, and log alerts and take action as necessary as time progresses - this last step is key to implementing a sustainable workflow to ensure full value is extracted from solving your business problem.
  11. Scenario: I have created a regression or prediction model for my process but i want to apply that same regression model to another set of signals or a different period of time. This could be helpful for comparing how one piece of equipment is operating when compared against a regression built for another system. It could be used to predict how a system will behave based on how some other similar system behaved. It could be used predict how a system will behave before you have enough information to build that system or run its own model, or any number of applications where we might want to apply a regression or prediction model built on one set of signals to another set of signals. Solution: First off, we have to build a prediction model! In this case i have modeled a Filtration system, predicting filter head loss. I took into account the time the filter has been in service, the raw water turbidity, and the Filter turbidity. Next, if i click on the information icon for my prediction signal, i am able to see the formula that was used to create this prediction. We will need to copy this formula: Next, I need to identify my new signals. In my case, i am going to apply this prediction model to Filter 12. Once i have all of my signals that will be sued to the prediction i can paste my formula into a new formula and make sure all my variables line up (or, alternately and a bit easier, just use the duplicate to formula function from the information screen shown above by clicking on the down arrow next to the duplicate button). Finally, I need to update the PREDICT section of my formula denoted by the .predict() function with the signals i will apply my prediction model to. I can do this by using the search button in the formula tool to add my new signals, and then update the .predict() section of my formula with my new variables, make sure to put them in correctly and in the right order otherwise your model will be off! Finally, i can use my prediction model that i built for Filter 1 on Filter 12 and derive further insight, in this case i might question whether my systems are truly as similar as i think they are or whether there is something causing my model to deviate from what was expected for filter 12. In my case, both prediction models are in red:
  12. Hi All, I'm working on some data , wherein i have 6 Independent variable and 1 dependent variable. while running the Regression model on this data, i get very less Accuracy of model as mentioned in below screenshot. Note :- As far as data Pre-processing is concern , i have scale the features and also imputes the missing values on the basis of mean imputation. Do let me know if there's any pre-processing feature is there in seek to deal with data. Regards, JItesh Vachheta
  13. When performing certain types of analysis, it is desirable to combine past measured data with some future prediction, whether that prediction is dynamic or static. Future predicted data can be used for degradation or maintenance date predictions, future performance modeling, signal forecasting, or a wide variety of other potential use cases. Combining some future data with a measured signal is simple in Seeq! Another major benefit? As new data comes in the predicted values can be automatically updated with the actual data! Here is one way to join past measured data with some future forecast signal. Signals To combine measured and forecasted data we will need: Measured Data - a signal(s) that will replace the predicted signal as it becomes available Prediction / Forecast Signal - This could be a flat signal entered in formula, a signal developed in the prediction tool, or some other signal that extends out into the future Method for Combining the Signals 1. Create the Master Signal In formula, use the forecastSplice() operator to join the Measured Data and the Forecast Signal $measuredData.forecastsplice($forecastSignal) The Master Signal now appears as solid line where points are known, and dashed line where the points are still uncertain and expected to change. This is slightly different from the view shown above where the entire Master Signal was dashed due to uncertainty of future data. This helps the Seeq user to visually see where the Measured Data ends and where our Forecast Signal begins. Just as the above formula, the forecastSplice() will update as new data comes in Another operator, forecastConstant() can also be used. This would do something similar to what is shown above, however, instead of combining the Forecast Signal with the Measured Data, forecastConstant() would project the last value for the Measured Data into the future for some specified amount of time i.e. $measuredData.forecastConstant(1d) would create a Master Signal where the forecast is projected 1 day into the future: 2. Make sure the Master Signal is Auto-Updating By default when the page is loaded or the time range adjusted, the Master Signal will be recalculated and any new data from the Measured Signal will replace the Forecast Signal. Additionally, the analysis can be set to Auto Update. Content Verified DEC2023
×
×
  • Create New...