How-To Guides
Analytics Guides

Use the Feature Extractor Function

6min
you can use the feature extractor processor function to extract meaningful patterns and characteristics from raw plc data, transforming complex data into features that machine learning models can easily understand and utilize user scenario review the following scenario for the feature extraction processor function then, using an input processor, you will simulate plc data and extract features from the window of generated values in a food processing plant, plcs are placed strategically along the production line to monitor the moisture content of products as they pass through ovens and cooling stations using a window of n values, you can calculate the average and median moisture content at critical stages of the production process additionally, to assess the consistency of moisture levels, you can use the standard deviation and variance functions of the feature extractor processor to provide real time data analysis and actionable insights it helps to identify and address optimal features, preventing product spoilage and ensuring that each batch meets the company's strict standards step 1 add a device follow the steps to connect a device docid\ nm1lqfefya dsiffitity and configure the following parameters device type simulator driver name generator enable alias topics select the checkbox step 2 add tags after connecting the device, add the following tag see add tags docid\ h5heqicxrcy3nch9kbg9i to learn more tag 1 moisture name select s random value generator value type select float64 polling interval enter 5 tag name enter moisture min value enter 1 max value enter 199 step 3 create analytics flows you can now create the analytics flows using data from the device and tag you previously created to create an analytics flow with the feature extraction processor function navigate to analytics on the analytics canvas, click add processor the create a processor dialog box displays select datahub subscribe in the topic field, click the search icon, select the device you previously created, and then select the alias topic for the moisture click save click add processor again and select the feature extractor processor the following information defines this function window size enter the number of values you want the function to consider timeinterval you can set a timer in milliseconds to push values set the timer to zero if you don't want to use it feature options select the average , median , standard deviation , and variance checkboxes to view your output click save connect the datahub subscribe processor (tag moisture ) to the feature extractor processor with a wire and use the events connection on the analytics canvas, click save the configured analytics flows should look like the following step 4 view output of processor click the view icon in the feature extractor processor to view the output values before you can see any output, the input window size needs to be filled after that, the output will include the prediction along with its timestamp