A machine learning unit capable of judging the necessity of replacement of a spindle of a machine tool. A machine learning unit includes a state observing section observing a state variable comprising processing volume data showing a number of processed workpieces, processing accuracy data showing a difference between an actual dimension of a processed workpiece and a dimension target value, interruption time data showing a time period of interruption of operation of the machine tool, and replacement determination data showing a judgment result of a necessity of spindle replacement; and a learning section provided with profit-and-loss data comprising a profit per unit time or a loss per unit time, generated by a production of the processed workpiece, and a loss per unit time generated due to the spindle replacement. The learning section uses the profit-and-loss data and the state variable and learns a condition associated with the spindle replacement.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A machine learning unit configured to learn a condition associated with replacement of a spindle of a machine tool, the machine learning unit comprising: a state observing section configured to observe a state variable representing a current state of a spindle, during a continuous operation of a machine tool, the state variable comprising processing volume data showing a total number of processed workpieces which are processed using the spindle, processing accuracy data showing a difference between an actual dimension of a processed workpiece and a dimension target value, interruption time data showing a time period of interruption of operation of the machine tool, and replacement determination data showing a judgment result of a necessity of spindle replacement; and a learning section provided with profit-and-loss data, the profit-and-loss data comprising a profit per unit time or a loss per unit time, which may be generated by a production of the processed workpiece, and a loss per unit time which may be generated due to the spindle replacement, the learning section configured to use the profit-and-loss data and the state variable and learn a condition associated with the spindle replacement. 2. The machine learning unit of claim 1, wherein the learning section is configured to use state variables and profit-and-loss data, which are obtained in connection respectively with a plurality of machine tools, and learn a condition in connection with each of the plurality of machine tools. 3. The machine learning unit of claim 1, wherein the learning section comprises: a reward calculating section configured to calculate the profit-and-loss data based on the state variable and thereby determine a reward for an action relating to the spindle replacement in the current state; and a function updating section configured to use the reward and update a function expressing a value of the action in the current state, the learning section configured to learn the condition when the function updating section repeatedly updates the function. 4. A spindle replacement judging device configured to judge a necessity of replacement of a spindle of a machine tool, the spindle replacement judging device comprising: a machine learning unit according to claim 1; and a decision making section configured to output an action indicator indicating either one of an intention that the spindle replacement is necessary in the current state and an intention that the spindle replacement is not necessary in the current state, based on a result of learning performed by the learning section, wherein the state observing section is configured to observe the state variable which has been changed in accordance with the action indicator output by the decision making section, wherein the learning section is configured to use the changed state variable so as to learn the condition, and wherein the decision making section is configured to output the action indicator which has been optimized in accordance with the state variable under the learned condition. 5. The spindle replacement judging device of claim 4, further comprising a comparing section configured to compare the difference between the actual dimension of the processed workpiece and the dimension target value with a predetermined tolerance of the processed workpiece, wherein the state observing section is configured to observe a result of comparison by the comparing section as the processing accuracy data. 6. A controller of a machine tool having a spindle, the controller comprising: a spindle replacement judging device according to claim 4; and a data acquiring section configured to acquire the processing volume data, the processing accuracy data, the interruption time data and the replacement determination data. 7. The controller of claim 6, further comprising an alarm section configured to output a signal for informing a demand for the spindle replacement in a case where the action indicator output by the decision making section indicates the intention that the spindle replacement is necessary. 8. A machine tool comprising: a spindle; and a spindle replacement judging device according to claim 4. 9. A machine tool comprising: a spindle; and a controller according to claim 6. 10. The machine tool of claim 8, further comprising a measuring device configured to measure the difference between the actual dimension of the processed workpiece and the dimension target value. 11. A production system comprising: a plurality of machine tools, each machine tool having a spindle; and a network configured to connect the plurality of machine tools with each other, wherein at least one of the plurality of machine tools is configured as a machine tool according to claim 8. 12. A production system comprising: a plurality of machine tools, each machine tool having a spindle; a machine learning unit according to claim 1; and a network configured to connect the plurality of machine tools and the machine learning unit with each other. 13. The production system of claim 12, wherein the machine learning unit is present in a cloud server. 14. A machine learning method of learning a condition associated with replacement of a spindle of a machine tool, the machine learning method comprising the acts, executed by a CPU of a computer, of: observing a state variable representing a current state of a spindle, during a continuous operation of a machine tool, the state variable comprising processing volume data showing a total number of processed workpieces which are processed using the spindle, processing accuracy data showing a difference between an actual dimension of a processed workpiece and a dimension target value, interruption time data showing a time period of interruption of operation of the machine tool, and replacement determination data showing a judgment result of a necessity of spindle replacement; providing profit-and-loss data comprising a profit per unit time or a loss per unit time, which may be generated by a production of the processed workpiece, and a loss per unit time which may be generated due to the spindle replacement; and using the state variable and the profit-and-loss data and learning a condition associated with the spindle replacement.