Skip to main content
. 2025 Mar 28;25(7):2146. doi: 10.3390/s25072146
Algorithm 2: Adjusted prediction for faulty sensors and dynamic belief mass for final fire prediction
  • Input: Multi Sensor fusion pre-processed data {S1DP, S2DP, S3DP, S4DP, S5DP}

  • Output: the final prediction of fire based on belief and plausibility values considering normal and faulty sensors

  • Process:

  1. #Train machine learning Model, MobileNet on RGB pre-processed sensor Data, EfficientNet on IR pre-processed #sensor #Data, RandomForest on Smoke pre-processed sensor Data, SVM on Gas pre-processed sensor

    #Data, DecisionTree on Flame pre-processed sensor Data

    #Get Class probabilities prediction from each Model for 5 different multi sensor for fire and NoFire.

          ML1 = MobileNet(S1DP)

          ML2 = EfficientNet(S2DP)

          ML3 = Randomforest(S3DP)

          ML4 = SVM(S4DP)

          ML5 = DecisionTree (S5DP)

  2. #adjusted prediction based on sensor status and model output is calculated.

    CombinedWeightfactor(CWF)=PWC×FR+PWC×CS+PWC×SSNR+PWC×PSM+PWC×EIF

    #Percentage of weight (%) for calculating combined weight factor(PWC), Failure rate based on #historical data(FR), Calibration of sensors(CS), Sensor signal to Noise Ratio(SSNR), #performance of sensor by metrics(PSM), environmental impacted factors(EIF)

    #Probabilistic model adjustment based on sensor reliability. each Model, gives probabilities for #fire and no fire:

    If SiAD = 0 then--# If Si(sensor) is normal,

    (m(fire)K=PkfireSi)

    mno fireK=Pkno fireSi)

    Else --# if Si(Sensor) is faulty

    m(no fire)K=Pkno fireSi)xCWF

    m(fire)K=PkfireSi)xCWF

    #where CWF< 1 is to reduce the confidence from faulty sensors.

    # Si   where i ranges from 1 to 5 of sensors S1, S2 … S5 which are RGB, IR, Gas, Smoke and Flame

    #sensors and PK is a particular machine learning model respective to that sensor which are ML1, ML2, ML3, #ML4, ML5 from where probability is derived for fire and no fire.

  3. #Combine the confidence score from all models (both normal and faulty sensors), Ensemble Fusion with Weighted #Confidence Scores

    TotlConf=K=1nm(fire)K+K=1nm(no fire)K

  4. #Convert the class probabilities mi(fire), mi(no fire),mi(Θ)from each machine learning models into belief masses. #Fusion-Weighted Belief Mass Calculation

    #Belief mass for fire

    mfire=K=1nPkfireSK)XweightfactorK}TotlConf

    #Belief mass for no fire

    mno fire=K=1nPkno fireSK)XweightfactorK}TotlConf

    #Where for Normal sensors weight factor will be set to 1, while faulty sensors factor is set less than 1 to reduce #their impact.

    #Belief mass for entire hypothesis

    mΘ=1(mfiremno fire)

  5. #Dynamically Belief is calculated, the new belief is based on the latest sensor readings.

    MNew(fire)=αMPrevious(fire)+(1α)Pk(fireSk)

          #Where α is a weighting factor between 0 and 1 that determines how much influence the previous

          #belief mass has compared to the new evidence from the current sensor reading. 0.5 is used for

          #Balanced approach as the IoT environment is assumed to be stable environments

  6. #calculate the Hellinger Distance H(mi,mj)  between each pair of  belief masses

    HDmi,mj=12k=1nmikmjk2

  7. #Deng Entropy DE(mi) is calculated for each machine learning model of sensors, the belief masses are adjusted

       DE(mi)=k=1nmiklog(mik)

       wi=11+αHDmi,mj+βDE(mi)

#α controls how much weight the Hellinger Distance has in adjusting the belief mass.
#β controls how much weight the Deng Entropy has in adjusting belief mass.
  • 8.

    #Apply Dempster’s Rule of Combination iteratively for all pairs of belief masses

          mCombined(A)=BC=Aw1m1B.w2m2(C)(1BC=w1m1B.w2m2(C))

  • 9.

    #After combining the belief masses, compute the belief and plausibility for each class, The final belief mass mcombined #provides the combined evidence,

          BeliefA=BC=Amcombined(B)

          Plausibility(A)=BAmcombined(B)

  • 10.

    #Dempster’s Rule is applied to combine belief masses mcombined(A) from all models, Repeated this combination #iteratively for all pairs of machine learning models of every multi sensors inputs

  • 11.

    #After combining the BPAs, calculated the belief and plausibility for each class Belief(A) and Plausibility(A)

  • 12.

    Determined the final prediction of fire based on belief and plausibility values

The final prediction was made based on the calculated belief and plausibility values:
                     If Belieffire>threshold,Predict=fire
                     If Belief(no fire)>threshold,Predict=no fire.
Otherwise, predict “undefined” or “uncertain”.
  • 13.

    #When fire predicted, API is called for SMS(POST/alert/sms), email (POST/alert/email),

    #Push notification (POST/alert/push), and also API called for auto showdown (POST/alert/shutdown) of devices.

  • 14.

    #Send the final prediction to cloud/central server by calling the API (POST/models/update). Global Update #centralized model training received from all the remote sites through secured and authenticated API. Periodically #this global model will be updated back in the machine learning model in every remote sites edge server using API #(POST/models/update-global).

END