Milk Yield Prediction and Economic Analysis of Optimized Rearing Environment in a Cold Region Using Neural Network Model

: The milk yield of dairy cows in a non-stressed state in the cold region in China is lower during cold seasons. In this study, the correlations between indoor environmental factors and milk production were analyzed. Temperature, relative humidity, and light intensity were found to be the main factors affecting milk yield. The warning values of these factors for lower milk production were 5 ◦ C, 60%, and 300 lx, respectively. A neural network model predicting milk yield based on environmental factors was established, and the optimal model parameters were determined, resulting in a high accuracy of R 2 = 0.802. This model was used to investigate the optimal measure for improving the indoor environment, which helps to increase milk production and economic beneﬁts, including LED lights, heating radiators, and dehumidiﬁers. In conclusion, each type of device led to the growth of milk yield, reaching 2.341, 1.706, and 1.893 kg cow − 1 Day − 1 . The combination of heating radiator and LED light resulted in the highest increased net beneﬁt of 16.802 CNY cow − 1 Day − 1 . This is the ﬁrst time that a neural network model was successfully built to predict milk yield based on climatic features which was also applied to economic analysis of indoor environment improvement for dairy barns in extreme cold regions.


Introduction
Climatic conditions mainly affect the welfare and production performance of livestock [1,2].In recent years, research on the impact of environmental factors on dairy cow production continues to deepen.The sweat glands of cows are underdeveloped, coupled with the short and dense hair, making it difficult for cows to dissipate heat [3].Dairy cows can tolerate a certain range of low temperatures, but too low a temperature would cause decreased breathing rate and surface temperature of the body [4,5].In severe cases, milk production can be significantly reduced [6,7].Studies show [8][9][10] that when the temperature is lower than −4~−6.8• C, milk yield and the content of milk protein and lactose start decreasing.Moreover, research has found that prolactin secretion is significantly affected by photoperiodic changes [11], which also influence the protein content of milk [12].
The northeast region of China has long winters, where the period of summer and autumn is short, and the average temperature is not high (the measured daily averaged temperature was in the range of 2. 32-27.98 • C in this study).In 2018, milk production in the Northeast region accounted for one-fifth of the whole country [13].It was found that dairy cows in this region are in a non-stressed state most of the time, but the loss of milk production in winter has been still observed [14,15].The incidence of recessive mastitis in dairy cows also increased significantly [16].This might be because of the low air temperature and high air humidity in the barn, which is caused by the poor thermal insulation of the barn and the extremely cold environment outside resulting in limited ventilation.During this period, the suitability of the ambient environment affects the production level of dairy cows.Xu et al. identified the temperature drop period when the average temperature decreased by more than 5 • C within 3 days, which would significantly reduce dry matter intake and milk production of cows in early lactation and peak lactation [17].Lim et al. found that the milk yield was improved by adding LED lights during the photoperiod of 16 h [18].Relative humidity showed a negative correlation with milk yield at low temperatures above 0 • C [19].
Regression models are often used to establish predictive models in the dairy field, including two core algorithms of conventional statistics and machine learning [20].Conventional statistic models were developed to predict the milk yield and fat data with temperature or THI (temperature-humidity index) as inputs and to predict the protein content with wind speed and sunshine hours as inputs [12].However, structural restrictions and data quality impose limitations on such regressions based on standard regression techniques [21].Machine learning has been more and more used in dairy research in the past decade [22][23][24].A machine learning framework was developed to predict milk production, composition, and individual cow milking frequency in the coming month using cow and climate features [25].Milk fatty acids were used in artificial neural networks to predict the rumen fermentation pattern [26].Dry matter intake of Canadian Holstein dairy cows was successfully predicted by mid-infrared reflectance spectroscopy on milk and environment variables via artificial neural networks [27].
Therefore, this study was initiated to analyze the relationship between low milk yield and climate features in the extreme cold region, to provide the basis for the promotion of milk production via an improved rearing environment.

Experiment Location
The measurements were carried out from August 2019 to March 2020 in Taobei District (45.7 • N, 122.9 • E), Baicheng City, Jilin Province, China.The barn ran east-west with a length of 250 m and a span of 27 m in the north-south direction.The fans were arranged staggered every 12 m in the east-west direction.A total of 40 36 inch spoiler fans were arranged in the cow-feeding area, and 32 54 inch glass-fiber-reinforced plastic windpipe fans were arranged in the cow lying area without spray cooling facilities.
The dairy cows were reared in loose pens in the experimental barn, and each cow weighed between 500 and 600 kg.A total of 28 drinking troughs with level control valves and electric heating devices were evenly arranged in the barn.Cows were fed by TMR spreaders at 7:00, 13:00, and 19:00 each day.One hour before spreading the feed, the cows were driven to the milking parlor for milking, then the manure removal truck was used for manure removal.

