Implementation of the Random Forest method for the Imaging Atmospheric Cherenkov Telescope MAGIC