Detect the time at which deviation occurs in time series data












2












$begingroup$


I working on multivariate time series data. I have sensor data generated by a machine every time it is operated. Data set consists of machine_ID(machines of same model), hours_ operated, measurements from various sensors. The machine starts to degrade after operating for certain hours. I would like to find the hours after which there is step change after which the performance starts to degrade.



I want to do this using machine learning approach preferably and would like to plot the graph marking the deviation. Which ML techniques could be used for this approach.



Here is how the plot of values 'sensor 2' from run-to-failure



Snapshot of data



I have performed exploratory data analysis where I could find the point at which there is deviation occurrence. Now, I want to confirm this by running a model to detect the occurrence of step change. In the figure above, the decline starts somewhere at 100 and decline gradually. Now, is there any way I could find this pint through models.



I greatly appreciate any links or suggestion to deal with this.



Thanks in advance.










share|improve this question











$endgroup$




bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • $begingroup$
    Do you have a time series for the performance measurement as well?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:04










  • $begingroup$
    No, all that I have is run-to-failure data of each machine. There are about 100 machines. Max hours of operation is 386 and min is 127.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:21






  • 1




    $begingroup$
    Are you trying to predict when the machine is going to fail then? If you don't have performance measurement then how do you define the "deviation" in performance in the first place?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:28










  • $begingroup$
    Eventually my goal is to predict failure time but the data is synthesized and has unrealistic run time. In the sense, from the plot of hours of operation, degradation is linear till the failure. I have gone through few research papers which use piece-wise linear approximation to have a maximum limit of time to failure till there is step change. So, I would to run a model which could learn from the features to find when there is a deviation/step change (after x hours). So, I could set maximum operating hours to x hours till that point is reached.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:36










  • $begingroup$
    "degradation is linear till the failure". if you don't have any measure of performance, how are you measuring the degradation here? Can you include a snapshot of your dataset to make this clearer?
    $endgroup$
    – Louis T
    Nov 8 '17 at 23:45
















2












$begingroup$


I working on multivariate time series data. I have sensor data generated by a machine every time it is operated. Data set consists of machine_ID(machines of same model), hours_ operated, measurements from various sensors. The machine starts to degrade after operating for certain hours. I would like to find the hours after which there is step change after which the performance starts to degrade.



I want to do this using machine learning approach preferably and would like to plot the graph marking the deviation. Which ML techniques could be used for this approach.



Here is how the plot of values 'sensor 2' from run-to-failure



Snapshot of data



I have performed exploratory data analysis where I could find the point at which there is deviation occurrence. Now, I want to confirm this by running a model to detect the occurrence of step change. In the figure above, the decline starts somewhere at 100 and decline gradually. Now, is there any way I could find this pint through models.



I greatly appreciate any links or suggestion to deal with this.



Thanks in advance.










share|improve this question











$endgroup$




bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • $begingroup$
    Do you have a time series for the performance measurement as well?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:04










  • $begingroup$
    No, all that I have is run-to-failure data of each machine. There are about 100 machines. Max hours of operation is 386 and min is 127.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:21






  • 1




    $begingroup$
    Are you trying to predict when the machine is going to fail then? If you don't have performance measurement then how do you define the "deviation" in performance in the first place?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:28










  • $begingroup$
    Eventually my goal is to predict failure time but the data is synthesized and has unrealistic run time. In the sense, from the plot of hours of operation, degradation is linear till the failure. I have gone through few research papers which use piece-wise linear approximation to have a maximum limit of time to failure till there is step change. So, I would to run a model which could learn from the features to find when there is a deviation/step change (after x hours). So, I could set maximum operating hours to x hours till that point is reached.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:36










  • $begingroup$
    "degradation is linear till the failure". if you don't have any measure of performance, how are you measuring the degradation here? Can you include a snapshot of your dataset to make this clearer?
    $endgroup$
    – Louis T
    Nov 8 '17 at 23:45














2












2








2


2



$begingroup$


I working on multivariate time series data. I have sensor data generated by a machine every time it is operated. Data set consists of machine_ID(machines of same model), hours_ operated, measurements from various sensors. The machine starts to degrade after operating for certain hours. I would like to find the hours after which there is step change after which the performance starts to degrade.



I want to do this using machine learning approach preferably and would like to plot the graph marking the deviation. Which ML techniques could be used for this approach.



Here is how the plot of values 'sensor 2' from run-to-failure



Snapshot of data



I have performed exploratory data analysis where I could find the point at which there is deviation occurrence. Now, I want to confirm this by running a model to detect the occurrence of step change. In the figure above, the decline starts somewhere at 100 and decline gradually. Now, is there any way I could find this pint through models.



I greatly appreciate any links or suggestion to deal with this.



Thanks in advance.










share|improve this question











$endgroup$




