{"id":376,"date":"2022-02-08T21:36:30","date_gmt":"2022-02-08T21:36:30","guid":{"rendered":"https:\/\/communitymodeling.org\/dev\/?p=376"},"modified":"2022-10-13T12:58:42","modified_gmt":"2022-10-13T16:58:42","slug":"generalized-additive-model-gam","status":"publish","type":"post","link":"https:\/\/communitymodeling.org\/dev\/generalized-additive-model-gam\/","title":{"rendered":"Generalized Additive Model (GAM)"},"content":{"rendered":"<div id=\"attachment_378\" style=\"width: 610px\" class=\"wp-caption alignright\"><img data-recalc-dims=\"1\" decoding=\"async\" aria-describedby=\"caption-attachment-378\" class=\"wp-image-378 size-fusion-600\" src=\"https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?resize=600%2C526&#038;ssl=1\" alt=\"\" width=\"600\" height=\"526\" srcset=\"https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?resize=200%2C175&amp;ssl=1 200w, https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?resize=300%2C263&amp;ssl=1 300w, https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?resize=400%2C350&amp;ssl=1 400w, https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?resize=600%2C526&amp;ssl=1 600w, https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?resize=768%2C673&amp;ssl=1 768w, https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?resize=800%2C701&amp;ssl=1 800w, https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?w=936&amp;ssl=1 936w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><p id=\"caption-attachment-378\" class=\"wp-caption-text\">Figure 1: Effect of using a linear model versus a Generalized Additive Model. Figure and caption from <a href=\"https:\/\/towardsdatascience.com\/generalised-additive-models-6dfbedf1350a\">https:\/\/towardsdatascience.com\/generalised-additive-models-6dfbedf1350a <\/a><\/p><\/div>\n<p><span style=\"font-weight: 400;\">The Generalized Additive Model (GAM), which was invented by Trevor Hastie and Robert Tibshirani in 1986 (Hastie and Tibshirani, 1986; 1990), is based on a simple conceptual idea:\u00a0 Relationships between the model predictions and the dependent variable follow smooth patterns that can be linear or nonlinear; and these smooth relationships generate the predictions by simply adding them up.\u00a0 Thus, a GAM is an additive modeling technique where the data are fit with smooth functions which, depending on the underlying patterns in the data, can be nonlinear.\u00a0 A GAM can capture common nonlinear patterns that a classic linear model cannot. These patterns range from \u201chockey sticks\u201d \u2013 which occur when you observe a sharp change in the response variable \u2013 to various types of \u201cmountain shaped\u201d curves (Figure 1). Moreover, with a GAM the smoothness of the predictor functions can be controlled to prevent overfitting, thus helping to deal with the tradeoff between bias and variance.\u00a0<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">The GAM is a powerful yet simple technique that has the interpretability advantages of a Generalized Linear Model (like linear regression) where the contribution of each independent variable to the prediction is clearly encoded. But a GAM has more flexibility because the relationship between independent and dependent variable is not assumed to be linear. A GAM is like Generalized Linear Model that is allowed to learn non-linear features.\u00a0 Moreover, it is not necessary to know a priori what type of predictive functions will be needed. These functions are automatically derived during model estimation. The GAM strikes a balance between the interpretable, yet biased, linear models like linear regression, and the extremely flexible, \u201cblack box\u201d learning algorithms like neural networks, i.e., a GAM provides an interpretable model for non-linear data.\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">References:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Hastie, T. and R. Tibshirani, (1986) Generalized Additive Models, Statistical Science, 1(3): 297-318.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Hastie, T. and R. Tibshirani (1990) Generalized Additive Models, New York: Chapman and Hall.<\/span><\/p>\n<div class=\"mceTemp\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Generalized Additive Model (GAM), which was invented by Trevor  [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":378,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18,19,15,17],"tags":[],"class_list":["post-376","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-airshed","category-estuarine","category-featured-models","category-watershed"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/communitymodeling.org\/dev\/wp-content\/uploads\/2022\/02\/GAM.png?fit=936%2C820&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/posts\/376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/comments?post=376"}],"version-history":[{"count":3,"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/posts\/376\/revisions"}],"predecessor-version":[{"id":380,"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/posts\/376\/revisions\/380"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/media\/378"}],"wp:attachment":[{"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/media?parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/categories?post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/communitymodeling.org\/dev\/wp-json\/wp\/v2\/tags?post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}