Based on the components of glasses, four algorithms, namely K-Nearest Neighbor, Random Forest, Support Vector Machine, and eXtreme Gradient Boosting, were used to construct an optimal machine learning model to predict the thermal and optical properties of oxyfluoride glass, namely glass transition temperature, density, Abbe number, liquidus temperature, thermal expansion coefficient, and refractive index. We perform SHAP analysis on the constructed machine learning model to explain the effects of different components on the properties. Based on the trained machine learning models, we developed several ternary system prediction maps that can effectively predict the properties of glasses composed of different proportions of components. This study provides a method to design new oxyfluoride glasses only knowing the components of glasses, which is instructive for the development of new types of oxyfluoride glasses as well as for computer-aided reverse design.