Skip to main content

Production Line Stations Maintenance Prediction - Process Flow.

Steps Needed in a Process to Detect Anomalies And Have a Maintenance Notice Before We Have Scrap Created on The Production Line.

Describing my previous articles( 1, 2 ) process flow:

  • Get Training Data.
    • At least 2 weeks of passed units measurements.
  • Data Cleaning.
    • Ensure no null values.
    • At least 95% data must have measurement values.
  • Anomalies Detection Model Creation.
    • Deep Learning Autoencoders.
      • or
    • Isolation Forest.
  • Set Yield Threshold Desired, Normally 99%
  • Get Prediction Value Limit by Linking Yield Threshold to Training Data Using The Anomaly Detection Model Created.
  • Get Testing Data.
    • Last 24 Hour Data From Station Measurements, Passed And Failed Units.
  • Testing Data Cleaning.
    • Ensure no null values.
  • Get Anomalies From Testing Data by Using The Model Created And Prediction Limit Found Before.
  • If Anomalies Found, Notify Maintenance to Avoid Scrap.
  • Display Chart Showing Last 24 Hour Anomalies And Failures Found:

As you can see( Anomalies in blue, Failures in orange ), we are detecting anomalies( Units close to measurement limits ) before failures.

Sending an alert when the first or second anomaly was detected will prevent scrap because the station will get maintenance to avoid failures.

Carlos Kassab

We are using R, more information about R:


Popular posts from this blog

Time Series Analysis With Documentation And Steps I Follow For Analytics Projects.

To do this I will create a prediction of the open values for Bitcoin in the next 3 days.

The process I follow is based on CRISP-DM methodology:

1.- Planning the activities.

To plan the activities I use a spread sheet document, below I show the spread sheet sample, if you would like the document, please go to the next link:

ActivityActivity DescriptionDueDateActivity OwnerStatusCommentsFunctional Requirement SpecificationA Text Document explaining the objectives of this project.4/19/2018Carlos KassabDone
Get Data For AnalysisGet initial data to create feasibility analysis4/19/2018Carlos KassabDone
ETL DevelopmentETL to get final data for next analysis4/20/2018Carlos KassabDone2018/04/19: In this case, there is not ETL needed, the dataset was downloaded from kaggle:…

Using R and H2O to identify product anomalies during the manufacturing process.


We will identify anomalous products on the production line by using measurements from testing stations and deep learning models. Anomalous products are not failures, these anomalies are products close to the measurement limits, so we can display warnings before the process starts to make failed products and in this way the stations get maintenance.

 Before starting we need the next software installed and working:

- R language installed.
- All the R packages mentioned in the R sources.
- Testing stations data, I suggest to go station by station.
- H2O open source framework.
- Java 8 ( For H2O ). Open JDK:
- R studio.

Get your data.
About the data: Since I cannot use my real data, for this article I am using SECOM Data Set from UCI Machine Learning Repository

How many records?:  Training data set - In my real project, I use 100 thousand test passed records, it is around a month of production data. Testing data set - I use …

Displaying our "R - Quality Control Individual Range Chart Made Nice" inside a Java web App using AJAX - How To.

Prerequisites:What you should have installed:Java, it can be OpenJDK, you can get it from here:, any version from 8 up.Eclipse EE: Eclipse IDE for Java EE.Spring Tools Suite For Eclipse: You can install it from Eclipse Marketplace.R: Inside R, at least these packages:install.packages( "tidyverse", dependencies = TRUE )install.packages( "rmarkdown", dependencies = TRUE )install.packages( "dygraphs", dependencies = TRUE )install.packages( "qcc", dependencies = TRUE )install.packages( "rattle", dependencies = TRUE )install.packages( "Rcmdr", dependencies = TRUE )install.packages( "stlplus", dependencies = TRUE )Rstudio, to edit your RMarkdown files:, this is to convert markdown files to html: git utility: