<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Modeling of War-Induced Ukrainian Migration&apos;s Impact on Poland&apos;s Trade Using Machine Learning</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author role="corresp">
							<persName><forename type="first">Nataliia</forename><surname>Dziubanovska</surname></persName>
							<email>n.dziubanovska@wunu.edu.ua</email>
							<affiliation key="aff0">
								<orgName type="institution">West Ukrainian National University</orgName>
								<address>
									<addrLine>11 Lvivska Str</addrLine>
									<postCode>46009</postCode>
									<settlement>Ternopil</settlement>
									<country key="UA">Ukraine</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Modeling of War-Induced Ukrainian Migration&apos;s Impact on Poland&apos;s Trade Using Machine Learning</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">87277BF03FC7E98F856C54165290B5FA</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2025-04-23T17:41+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>correlation analysis</term>
					<term>economic analysis</term>
					<term>ensemble methods</term>
					<term>forecasting</term>
					<term>geopolitical events</term>
					<term>machine learning</term>
					<term>migration</term>
					<term>Poland</term>
					<term>splines</term>
					<term>war in Ukraine</term>
					<term>foreign trade</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>The article explores the impact of Ukrainian migration caused by the war on Poland's external economic indicators, given that Poland is one of the main recipients of Ukrainian refugees in Europe. The scale and pace of the migration flows have created new challenges for the Polish economy, particularly in the context of changes in external trade. The study provides a detailed analysis of the relationships between Poland's import and export volumes and the number of asylum seekers from Ukraine during the period from 2008 to 2023, considering key geopolitical events such as the conflict in Eastern Ukraine, the annexation of Crimea in 2014, and Russia's full-scale invasion of Ukraine in 2022. It was found that traditional correlation analysis methods could not fully capture the complex nonlinear relationships between the variables; therefore, various machine learning methods were used to model these relationships, including Lasso, Ridge and Polynomial Regression, K-Nearest Neighbors (KNN), Random Forest, Gradient Boosting, XGBoost, CatBoost, Cubic Splines and Spline Transformer, and Statsmodels (GLMGam). The results obtained led to conclusions about the significant nonlinear relationships between refugee migration flows from Ukraine and Poland's external trade indicators. This research contributes to understanding how migration can impact the macroeconomic stability and international trade of host countries and offers new approaches for forecasting the economic consequences of migration processes.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>The war in Ukraine has caused one of the largest migration waves in modern history, which has significantly affected neighboring countries, including Poland. Migration on such a scale has profound socio-economic consequences, including changes in the country's foreign economic relations. According to UNHCR data as of August 19, 2024, there are 6,655,100 refugees from Ukraine worldwide, with 6,083,800 of them in Europe. As of June 11, 2024, Poland has recorded 957,504 Ukrainian refugees, with 21,388,746 Ukrainians crossing the border into Poland since February 24, 2022, of whom 19,498,566 returned in the opposite direction since February 28, 2022 <ref type="bibr" target="#b0">[1]</ref>. The scale and speed of this migration have created new challenges for Poland's economic system, which requires in-depth analysis. The influx of labor and spending by Ukrainian migrants abroad contribute to the economic growth of the host countries. The greatest contribution of Ukrainians to the labor force is observed in Poland, the Czech Republic, and Estonia. This trend creates a solid foundation for the growth of goods and services production in these European countries, especially those that have accepted the largest number of Ukrainian migrants or have a high percentage of Ukrainian refugees in the total population <ref type="bibr" target="#b1">[2]</ref>.</p><p>However, to fully understand the economic consequences, it is necessary to consider not only direct effects, such as filling vacant job positions and increased consumer demand, but also indirect impacts, particularly on foreign trade and macroeconomic stability. Specifically, in Poland, one of the recipient countries that has accepted the largest number of Ukrainian migrants, there is a significant impact on foreign economic indicators. Migration flows can alter the structure of imports and exports, affecting the competitiveness of local businesses and creating new opportunities for international trade. Analyzing the nonlinear relationships between Ukrainian migration and Poland's foreign trade indicators will reveal subtle connections that may be overlooked in traditional models.</p><p>Thus, the aim of this research is not only to identify and analyze these relationships but also to develop new forecasting models that account for these complex nonlinear dependencies. This will enhance the accuracy of predicting the economic impacts of migration and develop effective strategies for managing its effects. The research results could serve as a basis for developing policy and economic recommendations aimed at maximizing the benefits of migration processes and ensuring the economic stability of the host country.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Literature review</head><p>Migration is a complex socio-economic phenomenon that impacts various aspects of economic development in countries. In the context of contemporary global challenges, including the war in Ukraine, migration flows have reached immense scales and have become a significant subject for research. Special attention should be given to analyzing the impact of migration on the economic indicators of host countries. Research in this area covers a wide range of issues, including labor market changes, income levels, consumer demand, effects on foreign trade, and socio-economic consequences for recipient countries.</p><p>Scholars from various fields are actively studying the impact of migration on the economy to develop effective policies and integration strategies, reflecting a multidisciplinary approach to the issue. Sociologists are interested in how migrants integrate into new communities, their interactions with local residents, and the impact on social cohesion. Political scientists analyze the influence of migrants on electoral processes and political platform formation. Experts in technical fields use machine learning and big data analysis methods to identify patterns and trends in migration flows, as well as to forecast their potential economic and social consequences.</p><p>In <ref type="bibr" target="#b2">[3]</ref>, Alina Sîrbu, Gennady Andrienko, Natalia Andrienko, Chiara Boldrini, Marco Conti, Fosca Giannotti, Riccardo Guidotti, Simone Bertoli, Jisu Kim, Cristina Ioana Muntean, Luca Pappalardo, Andrea Passarella, Dino Pedreschi, Laura Pollacci, Francesca Pratesi, and Rajesh Sharma (2021) analyze different stages of the migration process, comparing traditional and novel data sources and models at each stage. The authors consider three key phases of migration: travel, residence, and impact on the country of origin. The travel stage examines migration flows and stocks, with a focus on how big data can influence our understanding of nature of migration. They stress that migration is a joint activity of both those who leave and those who stay, and that both groups actively influence migration processes and outcomes. Rather than focusing on the positive or negative aspects of migration, the authors call for a multi-level understanding of its complex interactions and consequences.</p><p>Iwan Harsono, Himawan Sutanto, Ridwan Sya'rani (2024) in <ref type="bibr" target="#b7">[8]</ref> investigate the impact of migration on the social and economic structures of the Indonesian region of Kalimantan, which has a long history of migration processes. In recent decades, migration patterns in this region have significantly changed due to urbanization, industrialization, and environmental changes. Quantitative analysis indicates a positive relationship between migration and social changes, as well as economic development, suggesting potential benefits of migration for cultural integration and economic growth. However, the authors emphasize the importance of contextspecific policies to address issues such as infrastructure development and social cohesion, and note the need for further qualitative research for a deeper understanding of these processes.</p><p>In addition to the broad range of scientific studies examining the impact of migration on the economy, there are also those focused on the relationship between migration flows and trade. Richard Bräuer and Felix Kersting (2023) in <ref type="bibr" target="#b8">[9]</ref> analyze the economic and political consequences of a trade shock caused by the import of grain from America to Prussia during the first globalization . The authors show that this shock led to a decrease in employment and overall income; however, a reduction in per capita income or political polarization was not observed, which is explained by a strong migration response. The results indicate that the negative effects of trade shocks are not a universal feature of globalization but depend on labor mobility. For the analysis, the researchers used digitized data from Prussian censuses and national trade, as well as studied interregional variations in grain crops grown in Prussia and trade data from Italy and the USA.</p><p>Yuan Tian (2024) in <ref type="bibr" target="#b9">[10]</ref> explores how significant economic changes, such as trade liberalization, impact the institutions regulating internal migration, using China's Hukou system as a case study. Using new data on migration policies at the prefecture level, the author documented an increase in regulatory norms for migrants following China's accession to the WTO and assessed how changes in export tariffs affected migration rules. The results show that regions with greater liberalization of the export market introduced less restrictive rules for migrants. This indicates that migration policy and trade conditions can interact, shaping new dynamics in the labor market and influencing external trade.</p><p>A significant portion of academic work is dedicated to applying various approaches to modeling migration and its impact on economic, social, and demographic processes. Among the primary approaches are econometric models, agent-based models, and machine learning models, which allow for forecasting and analyzing migration processes in the context of global challenges such as wars, economic crises, and climate change. Specifically, Jérôme Adda, Christian Dustmann, Joseph-Simon Görlach (2022) in <ref type="bibr" target="#b10">[11]</ref> presented and evaluated a dynamic model that incorporates different abilities and location preferences of individuals to analyze the career evolution of immigrants in conjunction with their plans to return to their home countries. The analysis reveals a new form of selective return migration: immigrants who plan to stay longer invest more in skill acquisition, which impacts their career paths and earnings. The study also explains why immigrants are willing to accept lower-paying jobs compared to locals. The model provides important insights for developing migration policy, demonstrating how residence restrictions or achievement requirements shape immigrants' career profiles, influence investment in human capital, and determine the choices of arrivals and those leaving. This understanding is crucial for analyzing the economic consequences of migration, as it explains how immigrants planning to stay longer may affect the labor market and consumer spending, which, in turn, may reflect on external trade.</p><p>Haodong Qi, Tuba Bircan (2023) in <ref type="bibr" target="#b11">[12]</ref> propose a new approach to modeling migration flows using a Flow Time-specific Gravity (FTG) model, which improves existing fixed-effects (FE) gravity models. They show that traditional FE models have limitations in explaining and predicting the temporal dynamics of migration, especially in the context of forced migration where processes are complex and heterogeneous. The FTG model, as confirmed by EUROSTAT data, provides more accurate forecasts when extending the analysis period. These findings are significant for improving migration forecasting methodologies and can be useful for developing more effective migration policies.</p><p>Olivier Charlot, Claire Naiditch &amp; Radu Vranceanu (2024) in <ref type="bibr" target="#b12">[13]</ref> developed a model to analyze the market for smuggling forced migrants, based on empirical data regarding the illegal transportation of migrants from the Horn of Africa and the Middle East to Europe over the past decade. Comparative analysis of equilibrium decisions shows that coercive measures aimed at combating smugglers reduce the number of illegal migrants and smugglers but also decrease the overall welfare of migrants. Interestingly, a slight increase in opportunities for legal migration contributes to reducing illegal flows without negatively affecting migrant welfare or increasing the overall number of migrants. At the same time, extremely restrictive asylum policies have a similar impact on illegal migrant flows as more liberal policies, with the largest illegal flows observed under moderately strict policies.</p><p>Chujian Shao (2024) in <ref type="bibr" target="#b13">[14]</ref> analyzes skilled immigration through a dynamic general equilibrium model that accounts for endogenous labor migration and firm changes. It examines whether trade and immigration are substitutes or complements, as well as the effects of low barriers to labor mobility. The model shows that trade and immigration can be substitutes, with a negative impact of emigration of skilled workers on exporting countries, and an asymmetric impact on welfare in sending and receiving countries. Additionally, it demonstrates how immigrant flows affect the formation of new firms and labor costs.</p><p>John O. R. Aoga, Juhee Bae, Stefanija Veljanoska, Siegfried Nijssen &amp; Pierre Schaus (2024) in <ref type="bibr" target="#b14">[15]</ref> investigate the impact of climate shocks on migration decisions, focusing on six agrariandependent countries: Burkina Faso, Ivory Coast, Mali, Mauritania, Niger, and Senegal. Using machine learning methods based on tree algorithms (specifically, XGB, Random Forest), they analyze how weather shocks, measured using the standardized precipitation-evapotranspiration index (SPEI), affect migration flows. The study shows that while weather factors improve forecasting accuracy, socio-economic characteristics have a more significant impact on migration intentions. Furthermore, the authors find that longer time scales of SPEI have a greater impact on international migration, while shorter time scales affect internal migration.</p><p>It is also important to highlight the work by Serhii Kozlovskyi, Tetiana Kulinich, Ihor Vechirko, Ruslan Lavrov, Ivan Zayukov, and Hennadii Mazur (2024) <ref type="bibr" target="#b15">[16]</ref>, in which the authors explore the relationship between net migration volume and economic development in individual European countries, allowing for GDP forecasting and strengthening migration policy. Using correlation-regression analysis based on Eurostat and State Statistics Service of Ukraine data for the period 2014−2021 for specific European countries (EU-27 countries, Switzerland, and Ukraine), the study identified a relationship between net migration volume and GDP level. Linear correlation equations are used to forecast GDP values depending on net migration volume. Special attention is given to Poland, where migration contributes to economic growth due to the simplified procedures for relocating immigrants, ease of learning the language, geographical proximity, and a higher standard of living compared to neighboring former USSR countries. Specifically, an increase in net migration to Poland by 1% will lead to a GDP increase of 1.43 million euros. Due to the war between Russia and Ukraine, net migration from Ukraine to Poland has significantly increased, potentially raising Poland's GDP in 2023 by 0.08% or 529.54 million euros.</p><p>Unlike existing studies, which often focus on individual consequences of migration processes or specific economic indicators without a comprehensive approach, there is often a lack of systematic analysis of the interconnections between migration flows and economic changes at the level of individual countries or regions. To achieve a deeper understanding of the impact of Ukrainian migration due to the war on Poland's trade indicators, a comprehensive analysis of migration and trade data is necessary. This will allow for a better assessment of the complex interrelationships and adaptation of policy to the real conditions and needs of society.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Methodology</head><p>For the study, statistical data from Eurostat [17] was used. Specifically, information on Poland's exports and imports was taken from the dataset "EU t At the initial stage, we constructed graphs (Figure <ref type="figure" target="#fig_0">1</ref>) of these key indicators over time (Poland's export and import flows, as well as data on asylum applicants from Ukraine). This allowed us to visualize changes over the study period and assess how significant geopolitical events (the onset of the conflict in 2014 and the full-scale invasion in 2022) affected Poland's foreign trade indicators and Ukrainian migration processes to this country. The graphical representation of the data facilitated the identification rade since 1988 by HS2-4-6 and CN8," which provides annual statistics by product categories. Additionally, data on asylum applicants by type, nationality, age, and sex from the dataset "Asylum applicants by type, citizenship, age and sexannual aggregated data" was used, with a focus on Ukrainian citizens. This dataset provides annual figures on asylum seekers, measured in number of persons.</p><p>The study period from 2008 to 2023 covers significant geopolitical events that have had a substantial impact on migration flows, including the conflict in eastern Ukraine and the annexation of Crimea by Russia in 2014, as well as the full-scale military invasion in 2022. These events have a direct impact on Ukrainian migration, which is a crucial aspect of our research aimed at modeling the impact of war-induced migration on Poland's trade indicators using machine learning methods.</p><p>of key trends and correlations, which became the basis for further analysis using machine learning methods. From Figure <ref type="figure" target="#fig_0">1</ref>, we can see that Poland's imports demonstrate a general upward trend throughout the study period, while exports also show a growth trend with some periodic fluctuations. However, a significant increase in exports is observed in 2022, when exports reached their peak level. This trade dynamics could be related to economic and geopolitical changes. The number of asylum seekers from Ukraine shows sharp spikes in the context of key events, particularly in 2014 and 2022. This may indicate a close connection between migration processes and Poland's external trade.</p><p>The next step after the visual interpretation of the dynamic changes in the studied variables is to perform a correlation analysis to quantitatively assess the relationships between export volumes, imports, and the number of migrants (Figure <ref type="figure" target="#fig_1">2</ref>). The correlation matrix helps to identify the degree and direction of these relationships, which serves as a basis for further application of machine learning methods. The correlation between imports and the number of asylum seekers is 0.404, indicating a moderate positive relationship, though this connection is not very strong. Similarly, the correlation between exports and the number of asylum seekers is 0.458, suggesting a moderate positive relationship. While these indicators suggest some interdependence between migration flows and foreign trade metrics, the intensity is relatively moderate. These results highlight the need for a more in-depth analysis, as traditional correlation methods may not uncover complex nonlinear relationships. This justifies the use of machine learning methods, which can detect and model such nonlinear dependencies and provide more detailed insights into the impact of migration processes on economic indicators.</p><p>To identify potential trends and patterns that might not be evident from simple correlation analysis, graphs (Figure <ref type="figure" target="#fig_2">3</ref>) of the relationships between exports, imports, and the number of asylum seekers were created. These graphs allow for a visual tracking of dynamic changes in the data and reveal possible patterns that may not be explicitly represented in numerical correlations. From the analysis in Figure <ref type="figure" target="#fig_2">3</ref>, it is evident that the increase in the number of asylum seekers is accompanied by growth in both imports and exports, though with varying intensity. This suggests that, while there is some interconnection between the migration flows of Ukrainians and the foreign trade indicators of the host country, the nature of this relationship may be nonlinear. For a more detailed analysis and to uncover more complex dependencies, such as potential threshold effects or nonlinear models, the application of machine learning methods is advisable. This will provide a better understanding of the intricate patterns and relationships that are not always evident through simple correlation analysis.</p><p>Various machine learning methods were used to analyze the dependencies between Poland's imports, exports, and the number of Ukrainian asylum applications in the country. The choice of methods was based on the need to account for nonlinear relationships between variables that traditional linear models cannot capture. To achieve the best results, it was necessary to test different approaches, including both simple and complex models, for accurate prediction and pattern detection in the data.</p><p>Among the methods used were linear regressions such as Lasso Regression (linear regression with L1 regularization) and Ridge Regression (linear regression with L2 regularization), which help avoid overfitting and select significant features; Polynomial Regression, which extends linear regression to model nonlinear dependencies using polynomial functions. Additionally, K-Nearest Neighbors (KNN) was applied, a nonlinear method that is based on the distance between points in feature space and determines results based on the average of neighboring points. Ensemble methods were also used, including Random Forest, which employs multiple decision trees to improve accuracy and reduce overfitting, and Gradient Boosting, which enhances results by incrementally adding models that correct errors from previous ones. XGBoost -an advanced decision tree with an improved gradient boosting algorithm and CatBoost, which trains based on multiple decision trees, were used to identify complex and nonlinear relationships between variables. The presence of dependencies among the studied indicators was also examined using methods for modeling nonlinear relationships through the construction of piecewise polynomials (Cubic Splines) and methods employing spline functions for nonlinear feature transformation (Spline Transformer). A generalized linear model with a gamma distribution for nonlinear dependencies (Statsmodels with GLMGam) was also applied.</p><p>Model evaluation was based on three key metrics: Mean Absolute Error (MAE), Mean Squared Error (MSE), and R-squared (R 2 ). Models with the lowest MAE and MSE values and the highest R 2 values were identified as the best.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Results</head><p>The first models tested were linear ones, such as Ridge Regression and Lasso Regression, which proved useful for initial analysis but did not demonstrate high accuracy. This indicates that simple linear models may be insufficient for capturing complex relationships in the data, especially when there is evident nonlinearity in the relationships.</p><p>To better understand possible nonlinearities, methods capable of modeling more complex dependencies were employed. K-Nearest Neighbors (KNN) showed a significant improvement in prediction accuracy for exports. Polynomial Regression also indicated increased accuracy for exports, confirming the presence of nonlinear relationships between variables.</p><p>Ensemble methods, such as Random Forest and Gradient Boosting, provided even better results. Gradient Boosting, due to its approach of incrementally improving models, achieved exceptionally high results, reflecting its high effectiveness in modeling complex, nonlinear dependencies. XGBoost and CatBoost, which are also powerful tools for dealing with nonlinear relationships, showed mixed results. XGBoost did not achieve competitive results compared to Gradient Boosting and Random Forest. In contrast, CatBoost demonstrated more significant achievements, indicating its effectiveness in modeling nonlinear relationships, though still falling short of the top results achieved by Gradient Boosting.</p><p>Methods like Cubic Splines and Spline Transformer, which use nonlinear feature transformations, also showed high results. However, their accuracy was somewhat lower compared to Gradient Boosting, highlighting the advantages of ensemble methods in modeling complex relationships.</p><p>Finally, models using statistical approaches, such as Statsmodels with GLMGam, showed lower accuracy compared to ensemble methods. This confirms that traditional statistical models are less effective in cases with significant nonlinearities. The numerical results of the study are presented in Table <ref type="table" target="#tab_0">1</ref>. Gradient Boosting is a powerful method that provides high-quality predictions but does not generate explicit equations in the traditional sense, as linear or polynomial regressions do. This is because Gradient Boosting uses an ensemble of simple models (typically decision trees) to create a complex model made up of many decision trees.</p><p>To visualize the modeling results, graphs were created (Figure <ref type="figure" target="#fig_3">4</ref>) illustrating the obtained models. This allows for a clear assessment of the alignment between the predictions and the actual data. Gradient Boosting demonstrated a high level of effectiveness in modeling the relationship between Poland's trade indicators and the number of Ukrainian asylum seekers due to its unique advantages. This method is characterized by its ability to accurately capture complex nonlinear relationships and interactions between variables, allowing for the creation of models with high predictive accuracy. Specifically, Gradient Boosting effectively handles diverse types of data and reduces the impact of noise, resulting in more stable outcomes.</p><p>To ensure the reliability and accuracy of predictions for future trends, it is crucial to maintain the relevance of models through regular data updates and model validation with new data. In this study, using real data from 2008 to 2023, we implemented forecasting models for Poland's imports and exports for the periods 2024-2026. Models were built both with and without considering the impact of the number of Ukrainian migrants. This approach allowed for a comprehensive assessment of accuracy and reliability in different scenarios, providing a deeper understanding of potential changes and their impact on Poland's foreign trade indicators.</p><p>The visualization of forecasting results (Figure <ref type="figure" target="#fig_4">5</ref>) provides a clear comparison of the effects of different scenarios of migration flow changes on trade. These graphs clearly depict how accounting for migration processes influences forecast changes. Such visual representation is especially important as it helps to better understand potential economic consequences and make informed decisions for strategic planning and economic management.</p><p>The evaluation of forecasting model effectiveness, considering or not considering the impact of Ukrainian refugee migration flows on Poland's foreign trade, was conducted using MAE and MSE metrics. The results (Table <ref type="table">2</ref>) showed that models incorporating data on the number of migrants provide significantly higher accuracy compared to models that do not account for this factor.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Table 2</head><p>Performance Metrics of Forecasting Models for Poland's Trade Indicators with and without Ukrainian Asylum Applicants for 2024-2026 Using Gradient Boosting Incorporating the external variable into the forecasting model leads to a reduction in both the mean absolute error and mean squared error for both imports and exports. This analysis allowed for the assessment of how including migration information impacts the accuracy of forecasting trade indicators for the host country, using Poland as an example, in the context of the significant increase in the number of Ukrainian refugees due to the Russia-Ukraine war.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusions</head><p>The war in Ukraine has acted as a catalyst for one of the largest migration waves in history, significantly impacting neighboring countries, particularly Poland. The influx of Ukrainian migrants has far-reaching socio-economic consequences, reflected in changes in Poland's foreign economic relations. As of August 2024, Poland has taken in around one million Ukrainian refugees, creating new challenges for the country's economic system that require indepth analysis. At the same time, the influx of Ukrainian labor and the spending of migrants within Poland are stimulating economic growth, particularly in the production of goods and services, due to increased consumer demand.</p><p>The changes in Poland's economy resulting from migration are not limited to direct effects, such as filling vacancies and increased consumer demand. It is also important to consider indirect effects, particularly on foreign trade and macroeconomic stability. Migration flows can alter the structure of imports and exports, affecting the competitiveness of local businesses and creating new opportunities for international trade. The non-linear relationships between migration and Poland's foreign economic indicators highlight the importance of using advanced analytical methods to gain a deeper understanding of these processes.</p><p>Analyzing Poland's foreign trade indicators in the context of migration processes, particularly using machine learning methods, allows for the identification of complex nonlinear dependencies that traditional models may not capture. Specifically, the use of machine Our study demonstrates an integrative approach to analyzing the impact of large-scale migration on the economic indicators of host countries, specifically Poland. This approach not only expands the horizons of existing models but also reveals subtle and complex relationships between migration flows and foreign economic indicators. The use of various machine learning algorithms, such as Gradient Boosting, XGBoost, and CatBoost, provides deep and accurate analysis. In particular, the application of Gradient Boosting for modeling dependencies has shown its unique capability for precise forecasting, resulting in reliable predictive models for Poland's imports and exports. Gradient Boosting's ability to handle non-linear relationships and reduce the impact of noise has proven to be the most effective in forecasting.</p><p>The developed forecasting model for the periods 2024-2026, taking into account the impact of migration processes, confirms that incorporating information about Ukrainian migrants significantly improves forecasting accuracy. This approach ensures the relevance and accuracy of results, opening new opportunities for developing political and economic strategies aimed at optimizing the benefits of migration processes and ensuring macroeconomic stability in the host country.</p><p>The research not only expands the understanding of the economic consequences of the war in Ukraine but also provides tools for effectively managing these consequences in the future. It sets new standards in the analysis of migration effects and demonstrates a profound intellectual approach to using data and technology to address complex economic issues. This creates a valuable contribution to the development of political and economic strategies, fostering more effective management of the economic impacts of migration processes.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Dynamic Trends of Poland's Trade and Ukrainian Asylum Applicants.</figDesc><graphic coords="7,106.30,85.00,382.70,215.65" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: Correlation Matrix of Poland's Trade and Ukrainian Asylum Applicants.</figDesc><graphic coords="8,170.10,85.00,255.10,168.95" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 3 :</head><label>3</label><figDesc>Figure 3: Dynamic Trends between Poland's Trade and Ukrainian Asylum Applicants.</figDesc><graphic coords="8,99.25,417.20,424.50,180.30" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 4 :</head><label>4</label><figDesc>Figure 4: Modeling the Relationship Between Import of Poland (a) and Export of Poland (b) with Ukrainian Asylum Applicants Using Gradient Boosting.</figDesc><graphic coords="11,302.90,221.20,208.90,160.20" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Figure 5 :</head><label>5</label><figDesc>Figure 5: Forecasts of Poland's Trade Indicators (Import (a) and Export (b)) with and without Consideration of Ukrainian Asylum Applicants for 2024-2026 Using Gradient Boosting</figDesc><graphic coords="12,90.75,317.90,413.85,217.85" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1</head><label>1</label><figDesc>Modeling Results of Poland's Trade Dependencies on Ukrainian Asylum Applicants Using Machine Learning MethodsBased on these criteria, Gradient Boosting proved to be the most effective method for modeling the dependence of Poland's foreign trade indicators on the number of Ukrainian the highest accuracy and the smallest forecasting errors for both imports and exports compared to other machine learning methods.</figDesc><table><row><cell>Machine Learning Method (Import)</cell><cell>MAE</cell><cell>MSE</cell><cell>R 2</cell></row><row><cell>Lasso Regression</cell><cell>32,457.32</cell><cell>1,377,119,408.26</cell><cell>0.084</cell></row><row><cell>Ridge Regression</cell><cell>32,457.32</cell><cell>1,377,119,341.39</cell><cell>0.084</cell></row><row><cell>Polynomial Regression</cell><cell>13,868.37</cell><cell>362,599,104.51</cell><cell>0.452</cell></row><row><cell>K-Nearest Neighbors (KNN)</cell><cell>11,800.79</cell><cell>269,891,799.13</cell><cell>0.592</cell></row><row><cell>Random Forest</cell><cell>5,589.26</cell><cell>54,640,560.67</cell><cell>0.917</cell></row><row><cell>Gradient Boosting</cell><cell>733.98</cell><cell>2,950,298.46</cell><cell>0.996</cell></row><row><cell>XGBoost</cell><cell>24,259.32</cell><cell>1,503,846,324.71</cell><cell>-0.00007</cell></row><row><cell>CatBoost</cell><cell>11,387.92</cell><cell>202,925,453.87</cell><cell>0.865</cell></row><row><cell>Cubic Splines</cell><cell>6,778.86</cell><cell>81,372,913.92</cell><cell>0.877</cell></row><row><cell>Spline Transformer</cell><cell>5,310.81</cell><cell>47,135,601.13</cell><cell>0.929</cell></row><row><cell>Statsmodels (GLMGam)</cell><cell>17,784.33</cell><cell>462,061,168.27</cell><cell>0.302</cell></row><row><cell>Machine Learning Method (Export)</cell><cell>MAE</cell><cell>MSE</cell><cell>R 2</cell></row><row><cell>Lasso Regression</cell><cell>18,406.33</cell><cell>422,536,540.09</cell><cell>0.168</cell></row><row><cell>Ridge Regression</cell><cell>18,406.33</cell><cell>422,536,509.74</cell><cell>0.168</cell></row><row><cell>Polynomial Regression</cell><cell>9,664.86</cell><cell>142,935,865.75</cell><cell>0.523</cell></row><row><cell>K-Nearest Neighbors (KNN)</cell><cell>7,660.00</cell><cell>98,974,286.92</cell><cell>0.670</cell></row><row><cell>Random Forest</cell><cell>3,784.71</cell><cell>22,339,751.14</cell><cell>0.925</cell></row><row><cell>Gradient Boosting</cell><cell>1,048.98</cell><cell>8,161,258.02</cell><cell>0.973</cell></row><row><cell>XGBoost</cell><cell>14,352.91</cell><cell>369,993,109.57</cell><cell>0.271</cell></row><row><cell>CatBoost</cell><cell>6,622.61</cell><cell>71,816,021.88</cell><cell>0.859</cell></row><row><cell>Cubic Splines</cell><cell>4,418.60</cell><cell>31,757,523.17</cell><cell>0.894</cell></row><row><cell>Spline Transformer</cell><cell>4,098.70</cell><cell>24,907,394.89</cell><cell>0.917</cell></row><row><cell>Statsmodels (GLMGam)</cell><cell>12,858.73</cell><cell>280,727,273.15</cell><cell>0.063</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head></head><label></label><figDesc>as Gradient Boosting, XGBoost, CatBoost, and others has demonstrated effectiveness in modeling these dependencies, providing high forecasting accuracy and uncovering subtle patterns in the data.</figDesc><table><row><cell>learning methods such</cell><cell></cell><cell></cell></row><row><cell>Import</cell><cell>MAE</cell><cell>MSE</cell></row><row><cell>With Ukrainian Asylum Applicants</cell><cell>22,460.06</cell><cell>536,387,434.68</cell></row><row><cell>Without Ukrainian Asylum Applicants</cell><cell>25,760.54</cell><cell>685,141,890.08</cell></row><row><cell>Export</cell><cell>MAE</cell><cell>MSE</cell></row><row><cell>With Ukrainian Asylum Applicants</cell><cell>12,625.92</cell><cell>173,615,087.23</cell></row><row><cell>Without Ukrainian Asylum Applicants</cell><cell>13,269.75</cell><cell>195,286,812.11</cell></row></table></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgements</head><p>The author expresses gratitude to the French Research Center in Humanities and Social Sciences -CEFRES, Na Florenci 3, 110 00 Prague 1, Czech Republic (CEFRES, UAR 3138 CNRS-MEAE) for providing funding and support for this research project.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Situation Ukraine Refugee Situation</title>
		<ptr target="https://data.unhcr.org/en/situations/ukraine/location/10781" />
	</analytic>
	<monogr>
		<title level="m">Operational Data Portal</title>
				<imprint>
			<date type="published" when="2024-08-24">August 24, 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">The influence of Ukrainian migrants on the economies of recipient countries</title>
		<ptr target="https://bank.gov.ua/ua/news/all/vpliv-ukrayinskih-migrantiv-na-ekonomiki-krayin-retsipiyentiv" />
	</analytic>
	<monogr>
		<title level="j">National Bank of Ukraine</title>
		<imprint>
			<date type="published" when="2024-08-24">August 24, 2024</date>
		</imprint>
		<respStmt>
			<orgName>National Bank of Ukraine</orgName>
		</respStmt>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Human migration: the big data perspective</title>
		<author>
			<persName><forename type="first">A</forename><surname>Sîrbu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Andrienko</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Andrienko</surname></persName>
		</author>
		<idno type="DOI">10.1007/s41060-020-00213-5</idno>
		<ptr target="https://doi.org/10.1007/s41060-020-00213-5" />
	</analytic>
	<monogr>
		<title level="j">Int J Data Sci Anal</title>
		<imprint>
			<biblScope unit="volume">11</biblScope>
			<biblScope unit="page" from="341" to="360" />
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">International Migration Drivers: Economic, Environmental, Social, and Political Effects</title>
		<author>
			<persName><forename type="first">A</forename><surname>Kwilinski</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Lyulyov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Pimonenko</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Dzwigol</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Abazov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Pudryk</surname></persName>
		</author>
		<idno type="DOI">10.3390/su14116413</idno>
		<ptr target="https://doi.org/10.3390/su14116413" />
	</analytic>
	<monogr>
		<title level="j">Sustainability</title>
		<imprint>
			<biblScope unit="volume">14</biblScope>
			<biblScope unit="page">6413</biblScope>
			<date type="published" when="2022">2022</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Comparing Push and Pull Factors Affecting Migration</title>
		<author>
			<persName><forename type="first">M</forename><surname>Urbański</surname></persName>
		</author>
		<idno type="DOI">10.3390/economies10010021</idno>
		<ptr target="https://doi.org/10.3390/economies10010021" />
	</analytic>
	<monogr>
		<title level="j">Economies</title>
		<imprint>
			<biblScope unit="volume">10</biblScope>
			<biblScope unit="page">21</biblScope>
			<date type="published" when="2022">2022</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">The impact of the post-Brexit migration system on the UK labour market</title>
		<author>
			<persName><forename type="first">J</forename><surname>Portes</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Springford</surname></persName>
		</author>
		<idno type="DOI">10.1080/21582041.2023.2192516</idno>
		<ptr target="https://doi.org/10.1080/21582041.2023.2192516" />
	</analytic>
	<monogr>
		<title level="j">Contemporary Social Science</title>
		<imprint>
			<biblScope unit="volume">18</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="132" to="149" />
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Beyond &apos;Those Who Leave and Those Who Stay&apos;: the simultaneous impacts of co-agency in migration</title>
		<author>
			<persName><forename type="first">V</forename><surname>Ducu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">J</forename><surname>Lever</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Rone</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Á</forename><surname>Telegdi-Csetri</surname></persName>
		</author>
		<idno type="DOI">10.1080/1369183X.2024.2357827</idno>
		<ptr target="https://doi.org/10.1080/1369183X.2024.2357827" />
	</analytic>
	<monogr>
		<title level="j">Journal of Ethnic and Migration Studies</title>
		<imprint>
			<biblScope unit="page" from="1" to="26" />
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Migration Patterns and Social Change in Kalimantan Region: A Quantitative Study of The Impact of Migration in Changing Social and Economic Structures</title>
		<author>
			<persName><forename type="first">Iwan</forename><surname>Harsono</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Himawan</forename><surname>Sutanto</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Ridwan</forename><surname>Sya</surname></persName>
		</author>
		<author>
			<persName><forename type="first">'</forename><surname>Rani</surname></persName>
		</author>
		<idno type="DOI">10.58812/eccg7g18</idno>
	</analytic>
	<monogr>
		<title level="j">SNHSS</title>
		<imprint>
			<biblScope unit="volume">1</biblScope>
			<biblScope unit="issue">01</biblScope>
			<biblScope unit="page" from="14" to="24" />
			<date type="published" when="2024-02">Feb. 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Trade Shocks, Labour Markets and Migration in the First Globalisation</title>
		<author>
			<persName><forename type="first">Richard</forename><surname>Bräuer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Felix</forename><surname>Kersting</surname></persName>
		</author>
		<idno type="DOI">10.1093/ej/uead068</idno>
		<ptr target="https://doi.org/10.1093/ej/uead068" />
	</analytic>
	<monogr>
		<title level="j">The Economic Journal</title>
		<imprint>
			<biblScope unit="volume">134</biblScope>
			<biblScope unit="page" from="135" to="164" />
			<date type="published" when="2024-01">January 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">International Trade Liberalization and Domestic Institutional Reform: Effects of WTO Accession on Chinese Internal Migration Policy</title>
		<author>
			<persName><forename type="first">Yuan</forename><surname>Tian</surname></persName>
		</author>
		<idno type="DOI">10.1162/rest_a_01175</idno>
		<idno>doi:</idno>
		<ptr target="https://doi.org/10.1162/rest_a_01175" />
	</analytic>
	<monogr>
		<title level="j">The Review of Economics and Statistics</title>
		<imprint>
			<biblScope unit="volume">106</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="794" to="813" />
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">The Dynamics of Return Migration, Human Capital Accumulation, and Wage Assimilation</title>
		<author>
			<persName><forename type="first">Jérôme</forename><surname>Adda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Christian</forename><surname>Dustmann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Joseph-Simon</forename><surname>Görlach</surname></persName>
		</author>
		<idno type="DOI">10.1093/restud/rdac003</idno>
		<ptr target="https://doi.org/10.1093/restud/rdac003" />
	</analytic>
	<monogr>
		<title level="j">The Review of Economic Studies</title>
		<imprint>
			<biblScope unit="volume">89</biblScope>
			<biblScope unit="issue">6</biblScope>
			<biblScope unit="page" from="2841" to="2871" />
			<date type="published" when="2022-11">November 2022</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Modelling and predicting forced migration</title>
		<author>
			<persName><forename type="first">H</forename><surname>Qi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Bircan</surname></persName>
		</author>
		<idno type="DOI">10.1371/journal.pone.0284416</idno>
		<ptr target="https://doi.org/10.1371/journal.pone.0284416" />
	</analytic>
	<monogr>
		<title level="j">PLOS ONE</title>
		<imprint>
			<biblScope unit="volume">18</biblScope>
			<biblScope unit="issue">4</biblScope>
			<biblScope unit="page">e0284416</biblScope>
			<date type="published" when="2023">2023</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Smuggling of forced migrants to Europe: a matching model</title>
		<author>
			<persName><forename type="first">O</forename><surname>Charlot</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Naiditch</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Vranceanu</surname></persName>
		</author>
		<idno type="DOI">10.1007/s00148-024-00993-1</idno>
		<ptr target="https://doi.org/10.1007/s00148-024-00993-1" />
	</analytic>
	<monogr>
		<title level="j">J Popul Econ</title>
		<imprint>
			<biblScope unit="volume">37</biblScope>
			<biblScope unit="page">18</biblScope>
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<monogr>
		<author>
			<persName><forename type="first">Chujian</forename><surname>Shao</surname></persName>
		</author>
		<idno type="DOI">10.2139/ssrn.4807929</idno>
		<ptr target="https://ssrn.com/abstract=4807929orhttp://dx.doi.org/10.2139/ssrn.4807929" />
		<title level="m">International Trade, Immigration and Macroeconomic Dynamics</title>
				<imprint>
			<date type="published" when="2024-04-25">April 25, 2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">Impact of Weather Factors on Migration Intention Using Machine Learning Algorithms</title>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">O R</forename><surname>Aoga</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Bae</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Veljanoska</surname></persName>
		</author>
		<idno type="DOI">10.1007/s43069-023-00271-y</idno>
		<ptr target="https://doi.org/10.1007/s43069-023-00271-y" />
	</analytic>
	<monogr>
		<title level="j">Oper. Res. Forum</title>
		<imprint>
			<biblScope unit="volume">5</biblScope>
			<biblScope unit="page">8</biblScope>
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">Relationship between net migration and economic development of European countries: Empirical conclusions</title>
		<author>
			<persName><forename type="first">Serhii</forename><surname>Kozlovskyi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Tetiana</forename><surname>Kulinich</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Ihor</forename><surname>Vechirko</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Ruslan</forename><surname>Lavrov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Ivan</forename><surname>Zayukov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Hennadii</forename><surname>Mazur</surname></persName>
		</author>
		<idno type="DOI">10.21511/ppm.22(1).2024.48</idno>
	</analytic>
	<monogr>
		<title level="j">Problems and Perspectives in Management</title>
		<imprint>
			<biblScope unit="volume">22</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="605" to="618" />
			<date type="published" when="2024">2024</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