I working on multivariate time series data. I have sensor data generated by a machine every time it is operated. Data set consists of machine_ID(machines of same model), hours_ operated, measurements from various sensors. The machine starts to degrade after operating for certain hours. I would like to find the hours after which there is step change after which the performance starts to degrade.



I want to do this using machine learning approach preferably and would like to plot the graph marking the deviation. Which ML techniques could be used for this approach.



Here is how the plot of values 'sensor 2' from run-to-failure



Snapshot of data



I have performed exploratory data analysis where I could find the point at which there is deviation occurrence. Now, I want to confirm this by running a model to detect the occurrence of step change. In the figure above, the decline starts somewhere at 100 and decline gradually. Now, is there any way I could find this pint through models.



I greatly appreciate any links or suggestion to deal with this.



Thanks in advance.







machine-learning python deep-learning time-series anomaly-detection






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 '17 at 16:40







Katherine

















asked Nov 8 '17 at 20:43









KatherineKatherine

162




162





bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • $begingroup$
    Do you have a time series for the performance measurement as well?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:04










  • $begingroup$
    No, all that I have is run-to-failure data of each machine. There are about 100 machines. Max hours of operation is 386 and min is 127.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:21






  • 1




    $begingroup$
    Are you trying to predict when the machine is going to fail then? If you don't have performance measurement then how do you define the "deviation" in performance in the first place?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:28










  • $begingroup$
    Eventually my goal is to predict failure time but the data is synthesized and has unrealistic run time. In the sense, from the plot of hours of operation, degradation is linear till the failure. I have gone through few research papers which use piece-wise linear approximation to have a maximum limit of time to failure till there is step change. So, I would to run a model which could learn from the features to find when there is a deviation/step change (after x hours). So, I could set maximum operating hours to x hours till that point is reached.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:36










  • $begingroup$
    "degradation is linear till the failure". if you don't have any measure of performance, how are you measuring the degradation here? Can you include a snapshot of your dataset to make this clearer?
    $endgroup$
    – Louis T
    Nov 8 '17 at 23:45


















  • $begingroup$
    Do you have a time series for the performance measurement as well?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:04










  • $begingroup$
    No, all that I have is run-to-failure data of each machine. There are about 100 machines. Max hours of operation is 386 and min is 127.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:21






  • 1




    $begingroup$
    Are you trying to predict when the machine is going to fail then? If you don't have performance measurement then how do you define the "deviation" in performance in the first place?
    $endgroup$
    – Louis T
    Nov 8 '17 at 21:28










  • $begingroup$
    Eventually my goal is to predict failure time but the data is synthesized and has unrealistic run time. In the sense, from the plot of hours of operation, degradation is linear till the failure. I have gone through few research papers which use piece-wise linear approximation to have a maximum limit of time to failure till there is step change. So, I would to run a model which could learn from the features to find when there is a deviation/step change (after x hours). So, I could set maximum operating hours to x hours till that point is reached.
    $endgroup$
    – Katherine
    Nov 8 '17 at 21:36










  • $begingroup$
    "degradation is linear till the failure". if you don't have any measure of performance, how are you measuring the degradation here? Can you include a snapshot of your dataset to make this clearer?
    $endgroup$
    – Louis T
    Nov 8 '17 at 23:45
















$begingroup$
Do you have a time series for the performance measurement as well?
$endgroup$
– Louis T
Nov 8 '17 at 21:04




$begingroup$
Do you have a time series for the performance measurement as well?
$endgroup$
– Louis T
Nov 8 '17 at 21:04












$begingroup$
No, all that I have is run-to-failure data of each machine. There are about 100 machines. Max hours of operation is 386 and min is 127.
$endgroup$
– Katherine
Nov 8 '17 at 21:21




$begingroup$
No, all that I have is run-to-failure data of each machine. There are about 100 machines. Max hours of operation is 386 and min is 127.
$endgroup$
– Katherine
Nov 8 '17 at 21:21




1




1




$begingroup$
Are you trying to predict when the machine is going to fail then? If you don't have performance measurement then how do you define the "deviation" in performance in the first place?
$endgroup$
– Louis T
Nov 8 '17 at 21:28




$begingroup$
Are you trying to predict when the machine is going to fail then? If you don't have performance measurement then how do you define the "deviation" in performance in the first place?
$endgroup$
– Louis T
Nov 8 '17 at 21:28












$begingroup$
Eventually my goal is to predict failure time but the data is synthesized and has unrealistic run time. In the sense, from the plot of hours of operation, degradation is linear till the failure. I have gone through few research papers which use piece-wise linear approximation to have a maximum limit of time to failure till there is step change. So, I would to run a model which could learn from the features to find when there is a deviation/step change (after x hours). So, I could set maximum operating hours to x hours till that point is reached.
$endgroup$
– Katherine
Nov 8 '17 at 21:36




