Clear Filters
Clear Filters

alpha-lamda Prognostic Accuracy

28 views (last 30 days)
Vincent Ike
Vincent Ike on 21 May 2024 at 19:50
Answered: Vincent Ike on 28 May 2024 at 22:07
Hi MATLAB community,
Please, I need help.
I have been trying to create a prognostic code using Hidden Markov Model.
Having gotten my state posterior probabilities, how do I perform the a-lamda perfomance metrics? I mean what becomes the trueRUL and what is the estimatedRUL??
Thanks in advance!

Answers (3)

surya venu
surya venu on 22 May 2024 at 10:49
Here's a breakdown of how to interpret the relevant terms and calculate the α-Lambda performance metric:
True Remaining Useful Life (RUL):
  • In prognostic scenarios, you might have access to historical data or labels indicating the failure times of similar systems.
  • If you have this information, you can directly calculate the true RUL for each data point in your test set as the difference between the current time step (t) and the actual failure time (t_failure).
Estimated RUL:
  • Once you've obtained the state posterior probabilities for a given time step (t), you can estimate the RUL using various approaches:
1) State-Averaged Mapping:
  • Assign a pre-defined RUL value to each hidden state in your HMM. This value could be based on domain knowledge or historical data.
  • Calculate the weighted average of these assigned RUL values using the state posterior probabilities as weights:
estimatedRUL_t = sum(pi_t(i) * RUL_i) for all states i
  • Here, pi_t(i) is the posterior probability of being in state "i" at time "t", and RUL_i is the assigned RUL value for state "i".
2) Learning-Based Mapping:
  • Train a separate regression model to map the state posterior probabilities to the estimated RUL.
  • This model could be a simple linear regression, a neural network, or any other suitable regression technique.
  • Train the regression model on a dataset where you have both the state posterior probabilities and the corresponding true RUL values.
α-Lambda Performance Metric:
  • It's calculated as follows: alpha_lambda = 1 / N * sum( |estimatedRUL_t - trueRUL_t| / trueRUL_t) for all N data points in the test set
  • A lower α-Lambda value indicates better prediction accuracy. It represents the average fractional error between the estimated and true RUL, expressed as a proportion of the true RUL.
Hope it helps.
Vincent Ike
Vincent Ike on 24 May 2024 at 11:05
Hi Surya,
First I want to thank you for your prompt response, than I anticipated.
Please, if you have a robust script to help me with, I will be immensely grateful. This is months of repeated attempts for me.
I actually wrote this backward recursive piece on defining state probabilities, and obtaining the RUL:
for k=3:1:7
new_trans_mat(end,end-1)=1; new_trans_mat=new_trans_mat(:,1:end-1); %extended the %stochastic transition matrix beyond my model
rul=length(Y)-m; %rul is the time in the future I am considering before failure
N=length(new_trans_mat); k=N;
for t=2:rul
for k=N:-1:3
if any(new_trans_mat(k-2,N))
else; est_pdf(1,k-2)=0; end
for t=2:rul
est_pdf(t,k-2)=new_trans_mat(k-2,k-2)*est_pdf(t-1,k-2) ...
+ new_trans_mat(k-2,k-1)*est_pdf(t-1,k-1);
est_pdf=[est_pdf(:,[1 2]) sum(est_pdf(:,3:5),2)]; % compressed future state into current
% multiply state prob above with posterior probability
for t=1:length(est_pdf)
RUL(t) = sum(est_pdf(t,:).*tau(t,:),2)*t;
The RUL is far less than/different from expected.
Vincent Ike
Vincent Ike on 24 May 2024 at 13:13
if you have a template, please, can you share as I need it badly?

Sign in to comment.

Vincent Ike
Vincent Ike on 28 May 2024 at 22:05
this is the state-based code I was trying to develop, maybe this will help understand what I want to produce

Vincent Ike
Vincent Ike on 28 May 2024 at 22:07
the former will produce the RUL in states, before multiplying with the posterior prob


Find more on Predict Remaining Useful Life (RUL) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!