The present invention relates to a method and an apparatus for predicting the condition of a
machine or a component of the
machine based on measurements of a
condition monitoring parameter. The apparatus comprising—a data storage (6) for storing a
moving window including measurement values of the
condition monitoring parameter,—a monitoring module (7) configured to determine when a measurement value exceeds a potential failure level at which damage of the
machine or component is considered initiated, and to determine the point in time (tP) when the monitoring parameter exceeded the potential failure level,—a data cleaning module (8) configured to discard a new measurement value if it is smaller than the latest stored measurement value in the
moving window, to determine an expected value for the measurement based on a defined pattern for the
condition monitoring parameter, which pattern reflects an expected behavior of the monitoring parameter after damage has been initiated, and the time elapsed since the point in time the monitoring parameter exceeded the potential failure level, and to discard the new measurement value if it deviates too much from the expected value, and to store not discarded measurement values in the
moving window, and—a prediction module (10) configured to predict the level of the condition monitoring parameter at a future point in
time based on the measurement values stored in the moving window.