A nanosensor detecting and diagnosing a disease in its early stages using advanced machine learning