View full-text article in PMC Sensors (Basel). 2020 Dec 22;21(1):2. doi: 10.3390/s21010002 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 2: Hybrid learning method timecompletion←ReadSensors() improvement←PolinomialFit(history).get_rate() baseline←MostFrequentPrediction() xgbprediction←XGBoostModel.predict(timecompletion) knnprediction←KNNModel().predict(timecompletion) closest,farthest←CalculateEucledianDistance(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 userState←stateCalculation(sensorData,improvement,baseline,finalPrediction)