{"id":980,"date":"2023-07-28T02:41:13","date_gmt":"2023-07-28T02:41:13","guid":{"rendered":"https:\/\/statorials.org\/de\/smape-python\/"},"modified":"2023-07-28T02:41:13","modified_gmt":"2023-07-28T02:41:13","slug":"smape-python","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/smape-python\/","title":{"rendered":"So berechnen sie smape in python"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><strong>Der symmetrische mittlere absolute prozentuale Fehler (SMAPE)<\/strong> wird verwendet, um die Vorhersagegenauigkeit von Modellen zu messen. Es wird wie folgt berechnet:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>SMAPE<\/strong> = (1\/n) * \u03a3(|Prognose \u2013 Ist| \/ ((|Ist| + |Prognose|)\/2) * 100<\/span><\/p>\n<p> <span style=\"color: #000000;\">Gold:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>\u03a3<\/strong> \u2013 ein Symbol, das \u201eSumme\u201c bedeutet<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>n<\/strong> \u2013 Stichprobengr\u00f6\u00dfe<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>real<\/strong> \u2013 der tats\u00e4chliche Wert der Daten<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>Prognose<\/strong> \u2013 der erwartete Wert der Daten<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">In diesem Tutorial wird erkl\u00e4rt, wie man SMAPE in Python berechnet.<\/span><\/span><\/p>\n<h3> <strong>So berechnen Sie SMAPE in Python<\/strong><\/h3>\n<p> <span style=\"color: #000000;\">Es gibt keine integrierte Python-Funktion zur Berechnung von SMAPE, aber wir k\u00f6nnen eine einfache Funktion daf\u00fcr erstellen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import <span style=\"color: #000000;\">numpy<\/span> as <span style=\"color: #000000;\">np<\/span>\n\n<span style=\"color: #000000;\"><span style=\"color: #008000;\">def<\/span> smape( <span style=\"color: #3366ff;\">a<\/span> , <span style=\"color: #3366ff;\">f<\/span> ):\n    <span style=\"color: #008000;\">return<\/span> 1\/ <span style=\"color: #3366ff;\">len<\/span> (a) * np. <span style=\"color: #3366ff;\">sum<\/span> (2 * np. <span style=\"color: #3366ff;\">abs<\/span> (fa) \/ (np. <span style=\"color: #3366ff;\">abs<\/span> (a) + np. <span style=\"color: #3366ff;\">abs<\/span> (f))*100)\n<\/span><\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Mit dieser Funktion k\u00f6nnen wir dann den SMAPE f\u00fcr zwei Tabellen berechnen: eine, die die tats\u00e4chlichen Datenwerte enth\u00e4lt, und eine, die die vorhergesagten Datenwerte enth\u00e4lt.<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#define arrays of actual and forecasted data values<\/span>\nactual = np.array([12, 13, 14, 15, 15,22, 27])\nforecast = np.array([11, 13, 14, 14, 15, 16, 18])\n\n<span style=\"color: #008080;\">#calculate SMAPE<\/span>\nsmape(actual, forecast)\n\n12.45302\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Aus den Ergebnissen k\u00f6nnen wir ersehen, dass der durchschnittliche symmetrische absolute prozentuale Fehler f\u00fcr dieses Modell <strong>12,45302 %<\/strong> betr\u00e4gt.<\/span><\/p>\n<h3> <strong><span style=\"color: #000000;\">Zus\u00e4tzliche Ressourcen<\/span><\/strong><\/h3>\n<p> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Symmetric_mean_absolute_percentage_error\" target=\"_blank\" rel=\"noopener noreferrer\">Wikipedia-Eintrag f\u00fcr SMAPE<\/a><br \/> <a href=\"https:\/\/robjhyndman.com\/hyndsight\/smape\/\" target=\"_blank\" rel=\"noopener noreferrer\">Rob J. Hyndmans Gedanken zu SMAPE<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/python-karte\/\" target=\"_blank\" rel=\"noopener noreferrer\">So berechnen Sie MAPE in Python<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/r-karte\/\" target=\"_blank\" rel=\"noopener noreferrer\">So berechnen Sie MAPE in R<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/excel-karte\/\" target=\"_blank\" rel=\"noopener noreferrer\">So berechnen Sie MAPE in Excel<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Der symmetrische mittlere absolute prozentuale Fehler (SMAPE) wird verwendet, um die Vorhersagegenauigkeit von Modellen zu messen. Es wird wie folgt berechnet: SMAPE = (1\/n) * \u03a3(|Prognose \u2013 Ist| \/ ((|Ist| + |Prognose|)\/2) * 100 Gold: \u03a3 \u2013 ein Symbol, das \u201eSumme\u201c bedeutet n \u2013 Stichprobengr\u00f6\u00dfe real \u2013 der tats\u00e4chliche Wert der Daten Prognose \u2013 der [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>So berechnen Sie SMAPE in Python - Statorials<\/title>\n<meta name=\"description\" content=\"Eine einfache Erkl\u00e4rung, wie SMAPE in Python berechnet wird, anhand eines Beispiels.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/de\/smape-python\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So berechnen Sie SMAPE in Python - Statorials\" \/>\n<meta property=\"og:description\" content=\"Eine einfache Erkl\u00e4rung, wie SMAPE in Python berechnet wird, anhand eines Beispiels.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/smape-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-28T02:41:13+00:00\" \/>\n<meta name=\"author\" content=\"Dr. Benjamin Anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr. Benjamin Anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/de\/smape-python\/\",\"url\":\"https:\/\/statorials.org\/de\/smape-python\/\",\"name\":\"So berechnen Sie SMAPE in Python - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-28T02:41:13+00:00\",\"dateModified\":\"2023-07-28T02:41:13+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"Eine einfache Erkl\u00e4rung, wie SMAPE in Python berechnet wird, anhand eines Beispiels.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/smape-python\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/smape-python\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/smape-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So berechnen sie smape in python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/de\/#website\",\"url\":\"https:\/\/statorials.org\/de\/\",\"name\":\"Statorials\",\"description\":\"Ihr Leitfaden f\u00fcr statistische Kompetenz !\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de-DE\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\",\"name\":\"Dr. Benjamin Anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. Benjamin Anderson\"},\"description\":\"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen\",\"sameAs\":[\"https:\/\/statorials.org\/de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"So berechnen Sie SMAPE in Python - Statorials","description":"Eine einfache Erkl\u00e4rung, wie SMAPE in Python berechnet wird, anhand eines Beispiels.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/de\/smape-python\/","og_locale":"de_DE","og_type":"article","og_title":"So berechnen Sie SMAPE in Python - Statorials","og_description":"Eine einfache Erkl\u00e4rung, wie SMAPE in Python berechnet wird, anhand eines Beispiels.","og_url":"https:\/\/statorials.org\/de\/smape-python\/","og_site_name":"Statorials","article_published_time":"2023-07-28T02:41:13+00:00","author":"Dr. Benjamin Anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr. Benjamin Anderson","Gesch\u00e4tzte Lesezeit":"1 Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/de\/smape-python\/","url":"https:\/\/statorials.org\/de\/smape-python\/","name":"So berechnen Sie SMAPE in Python - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-28T02:41:13+00:00","dateModified":"2023-07-28T02:41:13+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"Eine einfache Erkl\u00e4rung, wie SMAPE in Python berechnet wird, anhand eines Beispiels.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/smape-python\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/smape-python\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/smape-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So berechnen sie smape in python"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/de\/#website","url":"https:\/\/statorials.org\/de\/","name":"Statorials","description":"Ihr Leitfaden f\u00fcr statistische Kompetenz !","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de-DE"},{"@type":"Person","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0","name":"Dr. Benjamin Anderson","image":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","caption":"Dr. Benjamin Anderson"},"description":"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen","sameAs":["https:\/\/statorials.org\/de"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/980"}],"collection":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/comments?post=980"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/980\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}