Environmental Factors and Milk Yield Measurements
A total of 4 environmental data collection points were set in the barn, which were placed evenly along the length direction of the barn.The outdoor climate was measured at the southeast corner of the barn.Each collection point collected five types of environmental data: temperature, relative humidity, wind speed, carbon dioxide concentration, and light intensity.The sensors were fixed at a distance of 1.8 m by a PC perforated plate and iron cage.The collection point outside was installed on the top of a fixed iron rod, which was at a height of 2.5 m from the ground.The sampling interval of all sensors was 10 min, resulting in 144 points of data per day.
Dairy cows were milked in the side-by-side milking parlor at 6:00, 12:00, and 18:00 each day.The milking system recorded the total daily milk yield, the number of milking cows, and the average milk yield of the entire group of cows.The ratio of the total daily milk production to the number of cows was used as the milk yield per cow per day.

Data Analysis
To investigate the way that indoor environment variables affect averaged total milk yield, correlation analysis took place using the Pearson correlation coefficient.

Data Preprocessing
To develop the neural network model, all the environment data were normalized into the range of [0, 1] according to Equation (1), where x is the input, x min is the minimum value of the input, and x max is the maximum value of the input.
The normalized data set was trained in the neural network.Denormalization was applied afterward according to Equation (2), where y is a value between [0, 1], and y max , y min are the maximum and minimum values, respectively. (2)

Artificial Neural Networks
The artificial neural network was applied to establish the model of milk yield prediction using climate features, which helps to gain the performance estimation of different promotion measures, Figure 1.
cows, and the average milk yield of the entire group of cows.The ratio of the total daily milk production to the number of cows was used as the milk yield per cow per day.

Data Analysis
To investigate the way that indoor environment variables affect averaged total milk yield, correlation analysis took place using the Pearson correlation coefficient.

