{"id":77,"date":"2025-01-11T10:18:56","date_gmt":"2025-01-11T10:18:56","guid":{"rendered":"https:\/\/www.aurum-argentum-ferrum.hu\/?p=77"},"modified":"2025-01-11T10:18:57","modified_gmt":"2025-01-11T10:18:57","slug":"predictive-models","status":"publish","type":"post","link":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/2025\/01\/11\/predictive-models\/","title":{"rendered":"Predictive models"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The creation of a <a href=\"https:\/\/www.aurum-argentum-ferrum.hu\/en\/2024\/11\/10\/contemporary-images-of-history\/#The_lack_of_middle_ground\" data-type=\"link\" data-id=\"https:\/\/www.aurum-argentum-ferrum.hu\/en\/2024\/11\/10\/contemporary-images-of-history\/#The_lack_of_middle_ground\">middle ground image of history<\/a> is actually a scientific task. This statement may be somewhat confusing if we start from the popular idea about the role and nature of science. Many people like to think of science as a kind of machine. It is fed the right amount of money and the right portion of human resources \u2013 using an ugly but apt expression: brainpower \u2013 and then produces the answers to our questions from these raw materials or solves our problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This idea bleeds from a thousand cuts, and a systematic explanation of all its flaws would go far beyond the scope of this site. However, I would like to correct it from one specific point of view, namely, what science really does. Hardly anyone can judge this better than John von Neumann who said that \u201cthe sciences do not try to explain, they hardly even try to interpret, they mainly make models\u201d. These models then provide answers that sometimes resolve controversial issues or, even more rarely, solve a problem. Above all, however, these models enable <a href=\"https:\/\/www.aurum-argentum-ferrum.hu\/2024\/11\/09\/the-meaning-of-history\/\" data-type=\"post\" data-id=\"50\">prediction<\/a>.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_88 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.aurum-argentum-ferrum.hu\/en\/2025\/01\/11\/predictive-models\/#The_construction_of_models\" >The construction of models<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.aurum-argentum-ferrum.hu\/en\/2025\/01\/11\/predictive-models\/#The_main_properties_of_models\" >The main properties of models<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.aurum-argentum-ferrum.hu\/en\/2025\/01\/11\/predictive-models\/#Modeling_human_history\" >Modeling human history<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_construction_of_models\"><\/span>The construction of models<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There is a well-developed method of model creation which is based on an ancient and originally unconscious trick. This method works by separating a part of reality from everything else and trying to replace it with some model we have invented. By model we mean an elaborate artificial system of rules that is intended to describe and map the events, relationships, and connections that occur in the given slice of reality. The basic property of a successful model is that it is capable of making correct predictions about the expected behavior of the given part of reality, and thus benefits its creator.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, a basic condition for successful modeling is always to create the conceived system of rules in accordance with our observations of the given world slice. This usually has three major steps. The first step, of course, is to find out what we are modeling and why. This orientation step is almost completely intuitive, and irrational factors such as hunches and intuitions play a large role in it. (Hence \u200b\u200bit completely contradicts the machine-like notion of science.) The second step: we choose exactly what model to use. It can be a textual description, a mathematical formula or a flowchart. It&#8217;s up to us to decide. The third and final step is to adapt this roughly known, given model to our observations and examine how similar are the results it gives to reality. This is called model fitting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Perhaps the easiest example of this process is when we try to approximate the values \u200b\u200bof repeated measurements using known function curves. For example, suppose that for some reason we are given the task of estimating the monthly average temperatures of the next year based on the same measurements from the past three years! If we are talking about a location in Hungary, then even without examining the data, we know that it is warmest in the second half of the summer, coldest in the second half of the winter, and we find transitional periods in between. We expect a kind of fluctuation in the monthly mean temperatures, and exactly one large wave within a year. We can translate this model into mathematical language and use the function called sine to describe the waveform. With this, we can check off the steps of orientation and selection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, the original textbook sine wave needs to be modified in order to be used for the estimation. We set a wave to run over a year, which is fine so far, but there are still quite a few unclear questions. First of all, the wave cannot fluctuate around zero (in degree Celsius), because frosty periods are very rare in Hungary overall, with the average temperature well above freezing. The entire curve needs to be shifted somewhat in a positive direction. In addition, we also need to set how large the wave should swing and exactly when it should reach its maximum. These three parameters are set during the third, fitting phase that is based on the known data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first figure below shows the monthly mean temperatures of the city of P\u00e9cs between the beginning of 2010 and the end of 2013 (this is the dotted line with x marks), supplemented by the sine curve that we determined based on the data of the first three years (this is the solid line). The diagram shows that the raw data indeed describe a wave, and the curve of the fitted model indeed runs very close to this wave. Moreover, we can also observe that the monthly mean temperatures of the fourth year \u2013 i.e. 2013 \u2013 are also very close to the sine curve, so our estimate was relatively accurate.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"321\" src=\"https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/temp_eng.png\" alt=\"\" class=\"wp-image-78\" srcset=\"https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/temp_eng.png 950w, https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/temp_eng-300x101.png 300w, https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/temp_eng-768x260.png 768w, https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/temp_eng-18x6.png 18w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><figcaption class=\"wp-element-caption\">Example of a relatively good model: monthly average temperatures and a sine wave<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">What happens if we try to estimate monthly precipitation values in a similar way instead of monthly mean temperatures? Will the same procedure be equally successful? The second diagram provides an illustration about this similarly to the previous one, also with data from P\u00e9cs in the same period. This second diagram shows a much more confusing picture than the first one as monthly precipitations change much more irregularly than the mean temperatures. The dotted line makes strange jumps instead of smooth waves, and it is even difficult to detect repetition in it. Many of us learned in school that the most precipitation falls in Hungary at the beginning of summer \u2013 the rains around the Med\u00e1rd name day on 8 June \u2013 and this is more or less visible in these data. In fact, the fitted model also shows it. Otherwise, the model curve runs quite far from the actual data points, despite the fact that it is the closest to them among all the sine waves with a one-year course. The 2013 estimate is also quite inaccurate, as we predicted about half of the expected precipitation in February and three times as much in July.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"321\" src=\"https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/prec_eng.png\" alt=\"\" class=\"wp-image-80\" srcset=\"https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/prec_eng.png 920w, https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/prec_eng-300x105.png 300w, https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/prec_eng-768x268.png 768w, https:\/\/www.aurum-argentum-ferrum.hu\/wp-content\/uploads\/2025\/01\/prec_eng-18x6.png 18w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><figcaption class=\"wp-element-caption\">Example of a relatively bad model: monthly precipitations and a sine wave<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_main_properties_of_models\"><\/span>The main properties of models<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">These small examples serve to show the main features of model creation. The first and perhaps most important of these is that the model is always much simpler than what it replaces. This simplicity allows human beings to use it. The monthly average temperatures of P\u00e9cs are influenced by many factors, for example the intensity of the incident solar radiation, the composition of the Earth&#8217;s atmosphere, the height of the city above sea level and the local climatic effect of the Mecsek mountains. In this task, we were able to eliminate all of this with the help of a simple mathematical formula. But as gratifying as this is, we can never forget that this formula is not the original reality itself, but only our tool for dealing with reality.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second important property is that the models created are never perfect. I wrote that the model of monthly average temperatures was successful, but the first figure shows that it is not completely accurate. Perfect accuracy cannot be expected, because that would mean that we are not actually talking about a model, but about direct reality. However, direct reality very rarely \u2013 or rather never \u2013 shows up in its entirety for the human senses and mind. Especially not when we simply want to solve a practical problem as easily and cheaply as possible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The third important feature that I would like to highlight is that the accuracy of the future forecast can usually be inferred from the accuracy of the model fitting. As can be seen in the two small examples, the curves fitted to three years of data yielded approximately similar accuracy in the fourth year as well. We cannot expect a model that appears weak during fitting to suddenly become effective during forecasting, nor is it typical for a well-fitted model to fail for no reason.<sup data-fn=\"7a3a1a64-913f-45cd-b826-ed6919135d36\" class=\"fn\"><a href=\"#7a3a1a64-913f-45cd-b826-ed6919135d36\" id=\"7a3a1a64-913f-45cd-b826-ed6919135d36-link\">1<\/a><\/sup><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In light of these observations, it is worth returning for a moment to the model of monthly precipitations (second diagram). I wrote that the sine wave is a relatively poor model for monthly precipitations. Based on its accuracy, it undoubtedly seems so. However, its quality is not determined only by this, since \u2013 as we have just clarified \u2013 every model has its flaws. It is undoubtedly possible to find a more accurate model for the same task, but it will almost certainly be much more complicated. It will be more difficult to understand and use, and more data will have to be collected. But if we wanted to predict the monthly precipitations in P\u00e9cs for next year using today&#8217;s most modern tools and all the knowledge of meteorology, it is not certain that we would get a much more accurate result than what is shown in the second figure, although this would demand many times the effort and cost. And it is practically certain that we would be unable to achieve the accuracy of the temperature estimate presented before. Admittedly, this is a difficult task, and even a \u201crelatively bad\u201d model deserves some respect.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Modeling_human_history\"><\/span>Modeling human history<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As mentioned before, the first main step in creating a model is orientation. In the examples presented, we recalled the characteristics of the Hungarian seasons and determined that the weather data series describe fluctuating, recurring phenomena. Then, in the second step, we selected the sine curve for modeling. Although this choice may seem obvious, we could have tried other functions \u2013 such as a triangular or a trapezoidal curve. The third main step, fitting, followed only after that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Although the task is much more difficult, the prediction of human history can be attempted in a similar way. The <a href=\"https:\/\/www.aurum-argentum-ferrum.hu\/2024\/11\/10\/contemporary-images-of-history\/\" data-type=\"post\" data-id=\"56\">images of history<\/a> used for the investigation, and the decision made between them, can be viewed as the orientation step of the model-building process. Several predictive models can belong to a certain image, similarly to the examples where we could have chosen several periodic mathematical functions to describe the weather variables. However, we can probably only arrive at a given model if we have chosen the appropriate image during the orientation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whatever model we eventually create will certainly be subject to the characteristics just outlined. First of all, it must be stated that the mass of data covering thousands of years of human history, its tangled myths, its scattered material memories, its authentic and unreliable historical sources, and the uneven and fragmentary knowledge we have gathered about them, refer to a reality that is impossible to frame and interpret without simplification. As a result, each way of looking at it can only lead to inaccurate descriptions, including, of course, the middle-of-the-road image. At the same time, it must not be forgotten that we can only trust the accuracy of the prediction to the extent that the accuracy of the fit allows it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The recipe book and linear images of history can only be used for prediction with disastrously poor results. They are much worse than the \u201crelatively bad\u201d sine curve fitted to monthly precipitations, because they do not actually consider accurate prediction as a primary goal. They do not want to utilize the knowledge that can be extracted from the past. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Accordingly, I must state that the bar for the middle ground approach is set very low. Even in the case of relatively large errors and poor fitting, its use represents an improvement, which is justified not only by the difficulty of the problem, but also by the fact that the alternatives are barely worth mentioning. Nevertheless, my goal is of course to present the most accurate model fitting I can. This way we end up with a more useful tool in practice, which is not only beneficial for the middle ground image, but also, I hope, draws attention to the importance and value of modeling in general.<\/p>\n\n\n<ol class=\"wp-block-footnotes\"><li id=\"7a3a1a64-913f-45cd-b826-ed6919135d36\">Today, there are computer modeling techniques where this property is sometimes reversed, and a more accurate fit \u2013 after crossing a threshold \u2013 leads to a less accurate result. This is possible because we can program complex mathematical models into computers, and these are able to fit the known pattern too precisely. During the forecasting process, deviations from the known data arise, and computer models that are too accurately fitted react too sensitively to these deviations. Programmers have to deal with this phenomenon, for example, by simplifying the formulas or stopping the fitting process in time (before reaching the threshold in question). However, this book will deal with manual and conceptual modeling, so we do not need to worry about this. <a href=\"#7a3a1a64-913f-45cd-b826-ed6919135d36-link\" aria-label=\"Jump to footnote reference 1\">\u21a9\ufe0e<\/a><\/li><\/ol>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The creation of a middle ground image of history is actually a scientific task. This statement may be somewhat confusing if we start from the popular idea about the role and nature of science. Many people like to think of science as a kind of machine. It is fed the right amount of money and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"[{\"content\":\"Today, there are computer modeling techniques where this property is sometimes reversed, and a more accurate fit \u2013 after crossing a threshold \u2013 leads to a less accurate result. This is possible because we can program complex mathematical models into computers, and these are able to fit the known pattern too precisely. During the forecasting process, deviations from the known data arise, and computer models that are too accurately fitted react too sensitively to these deviations. Programmers have to deal with this phenomenon, for example, by simplifying the formulas or stopping the fitting process in time (before reaching the threshold in question). However, this book will deal with manual and conceptual modeling, so we do not need to worry about this.\",\"id\":\"7a3a1a64-913f-45cd-b826-ed6919135d36\"}]"},"categories":[1],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":3,"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":84,"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/posts\/77\/revisions\/84"}],"wp:attachment":[{"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/media?parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/categories?post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aurum-argentum-ferrum.hu\/en\/wp-json\/wp\/v2\/tags?post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}