Skip to main content
. 2020 Dec 22;21(1):2. doi: 10.3390/s21010002
Algorithm 2: Hybrid learning method
  • timecompletionReadSensors()

  • improvementPolinomialFit(history).get_rate()

  • baselineMostFrequentPrediction()

  • xgbpredictionXGBoostModel.predict(timecompletion)

  • knnpredictionKNNModel().predict(timecompletion)

  • closest,farthestCalculateEucledianDistance(xgbprediction,knnprediction,healthy)

  • if  improvement=true  then

  • ReTrain(closest) {Closer to Healthy}

  • else if  improvement=false  then

  • ReTrain(farthest)

  • else

  • ReTrain(baseline) {Steady}

  • end if

  • userStatestateCalculation(sensorData,improvement,baseline,finalPrediction)