Development of the grade selection of x-ray events using machine learning for a CubeSat application