$begingroup$
Eventually my goal is to predict failure time but the data is synthesized and has unrealistic run time. In the sense, from the plot of hours of operation, degradation is linear till the failure. I have gone through few research papers which use piece-wise linear approximation to have a maximum limit of time to failure till there is step change. So, I would to run a model which could learn from the features to find when there is a deviation/step change (after x hours). So, I could set maximum operating hours to x hours till that point is reached.
$endgroup$
– Katherine
Nov 8 '17 at 21:36












$begingroup$
"degradation is linear till the failure". if you don't have any measure of performance, how are you measuring the degradation here? Can you include a snapshot of your dataset to make this clearer?
$endgroup$
– Louis T
Nov 8 '17 at 23:45




$begingroup$
"degradation is linear till the failure". if you don't have any measure of performance, how are you measuring the degradation here? Can you include a snapshot of your dataset to make this clearer?
$endgroup$
– Louis T
Nov 8 '17 at 23:45










3 Answers
3






active

oldest

votes


















0












$begingroup$


AnomalyDetection is an open-source R package to detect anomalies
which is robust, from a statistical standpoint, in the presence of
seasonality and an underlying trend.




A blogpost that introduces the package can be found here and more formal paper can be found here.






share|improve this answer









$endgroup$













  • $begingroup$
    Thank you for sharing the links. I have tried the AnomalyDetection package, however, it doesn't seem to work for my case. My data has no timestamp column. The only time related variable is in terms of hours of operation.
    $endgroup$
    – Katherine
    Nov 13 '17 at 22:14



















0












$begingroup$

You could model the process as a Weibull distribution which is common for survival analysis and reliability engineering. There has been work on monitoring the "health" of systems using it, examples are here and here.






share|improve this answer









