Real-time data-driven detection of the rock type alteration during a directional drilling