Machine learning approach to brain tumor detection and classification