A machine learning apparatus that learns a condition associated with the number of corrections for any command of a position command, a speed command, or a current command in a motor control apparatus, the machine learning apparatus comprising:
- a state observation unit that observes a state variable composed of data relating to the number of errors between the position command relative to a rotor of a motor which is drive-controlled by the motor control apparatus and an actual position of a feed mechanism unit, any command of the position command, the speed command, or the current command in the motor control apparatus, data relating to a workpiece machining condition in a machine tool including the motor control apparatus, and data relating to a state of the machine tool including the motor control apparatus;
- and
- a learning unit that learns the condition associated with the number of corrections used to correct any command of the position command, the speed command, or the current command in the motor control apparatus in accordance with a training data set constituted by the state variable.