Fingerprint-based indoor positioning and intensity classification using an improved machine learning framework