Data Preprocessing
To develop the neural network model, all the environment data were normalized into the range of [0, 1] according to Equation (1), where x is the input, xmin is the minimum value of the input, and xmax is the maximum value of the input.
The normalized data set was trained in the neural network.Denormalization wa applied afterward according to Equation (2), where y is a value between [0, 1], and ymax ymin are the maximum and minimum values, respectively. (2

Artificial Neural Networks
The artificial neural network was applied to establish the model of milk yield predic tion using climate features, which helps to gain the performance estimation of differen promotion measures, Figure 1.The backpropagation neural network (BPNN) was used in this study, which is th most commonly used neural network paradigm and also called a multilayer perceptron [26].The BPNN model consists of three layers: the input layer, the hidden layer, and th output layer [28].There is always one or more hidden layers in BPNN, allowing the net work to model complex functionality, where two processes include: forward information propagation and back error propagation [29,30].Because of the simple structure and low computational load, the 3-layer network is the most popular multi-layer network [31] which was applied to this study.
A total of 243 samples were used in building the neural network model.The data se was randomly separated by 0.6:0.2:0.2 as a training data set, validating data set, and test ing data set, respectively.The data set was provided to the network multiple times to form an iterative training process, to update the weight and bias term in the hidden layer [26] Figure 1.The aim of this study is to obtain the relation between milk yield and climatic features in dairy barns and to build the predictive model of milk yield based on neural networks in which the economic analysis of indoor environmental improvement can be achieved.
The backpropagation neural network (BPNN) was used in this study, which is the most commonly used neural network paradigm and also called a multilayer perceptron [26].The BPNN model consists of three layers: the input layer, the hidden layer, and the output layer [28].There is always one or more hidden layers in BPNN, allowing the network to model complex functionality, where two processes include: forward information propagation and back error propagation [29,30].Because of the simple structure and low computational load, the 3-layer network is the most popular multi-layer network [31], which was applied to this study.
A total of 243 samples were used in building the neural network model.The data set was randomly separated by 0.6:0.2:0.2 as a training data set, validating data set, and testing data set, respectively.The data set was provided to the network multiple times to form an iterative training process, to update the weight and bias term in the hidden layer [26].

Model Performance Evaluation
In order to accurately evaluate the model predictive performance of milk production, three model evaluation indicators were chosen, namely the coefficient of determination R 2 , the relative error RE, and the root mean square error RMSE, and were calculated via Equations ( 3)- (5).
where y i is the real data of milk production, y i is the average milk yield, " y i is the model prediction, and n is the number of samples.

Devices and Equipment to Improve Environmental Conditions
Three devices were chosen to improve the indoor environment in winter.Firstly, a copper-aluminum-composed heating radiator was selected as one of the most popular choices in China to increase the indoor temperature in winter.Steam coal and natural gas were chosen as the usually used fuel to produce heat with the radiator device.Secondly, a dehumidifier was selected as the method to reduce the indoor air humidity.Additionally, an LED light was selected as an energy-saving way to provide extra light inside rooms.Both the dehumidifier and LED light were driven by electricity.

Correlation Analysis
Figure 2 shows the indoor environment, dairy diet, number of lactating cows, and milk yield data for the whole measuring period.There were significant changes in temperature from August to December.Relative humidity was higher in warm days in August, and it kept about 80% from December to February.Wind speed gradually decreased from August to December.This was due to the high temperature in summer, all fans in the barn were turned on to dissipate heat.Subsequently, the temperature gradually decreased, so the number of working fans decreased as well.In December, the fans completely stopped running, and the doors and windows were closed to keep the inside warm.During cold days, the wind speed inside the dairy cow barn was stable at about 0 m s −1 .In contrast, the CO 2 concentration was higher during cold seasons, which was about 1400 ppm.Light intensity experienced stronger fluctuations than the other environmental variables, which depended on the outside weather, and was relatively lower than the warm days.Moreover, the number of lactating cows increased dramatically in the period of autumn-winter, which means more cows in the stage of early lactation were added to the group.Furthermore, the feed intake and water intake of the cows fluctuated with the same trend as the milk yield.
Due to the extremely cold winter in Northeast China, closed cattle farms were used, which was completely different from the warm seasons.Hence, the correlation analysis was divided into summer-autumn (a) and autumn-winter (b) sections as shown in Figure 3.In summer-autumn, data from July to October were used, and in autumn-winter, data from November to February were used.In the summer-autumn season, feed intake, water intake, indoor temperature, wind speed, and CO 2 concentration were extremely significantly correlated with milk yield.Relative humidity was significantly correlated with milk yield.From November, closed barn management was adopted, in which the ventilation was rare.The barn was in a state of low temperature and high humidity for a long time.The correlation coefficients of water intake, indoor temperature, relative humidity, and light intensity with milk production were relatively high.Due to the extremely cold winter in Northeast China, closed cattle farms were used, which was completely different from the warm seasons.Hence, the correlation analysis was divided into summer-autumn (a) and autumn-winter (b) sections as shown in Figure 3.In summer-autumn, data from July to October were used, and in autumn-winter, data from November to February were used.In the summer-autumn season, feed intake, water intake, indoor temperature, wind speed, and CO2 concentration were extremely significantly correlated with milk yield.Relative humidity was significantly correlated with milk yield.From November, closed barn management was adopted, in which the ventilation was rare.The barn was in a state of low temperature and high humidity for a long time.The correlation coefficients of water intake, indoor temperature, relative humidity, and light intensity with milk production were relatively high.
Compared to the summer-autumn season, the correlation coefficients of temperature, relative humidity, and light intensity to milk yield increased dramatically, while the relative importance of wind speed and CO2 concentration to milk production weakened in the autumn-winter season.The correlation coefficient between the number of lactating cows and milk yield became higher in the period of autumn-winter than that of summer-autumn, which might be cause by the group shifting.Although the number of lactating cows became more relevant to the milk yield in the period of autumn-winter, the correlation between milk yield and indoor environment was still much stronger.Hence, air temperature, relative humidity, and light intensity were selected as key variables to investigate the influence of the rearing environment on milk yield in the cold season.According to the milk yield distribution (Figure 4), it was found that the boundaries of higher milk yield were formed when light intensity was higher than 300 lx, temperature was higher than 5 °C, and relative humidity was lower than 60%.Therefore, these boundaries can be treated as warning lines of low milk production, where measures should be adapted to improve the rearing environment, such as heating, dehumidification, and increased light, to avoid lower milk yield.To know the effectiveness of environmental modification measures on milk yield, a neural network model was developed to predict milk production based on the selected environmental variables as inputs.Compared to the summer-autumn season, the correlation coefficients of temperature, relative humidity, and light intensity to milk yield increased dramatically, while the relative importance of wind speed and CO 2 concentration to milk production weakened in the autumn-winter season.The correlation coefficient between the number of lactating cows and milk yield became higher in the period of autumn-winter than that of summer-autumn, which might be cause by the group shifting.Although the number of lactating cows became more relevant to the milk yield in the period of autumn-winter, the correlation between milk yield and indoor environment was still much stronger.Hence, air temperature, relative humidity, and light intensity were selected as key variables to investigate the influence of the rearing environment on milk yield in the cold season.
According to the milk yield distribution (Figure 4), it was found that the boundaries of higher milk yield were formed when light intensity was higher than 300 lx, temperature was higher than 5 • C, and relative humidity was lower than 60%.Therefore, these boundaries can be treated as warning lines of low milk production, where measures should be adapted to improve the rearing environment, such as heating, dehumidification, and increased light, to avoid lower milk yield.To know the effectiveness of environmental modification measures on milk yield, a neural network model was developed to predict milk production based on the selected environmental variables as inputs.According to the milk yield distribution (Figure 4), it was found that the boundaries of higher milk yield were formed when light intensity was higher than 300 lx, temperature was higher than 5 °C, and relative humidity was lower than 60%.Therefore, these boundaries can be treated as warning lines of low milk production, where measures should be adapted to improve the rearing environment, such as heating, dehumidification, and increased light, to avoid lower milk yield.To know the effectiveness of environmental modification measures on milk yield, a neural network model was developed to predict milk production based on the selected environmental variables as inputs.

Neural Network Milk Yield Prediction Model Based on Environmental Variables
To build the neural network model, several neurons and activation functions in the hidden layer should be defined.The determination of the number of neurons in the hidden layer s was determined based on Equation (6), where the number of nodes in the input layer is m, and the number of nodes in the output layer is n.The activation functions were chosen according to the model performance, Table 1.Five inputs including indoor air temperature, relative humidity, light intensity, wind speed, and CO2 concentration were used resulting in m = 5.The output was milk yield, leading to n = 1.The range of s is then possible to calculate, which is 3~12.To find out the optimal value of s, the model of the neural network was applied with different s values via model evaluation, Table 1.The

Neural Network Milk Yield Prediction Model Based on Environmental Variables
To build the neural network model, several neurons and activation functions in the hidden layer should be defined.The determination of the number of neurons in the hidden layer s was determined based on Equation (6), where the number of nodes in the input layer is m, and the number of nodes in the output layer is n.The activation functions were chosen according to the model performance, Table 1.Five inputs including indoor air temperature, relative humidity, light intensity, wind speed, and CO 2 concentration were used resulting in m = 5.The output was milk yield, leading to n = 1.The range of s is then possible to calculate, which is 3~12.To find out the optimal value of s, the model of the neural network was applied with different s values via model evaluation, Table 1.The activation functions tansig and purelin were used in the hidden layer and output layer, respectively.Each model ran 10 times and the average of the R 2 , RE, and RMSE were gained to evaluate the model performance.The number of iterations was 1000, the residual was 0.001, and the learning rate was 0.01.
It can be seen in Table 1 that when the number of nodes in the hidden layer varies from 3 to 13, R 2 was about 0.733-0.802and RE was about 2.5-2.9%.Considering the model determination coefficient and relative error, s = 11 was selected for subsequent analysis.As for the determination of the activation function, different activation functions of the hidden layer and the output layer were combined and applied to the neural network to find the optimal ones [32].Table 1 gives the result of different combinations of tansig, purelin, and logsig activation functions in the hidden and output layers.The model of tansig-purelin resulted in the highest average R 2 of 0.802, which was able to predict milk yield more accurately than the other combinations.The percentage of the error < 1 kg of milk yield prediction was close to 70%.The BP neural network model was built based on model tests, Figure 5.The high accuracy illustrated that a neural network model was successfully built to predict milk yield based on climatic features inside a dairy barn in the extreme cold region.Via this predictive model, the changes in milk yield under different types of indoor environmental modification measures can be predicted.Accordingly, these modification measures can be evaluated from an economic point of view at little cost.

Economic Benefits of Improving Environmental Quality
The average daily indoor air temperature, relative humidity, and light intensity presented strong regularity with milk yield.When the temperature and light intensity increased, the milk yield increased but decreased when the relative humidity In order to explore the economic benefits of improved indoor temperature, light intensity, and reduced relative humidity, the neural network model was used to predict milk production after optimizing the environment and then conducting cost and benefit analysis.
The cost of improving the indoor environment included the loss of equipment and the cost of power sources.According to the unit price and device life span (Table 2), the

Economic Benefits of Improving Environmental Quality
The average daily indoor air temperature, relative humidity, and light intensity presented strong regularity with milk yield.When the temperature and light intensity increased, the milk yield increased but decreased when the relative humidity increased.In order to explore the economic benefits of improved indoor temperature, light intensity, and reduced relative humidity, the neural network model was used to predict milk production after optimizing the environment and then conducting cost and benefit analysis.
The cost of improving the indoor environment included the loss of equipment and the cost of power sources.According to the unit price and device life span (Table 2), the loss of the equipment was calculated on a daily basis.The dehumidifier and LED light consumed electricity with operation times of 24 h and 18 h per day, respectively.The required amount of power source for heating radiators was computed based on the calorific value, combustion efficiency, and the heat loss through the building envelope as shown in Equation ( 7) [33].
where Q is the amount of heat loss through the building envelope, A is the surface area of the envelope, K is heat transfer coefficient of each surface of the building, and t i − t o is the temperature difference between inside and outside.On the base of warning boundaries of lower milk yield and the selected devices, the living environment was improved by setting different intensities of measures (Table 3).Indoor air temperature was raised by 2, 4, 6, 8, and 10 • C on average.Air relative humidity inside was controlled at 55, 60, 65, 70, and 75% on average.Light intensity in the barn was increased by 52, 78, 115, 125, and 149 lx on average.The values of increased light intensity were selected according to the capability of the regular products on the market in China.The change in milk yield under the improved conditions was predicted by applying the established neural network model.To evaluate the performance of each measure, 41 samples of milk yield in the cold season were selected in cold seasons, in which the milk production was relatively low.Table 3.The conditions of indoor environment improvement.

Variable
Set Point of Environmental Improvement Using an LED light, a heating radiator, and a dehumidifier can dramatically increase milk yield by 8%, 6%, and 7%, respectively, as shown in Figure 6.The average increase of milk yield at the raised indoor temperature was 0.284 kg day −1• C −1 in this study.Xu et al. [17] indicated that milk production of dairy cows at the peak of lactation decreased by 0.365 kg day −1 as the rearing temperature dropped by 1 • C.This is reasonable since the lactation periods were mixed in the experimental group of this study.The milk production response of cows in the early lactation could be less sensitive than the cows in the peak lactation period.Based on the economic analysis of environmental improvement using single measures, heating radiators, and LED lights were able to earn more benefits than The milk yield increased as the LED intensity rose, the peak value was reached at 125 lx.Intensities of 52 lx, 78 lx, 115 lx, 125 lx, and 149 lx LED resulted in increased milk yield of 0.56 kg day −1 , 0.97 kg day −1 , 1.16 kg day −1 , 1.29 kg day −1 , and 1.02 kg day −1 , respectively.However, the results of Lim et al. [18] showed that the milk yield increased after adding an LED light to the dairy barn, but the growth rate decreased as the LED intensity rose.They found that 50 lx, 100 lx, and 200 lx LEDs led to increased milk production of 8.62 kg day −1 , 7.72 kg day −1 , and 3.58 kg day −1 , respectively.This might be caused by the difference between the basic environment of each experiment.
The effect of relative humidity on milk yield seems to have the same feature as that of light intensity.Milk yield increased by 0.33, 0.55, 0.94, 1.26, and 0.96 as the decline of relative humidity to 75%, 70%, 65%, 60%, and 55%.60% relative humidity led to the growth peak of milk yield.
The increased milk yield was shown as net growth profit to perform economic analysis, using the local price of 4.2 CNY kg −1 for raw milk.The net growth profit as a result of using a heating radiator reached 2.957 CNY cow −1 Day −1 and 3.226 CNY cow −1 Day −1 with natural gas and steam coal, respectively, Figure 7a.An increase in net profit of 9.09% can be gained by using steam coal as fuel.The dehumidifier created less profit, reaching a peak value of 2.509 CNY cow −1 Day −1 with the setting point of relative humidity at 60%, Figure 7b.LED light was the most cost-effective measure in this study, resulting in 5.405 CNY more net profit per cow per day using the additional LED light at 125 lx, Figure 7c.
According to the growth of net revenue and energy consumption, the total heating intensity of a winter dairy house radiator in northeast China was recommended to be 96,136 W, the recommended light intensity of LED was 125 lx, and the recommended target indoor relative humidity of dehumidifier was 60%.Compared with dehumidifiers, adding LED light sources to supplement light intensity and adding radiators to increase temperature can increase milk yield and profit to a greater extent.Based on the economic analysis of environmental improvement using single measures, heating radiators, and LED lights were able to earn more benefits than Based on the economic analysis of environmental improvement using single measures, heating radiators, and LED lights were able to earn more benefits than dehumidifiers.Hence, these two measures were taken as a combination to investigate their ability to promote milk production.Increasing the temperature and light together in the dairy barn further increased milk yield, with an average growth of 1.03-4.33kg per cow per day, depending on different intensities of measures, Figure 8a.The highest raised milk yield was 7.2 times more than that gained from environmental improvement of light intensity, and 9.8 times more than that of indoor temperature.
The increased net profit caused by environmental improvement was similar to the changing trend of milk yield, as shown in Figure 8b.When the temperature was increased alone, increases of 8 • C and 10 • C on average produced similar net growth earnings, Figure 7a.However, under the combined influence of light and temperature, the net growth of profit for a 10 • C increase on average was significantly higher than that for 8 • C, reaching 16.802 CNY cow −1 Day −1 .Moreover, when the light intensity was improved alone, the net growth profit increased first (with 52-125 lx) and then decreased (with 149 lx) with the intensification of LED light intensity.However, the net growth profit reached its highest value at 149 lx LED light intensity under all the temperature conditions.Furthermore, the increased milk yield grew exponentially under this combined measure, compared to the single measures.The combination of measures enhanced the promoting effect of temperature and light intensity on milk yield.
Compared to the optimization of the two variables mentioned above, there was not much difference in milk yield growth with the three-measure combined optimization of indoor air relative humidity, temperature, and light intensity, Figure 9a.The milk yield growth was distributed in the range of 1.15-4.32kg per cow per day.The measures taken to control indoor air relative humidity influenced the increase of milk yield insignificantly.
The net profit reached the highest point at 13.96 CNY cow −1 Day −1 .Because of the usage of a dehumidifier in the three-measure combination and its poor promotion of milk yield, the increased net profit dropped by 17%, Figure 9b.On the other hand, dehumidification helped to increase the lower milk yield in the cold season.The lowest milk yield growth rose from 1.03 to 1.15 kg per cow per day, with an improvement of 11.7%.intensity, and 9.8 times more than that of indoor temperature.
The increased net profit caused by environmental improvement was similar to the changing trend of milk yield, as shown in Figure 8b.When the temperature was increased alone, increases of 8 °C and 10 °C on average produced similar net growth earnings, Figure 7a.However, under the combined influence of light and temperature, the net growth of profit for a 10 °C increase on average was significantly higher than that for 8 °C, reaching 16.802 CNY cow −1 Day −1 .Moreover, when the light intensity was improved alone, the net growth profit increased first (with 52-125 lx) and then decreased (with 149 lx) with the intensification of LED light intensity.However, the net growth profit reached its highest value at 149 lx LED light intensity under all the temperature conditions.Furthermore, the increased milk yield grew exponentially under this combined measure, compared to the single measures.The combination of measures enhanced the promoting effect of temperature and light intensity on milk yield.Compared to the optimization of the two variables mentioned above, there was not much difference in milk yield growth with the three-measure combined optimization of indoor air relative humidity, temperature, and light intensity, Figure 9a.The milk yield growth was distributed in the range of 1.15-4.32kg per cow per day.The measures taken to control indoor air relative humidity influenced the increase of milk yield insignificantly.The net profit reached the highest point at 13.96 CNY cow −1 Day −1 .Because of the usage of a dehumidifier in the three-measure combination and its poor promotion of milk yield, the increased net profit dropped by 17%, Figure 9b.On the other hand, dehumidification helped to increase the lower milk yield in the cold season.The lowest milk yield growth rose from 1.03 to 1.15 kg per cow per day, with an improvement of 11.7%.Dehumidifiers can solve the problem of higher water vapor in the air, but the cost of equipment loss is much higher than other measures.Higher relative humidity was associated with lower milk yield, but decreasing relative humidity only increased the minimum milk yield and had no significant effect on the maximum milk yield.Although the economic analysis provided a clear result, the effect of low milk yield caused by high humidity on the long-term performance of dairies remains unknown, which may also influence benefits.
The use of natural gas has the limitation of whether or not there is a natural gas pipeline lying near the site.The use of thermal coal has more transportation and labor problems.Both sources have the potential to raise costs.Therefore, different dairy farms should choose the appropriate heating method according to the geographical location and equipment conditions when using heating equipment.No active ventilation was applied to the environmental management of the barn in cold seasons during the experiment process.A heat exchanger could be considered in further investigations to replace the heating radia- Dehumidifiers can solve the problem of higher water vapor in the air, but the cost of equipment loss is much higher than other measures.Higher relative humidity was associated with lower milk yield, but decreasing relative humidity only increased the minimum milk yield and had no significant effect on the maximum milk yield.Although the economic analysis provided a clear result, the effect of low milk yield caused by high humidity on the long-term performance of dairies remains unknown, which may also influence benefits.

Figure 1 .
Figure 1.The aim of this study is to obtain the relation between milk yield and climatic features in dairy barns and to build the predictive model of milk yield based on neural networks in which th economic analysis of indoor environmental improvement can be achieved.

Figure 2 .
Figure 2. The indoor environment, dairy diet, number of lactating cows, and milk yield data from August 2019 to March 2020.The environment data includes air temperature, relative humidity, wind speed, CO2 concentration, and light intensity, respectively.

Figure 2 .
Figure 2. The indoor environment, dairy diet, number of lactating cows, and milk yield data from August 2019 to March 2020.The environment data includes air temperature, relative humidity, wind speed, CO 2 concentration, and light intensity, respectively.Agriculture 2023, 13, 2206 6 of 14

Figure 3 .
Figure 3. Correlation coefficients of indoor environmental variables and milk yield in seasons of summer-autumn (a) and autumn-winter (b).
indoor temperature, relative humidity, light intensity and milk yield

Figure 3 .
Figure 3. Correlation coefficients of indoor environmental variables and milk yield in seasons of summer-autumn (a) and autumn-winter (b).

Figure 3 .
Figure 3. Correlation coefficients of indoor environmental variables and milk yield in seasons of summer-autumn (a) and autumn-winter (b).
indoor temperature, relative humidity, light intensity and milk yield

Figure 4 .
Figure 4.The milk yield distribution versus indoor temperature, relative humidity, and light intensity in cold seasons.

Figure 4 .
Figure 4.The milk yield distribution versus indoor temperature, relative humidity, and light intensity in cold seasons.

Figure 5 .
Figure 5. Architecture of the established feed-forward neural network.

Figure 5 .
Figure 5. Architecture of the established feed-forward neural network.

Figure 6 .
Figure 6.Increased milk yield under different measurements compared with the original condition.

Figure 7 .
Figure 7. Increased milk profit and cost caused by improved indoor temperature (a), improved indoor relative humidity (b), and improved indoor light intensity (c).

Figure 6 .
Figure 6.Increased milk yield under different measurements compared with the original condition.

Figure 6 .
Figure 6.Increased milk yield under different measurements compared with the original condition.

Figure 7 .
Figure 7. Increased milk profit and cost caused by improved indoor temperature (a), improved indoor relative humidity (b), and improved indoor light intensity (c).

Figure 7 .
Figure 7. Increased milk profit and cost caused by improved indoor temperature (a), improved indoor relative humidity (b), and improved indoor light intensity (c).

Figure 8 .
Figure 8. Increased milk yield (a) and net profit (b) caused by improved indoor environment via combined heating radiator and LED light different intensity, respectively.

Figure 8 .Figure 9 .
Figure 8. Increased milk yield (a) and net profit (b) caused by improved indoor environment via combined heating radiator and LED light different intensity, respectively.Agriculture 2023, 13, 2206 12 of 14

Figure 9 .
Figure 9. Increased milk yield (a) and net profit (b) caused by improved indoor environment with the combination of dehumidifier, heating radiator, and LED light to different intensities.

Table 1 .
The model performance of different numbers of nodes in the hidden layer and different activation functions in the hidden and output layers.

Table 2 .
Information on selected devices to improve indoor environment.