||This article explores the relationship between labor costs and price inflation under two conditions. Firstly, with linear assumption and classical techniques. Secondly, without assuming linearity, by a novel non-parametric machine learning method, namely gradient boosting. With quarterly data from 1996 to 2022 for V4 countries, we find linear and non-linear dependency between labor cost and price inflation. However, the magnitude of the connection is country-specific and changes over time. Our findings indicate that a significant linear relationship between considered variables does not lead to the higher predictability power of labor cost in a non-parametric model, which predicts inflation. Even opposed, the Czech Republic, the country with the highest correlation between unit labor cost(ULC) and deflator, shows better prediction in a case when the ULC is not in the set of independent variables. This fact highlights the importance of non-linearity for the inflation model.