Early prediction of lactation milk yield enables more efficient herd management. Therefore, this study attempted to predict lactation milk yield (LMY) in 524 Polish Holstein–Friesian cows, based on information recorded by the automatic milking system (AMS) in the periparturient period. The cows calved in 2016 and/or 2017 and were used in 3 herds equipped with milking robots. In the first stage of data analysis, calculations were made of the coefficients of simple correlation between rumination time (expressed as mean time per cow during the periparturient period: second (14–8 days) and first (7–1 days) week before calving, 1–4, 5–7, 8–14, 15–21 and 22–28 days of lactation), electrical conductivity and temperature of milk (expressed as means per cow on days 1–4, 5–7, 8–14, 15–21 and 22–28), amount of concentrate intake, number of milkings/day, milking time/visit, milk speed and lactation milk yield. In the next step of the statistical analysis, a decision tree technique was employed to determine factors responsible for LMY. The study showed that the correlation coefficients between LMY and AMS traits recorded during the periparturient period were low or moderate, ranging from 0.002 to 0.312. Prediction of LMY from the constructed decision tree model was found to be possible. The employed Classification and Regression Trees (CART) algorithm demonstrated that the highest lactation yield is to be expected for cows with completed lactations (survived until the next lactation), which were milked 4.07 times per day on average in the 4th week of lactation. We proved that the application of the decision tree method could allow breeders to select, already in the postparturient period, appropriate levels of AMS milking variables, which will ensure high milk yield per lactation.