A method for designing simple models of the remaining lifetime of a system is proposed. A health state model is learned, the output of which varies consistently with the remaining useful life. The model and the criterion used to measure how well it fits the data are jointly learned. The goal of this joint search is to find the criterion, within a family of stochastic orderings, for which the model has the simplest expression. The performance of the new method is comparable to recent AI-based models, such as recurrent networks, convolutional networks or variational autoencoders, and depends on a much smaller number of parameters than these methods, so it can be applied in systems with reduced computational capacity.