# How to predict next failure based on past measurements and failures?

I'm working with a vacuum chamber. I have one test per day in which we test if the chamber's seals are still good enough for operation. In each test I have measurements every 60 seconds for 5 minutes (0, 60, 120, 180, 240, 300 seconds). I know that if the vacuum difference between one measurement and the prior one is bigger than 0.04 the test fails.

This would be a compact dataset: if the last column is a 0 the test went OK. If it is a 1 the test failed.

My goal is to determine when the machine will fail the test, so that the technical team can do some predictive maintenance before the machine breaks down. I started working with survival analysis in R to try to get somewhere, but I'm getting confused since the result of the test (failed or OK) depends on the relation between measurements on that same test.

What would be the best approach for this?

• "I have one test per day" — From the dates in your screenshot, it looks like tests aren't run every day, and sometimes there are two tests in one day. Commented Mar 12, 2017 at 18:51
• That is a compact example of my database and that is why some days might be missing. For the days with two tests: when one test failes the technician services the machine and then the test is run again to see if the result is "OK" Commented Mar 13, 2017 at 9:27
• 10/05/11 has two tests even though both passed. Commented Mar 13, 2017 at 14:25
• You are right. Do you have any suggestion on best practices for predicticting failed tests? Commented Mar 13, 2017 at 14:31
• Not really. I do a lot with predictive models, but my skills are in longitudinal-style analysis, where you have lots of subjects, only a few timepoints each, and a bunch of features you can use for prediction. Here you have only one subject, a lot of timepoints, and no features other than time; this is the usual scenario in time-series analysis. You should probably transform your data to a 1-dimensional time series by replacing each quintent of measurements with $\max\{|t_0 - t_{60}|, |t_{60} - t_{120}|, …, |t_{240} - t_{300}|\}$; then you just need to predict when this hits .04. Commented Mar 13, 2017 at 15:46