$endgroup$





















    0












    $begingroup$

    I would try using Google's CausalImpact package. Your use-case isn't causal inference exactly, but CausalImpact relies on bayesian structural time series models (using the bsts package) and has some good defaults that keep you from needing to dive into bsts immediately.



    Basically, you fit a model to the first part of your data, then forecast the rest. You see where your model deviates from the forecast. Using bayesian models means you can get error bounds - so you can have a degree of confidence in the deviation. In your case, you'd set your 'intervention' point to wherever timestamp you want to separate your modeling data from your forecasting data. Then compare the forecast to the actual data (look up 'nowcasting').



    Here is a tutorial to get you started, and here's an introductory video.






    share|improve this answer









    $endgroup$














      Your Answer





      StackExchange.ifUsing("editor", function () {
      return StackExchange.using("mathjaxEditing", function () {
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      });
      });
      }, "mathjax-editing");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "557"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f24497%2fdetect-the-time-at-which-deviation-occurs-in-time-series-data%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0












      $begingroup$


      AnomalyDetection is an open-source R package to detect anomalies
      which is robust, from a statistical standpoint, in the presence of
      seasonality and an underlying trend.




      A blogpost that introduces the package can be found here and more formal paper can be found here.






      share|improve this answer









      $endgroup$













      • $begingroup$
        Thank you for sharing the links. I have tried the AnomalyDetection package, however, it doesn't seem to work for my case. My data has no timestamp column. The only time related variable is in terms of hours of operation.
        $endgroup$
        – Katherine
        Nov 13 '17 at 22:14
















      0












      $begingroup$


      AnomalyDetection is an open-source R package to detect anomalies
      which is robust, from a statistical standpoint, in the presence of
      seasonality and an underlying trend.




      A blogpost that introduces the package can be found here and more formal paper can be found here.






      share|improve this answer









      $endgroup$













      • $begingroup$
        Thank you for sharing the links. I have tried the AnomalyDetection package, however, it doesn't seem to work for my case. My data has no timestamp column. The only time related variable is in terms of hours of operation.
        $endgroup$
        – Katherine
        Nov 13 '17 at 22:14














      0












      0








      0





      $begingroup$


      AnomalyDetection is an open-source R package to detect anomalies
      which is robust, from a statistical standpoint, in the presence of
      seasonality and an underlying trend.




      A blogpost that introduces the package can be found here and more formal paper can be found here.






      share|improve this answer









      $endgroup$




      AnomalyDetection is an open-source R package to detect anomalies
      which is robust, from a statistical standpoint, in the presence of
      seasonality and an underlying trend.




      A blogpost that introduces the package can be found here and more formal paper can be found here.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 11 '17 at 1:27









      Brian SpieringBrian Spiering

      4,2681129




      4,2681129












      • $begingroup$
        Thank you for sharing the links. I have tried the AnomalyDetection package, however, it doesn't seem to work for my case. My data has no timestamp column. The only time related variable is in terms of hours of operation.
        $endgroup$
        – Katherine
        Nov 13 '17 at 22:14


















      • $begingroup$
        Thank you for sharing the links. I have tried the AnomalyDetection package, however, it doesn't seem to work for my case. My data has no timestamp column. The only time related variable is in terms of hours of operation.
        $endgroup$
        – Katherine
        Nov 13 '17 at 22:14
















      $begingroup$
      Thank you for sharing the links. I have tried the AnomalyDetection package, however, it doesn't seem to work for my case. My data has no timestamp column. The only time related variable is in terms of hours of operation.
      $endgroup$
      – Katherine
      Nov 13 '17 at 22:14




      $begingroup$
      Thank you for sharing the links. I have tried the AnomalyDetection package, however, it doesn't seem to work for my case. My data has no timestamp column. The only time related variable is in terms of hours of operation.
      $endgroup$
      – Katherine
      Nov 13 '17 at 22:14











      0












      $begingroup$

      You could model the process as a Weibull distribution which is common for survival analysis and reliability engineering. There has been work on monitoring the "health" of systems using it, examples are here and here.






      share|improve this answer









      $endgroup$


















        0












        $begingroup$

        You could model the process as a Weibull distribution which is common for survival analysis and reliability engineering. There has been work on monitoring the "health" of systems using it, examples are here and here.






        share|improve this answer









        $endgroup$
















          0












          0








          0





          $begingroup$

          You could model the process as a Weibull distribution which is common for survival analysis and reliability engineering. There has been work on monitoring the "health" of systems using it, examples are here and here.






          share|improve this answer









          $endgroup$



          You could model the process as a Weibull distribution which is common for survival analysis and reliability engineering. There has been work on monitoring the "health" of systems using it, examples are here and here.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 18 '17 at 17:08









          Brian SpieringBrian Spiering

          4,2681129




          4,2681129























              0












              $begingroup$

              I would try using Google's CausalImpact package. Your use-case isn't causal inference exactly, but CausalImpact relies on bayesian structural time series models (using the bsts package) and has some good defaults that keep you from needing to dive into bsts immediately.



              Basically, you fit a model to the first part of your data, then forecast the rest. You see where your model deviates from the forecast. Using bayesian models means you can get error bounds - so you can have a degree of confidence in the deviation. In your case, you'd set your 'intervention' point to wherever timestamp you want to separate your modeling data from your forecasting data. Then compare the forecast to the actual data (look up 'nowcasting').



              Here is a tutorial to get you started, and here's an introductory video.






              share|improve this answer









              $endgroup$


















                0












                $begingroup$

                I would try using Google's CausalImpact package. Your use-case isn't causal inference exactly, but CausalImpact relies on bayesian structural time series models (using the bsts package) and has some good defaults that keep you from needing to dive into bsts immediately.



                Basically, you fit a model to the first part of your data, then forecast the rest. You see where your model deviates from the forecast. Using bayesian models means you can get error bounds - so you can have a degree of confidence in the deviation. In your case, you'd set your 'intervention' point to wherever timestamp you want to separate your modeling data from your forecasting data. Then compare the forecast to the actual data (look up 'nowcasting').



                Here is a tutorial to get you started, and here's an introductory video.






                share|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  I would try using Google's CausalImpact package. Your use-case isn't causal inference exactly, but CausalImpact relies on bayesian structural time series models (using the bsts package) and has some good defaults that keep you from needing to dive into bsts immediately.



                  Basically, you fit a model to the first part of your data, then forecast the rest. You see where your model deviates from the forecast. Using bayesian models means you can get error bounds - so you can have a degree of confidence in the deviation. In your case, you'd set your 'intervention' point to wherever timestamp you want to separate your modeling data from your forecasting data. Then compare the forecast to the actual data (look up 'nowcasting').



                  Here is a tutorial to get you started, and here's an introductory video.






                  share|improve this answer









                  $endgroup$



                  I would try using Google's CausalImpact package. Your use-case isn't causal inference exactly, but CausalImpact relies on bayesian structural time series models (using the bsts package) and has some good defaults that keep you from needing to dive into bsts immediately.



                  Basically, you fit a model to the first part of your data, then forecast the rest. You see where your model deviates from the forecast. Using bayesian models means you can get error bounds - so you can have a degree of confidence in the deviation. In your case, you'd set your 'intervention' point to wherever timestamp you want to separate your modeling data from your forecasting data. Then compare the forecast to the actual data (look up 'nowcasting').



                  Here is a tutorial to get you started, and here's an introductory video.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 15 '18 at 5:07









                  tomtom

                  1,573311




                  1,573311






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Data Science Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f24497%2fdetect-the-time-at-which-deviation-occurs-in-time-series-data%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to label and detect the document text images

                      Vallis Paradisi

                      Tabula Rosettana