{"id":7147,"date":"2026-09-23T10:55:52","date_gmt":"2026-09-23T15:55:52","guid":{"rendered":"https:\/\/ykim.synology.me\/wordpress\/non-linear-data-modeling-basics-7147\/"},"modified":"2026-09-23T10:58:38","modified_gmt":"2026-09-23T15:58:38","slug":"non-linear-data-modeling-basics","status":"publish","type":"post","link":"https:\/\/ykim.synology.me\/wordpress\/non-linear-data-modeling-basics-7147\/","title":{"rendered":"Non-Linear Data Modeling Basics"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/github.com\/yBarn1\/Images\/blob\/main\/halloween\/reeses-peanut-butter-pumpkins-candy.jpg?raw=true\" alt=\"\" style=\"width:auto;height:500px\"\/><\/figure>\n\n\n<style>.kt-tabs-id7147_b1ff72-83 > .kt-tabs-content-wrap > .wp-block-kadence-tab{border-top:3px solid #0a6689;border-right:0px solid #0a6689;border-bottom:0px solid #0a6689;border-left:0px solid #0a6689;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);background:var(--global-palette9, #ffffff);}.wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-title-list li{margin-top:0px;margin-right:8px;margin-bottom:0px;margin-left:0px;}.wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-title-list li:last-child{margin-right:0px;}.wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-title-list li .kt-tab-title, .wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-content-wrap > .kt-tabs-accordion-title .kt-tab-title{line-height:1.4em;font-weight:regular;font-style:normal;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;padding-top:8px;padding-right:20px;padding-bottom:8px;padding-left:20px;border-color:var(--global-palette7, #eeeeee);color:var(--global-palette4, #2D3748);background:var(--global-palette7, #eeeeee);}.wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-content-wrap > .kt-tabs-accordion-title .kt-tab-title{margin-top:0px;margin-right:8px;margin-bottom:0px;margin-left:0px;}.wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-title-list li .kt-tab-title:hover, .wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-content-wrap > .kt-tabs-accordion-title .kt-tab-title:hover{border-color:var(--global-palette7, #eeeeee);color:var(--global-palette3, #1A202C);background:var(--global-palette8, #F7FAFC);}.wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-title-list li.kt-tab-title-active .kt-tab-title, .wp-block-kadence-tabs .kt-tabs-id7147_b1ff72-83 > .kt-tabs-content-wrap > .kt-tabs-accordion-title.kt-tab-title-active .kt-tab-title{border-color:var(--global-palette7, #eeeeee);color:#ffffff;background:#0a6689;}@media all and (max-width: 1024px){.kt-tabs-id7147_b1ff72-83 > .kt-tabs-content-wrap > .wp-block-kadence-tab{border-top:3px solid #0a6689;border-right:0px solid #0a6689;border-bottom:0px solid #0a6689;border-left:0px solid #0a6689;}}@media all and (max-width: 767px){.kt-tabs-id7147_b1ff72-83 > .kt-tabs-content-wrap > .wp-block-kadence-tab{border-top:3px solid #0a6689;border-right:0px solid #0a6689;border-bottom:0px solid #0a6689;border-left:0px solid #0a6689;}}<\/style>\n<div class=\"wp-block-kadence-tabs alignnone\"><div class=\"kt-tabs-wrap kt-tabs-id7147_b1ff72-83 kt-tabs-has-2-tabs kt-active-tab-2 kt-tabs-layout-tabs kt-tabs-tablet-layout-inherit kt-tabs-mobile-layout-inherit kt-tab-alignment-left \"><ul class=\"kt-tabs-title-list\"><li id=\"tab-english\" class=\"kt-title-item kt-title-item-1 kt-tabs-svg-show-always kt-tabs-icon-side-right kt-tab-title-inactive\"><a href=\"#tab-english\" data-tab=\"1\" class=\"kt-tab-title kt-tab-title-1 \"><span class=\"kt-title-text\">English<\/span><\/a><\/li><li id=\"tab-korean\" class=\"kt-title-item kt-title-item-2 kt-tabs-svg-show-always kt-tabs-icon-side-right kt-tab-title-active\"><a href=\"#tab-korean\" data-tab=\"2\" class=\"kt-tab-title kt-tab-title-2 \"><span class=\"kt-title-text\">Korean<\/span><\/a><\/li><\/ul><div class=\"kt-tabs-content-wrap\">\n<div class=\"wp-block-kadence-tab kt-tab-inner-content kt-inner-tab-1 kt-inner-tab7147_235828-49\"><div class=\"kt-tab-inner-content-inner\"><p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"Models\/Modeling-Strategies\/Non-Linear-Data-Modeling-Basics\/non-linear-data-modeling-basics.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">Non-Linear Data Modeling Basics<\/h1><a id=\"user-content-non-linear-data-modeling-basics\" class=\"anchor\" aria-label=\"Permalink: Non-Linear Data Modeling Basics\" href=\"#non-linear-data-modeling-basics\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Version 15 | Created: 2026-09-23 | Updated: 2026-11-07 13:46 UTC<\/p>\n<ul dir=\"auto\">\n<li><a href=\"#1-purpose\">1. Purpose<\/a><\/li>\n<li><a href=\"#2-summary\">2. Summary<\/a><\/li>\n<li><a href=\"#3-taxonomy-and-its-hierarchy\">3. Taxonomy and its Hierarchy<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#31-comparison\">3.1 Comparison<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#4-principle\">4. Principle<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#41-linear-model-mechanics-and-limits\">4.1 Linear Model Mechanics and Limits<\/a><\/li>\n<li><a href=\"#42-nonlinear-features-in-a-linear-model\">4.2 Nonlinear Features in a Linear Model<\/a><\/li>\n<li><a href=\"#43-comparison-of-the-two-models\">4.3 Comparison of the Two Models<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#5-application\">5. Application<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#51-feature-intensive-model\">5.1 Feature-Intensive Model<\/a><\/li>\n<li><a href=\"#52-algorithm-intensive-model\">5.2 Algorithm-Intensive Model<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#appendix-a-terminology\">Appendix A. Terminology<\/a><\/li>\n<li><a href=\"#appendix-b-python-implementation\">Appendix B. Python Implementation<\/a><\/li>\n<li><a href=\"#appendix-c-two-views-of-linearity\">Appendix C. Two Views of Linearity<\/a><\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">1. Purpose<\/h2><a id=\"user-content-1-purpose\" class=\"anchor\" aria-label=\"Permalink: 1. Purpose\" href=\"#1-purpose\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li><strong>Problem Statement<\/strong>: The linearity and the non-linearity of mathematical statistics and of a machine learning model, and the linear property and the non-linear property of the data, are not told apart, and the modeling strategy is confused as a result.<\/li>\n<li><strong>Goal<\/strong>: On the ground of linearity as mathematical statistics defines it, compare the modeling strategies that handle the non-linear data properties of machine learning, feature interaction included.<\/li>\n<li><strong>Non-Goal<\/strong>: The detail of each model is not covered.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">2. Summary<\/h2><a id=\"user-content-2-summary\" class=\"anchor\" aria-label=\"Permalink: 2. Summary\" href=\"#2-summary\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The linearity of a model and the non-linear property of the data are two different things. Linearity is being first order in the weight <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta$<\/math-renderer>, and the non-linear property is the curvature of the relation between <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$y$<\/math-renderer> together with the interaction between variables. A non-linear transform of the input therefore leaves the structure that is first order in <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta$<\/math-renderer> in place, and least squares and the solutions of Ridge, Lasso and PLS are used as they are (section 4.2).<\/p>\n<p dir=\"auto\">Who handles the non-linear property of the data splits the two modeling strategies.<\/p>\n<ul dir=\"auto\">\n<li>\n<strong>Feature-Intensive Model<\/strong>: a linear model with non-linear features (the feature engineering approach). \"Keep the model simple (linear) and make the data (feature) complex.\" A linear model fed with columns such as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x^2$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1 x_2$<\/math-renderer> that the analyst builds.<\/li>\n<li>\n<strong>Algorithm-Intensive Model<\/strong>: a non-linear model with linear features (the algorithm approach). \"Leave the data (feature) as it is (linear, original) and make the model complex (non-linear).\" An approach where the original columns go in unchanged and a tree ensemble or a neural network learns the shape inside.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Taxonomy and its Hierarchy<\/h2><a id=\"user-content-3-taxonomy-and-its-hierarchy\" class=\"anchor\" aria-label=\"Permalink: 3. Taxonomy and its Hierarchy\" href=\"#3-taxonomy-and-its-hierarchy\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Nonlinearity splits on three axes: the linearity of the model, the linearity of the feature, and the value you read out. The Feature-Intensive Model puts non-linear features into a linear model and reads the coefficient of each term, and the Algorithm-Intensive Model puts linear features into a non-linear model and reads variable importance. <a href=\"#fig-1\">Fig 1<\/a> is those three axes and the methods on each side.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"Nonlinearity in a model\n|\n+-- Feature-Intensive Model ........................ linear model + non-linear feature\n|     +-- Power term: x^2, x^3 ..................... curvature of one variable\n|     +-- Interaction term: x1 * x2 ................ joint effect of two variables\n|     +-- Basis expansion: spline, RBF ............. local shape without a global degree\n|\n+-- Algorithm-Intensive Model ...................... non-linear model + linear feature\n      +-- Tree ensemble ............................ split points cut the input space\n      +-- Neural network ........................... activation function bends the response\n      +-- Kernel method ............................ inner product in an implicit feature space\"><pre lang=\"text\" class=\"notranslate\"><code>Nonlinearity in a model\n|\n+-- Feature-Intensive Model ........................ linear model + non-linear feature\n|     +-- Power term: x^2, x^3 ..................... curvature of one variable\n|     +-- Interaction term: x1 * x2 ................ joint effect of two variables\n|     +-- Basis expansion: spline, RBF ............. local shape without a global degree\n|\n+-- Algorithm-Intensive Model ...................... non-linear model + linear feature\n      +-- Tree ensemble ............................ split points cut the input space\n      +-- Neural network ........................... activation function bends the response\n      +-- Kernel method ............................ inner product in an implicit feature space\n<\/code><\/pre><\/div>\n<p dir=\"auto\"><a id=\"user-content-fig-1\"><\/a>\nFig 1. The composition of the two models and the methods on each side<\/p>\n<p dir=\"auto\">The hierarchy of the two models descends by the strength of the assumption. The Feature-Intensive Model writes the shape of the nonlinearity down as terms in advance, and in return reads the coefficient of each term directly. The Algorithm-Intensive Model leaves the shape unwritten, and in return cannot read from a single coefficient which range of which variable moved the prediction.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1 Comparison<\/h3><a id=\"user-content-31-comparison\" class=\"anchor\" aria-label=\"Permalink: 3.1 Comparison\" href=\"#31-comparison\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Table 1. Where each model sits on the three axes<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"center\">Model<\/th>\n<th align=\"center\">Linearity<\/th>\n<th align=\"center\">Feature<\/th>\n<th align=\"center\">What you read out<\/th>\n<th align=\"center\">Breaks when<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\">Feature-Intensive Model<\/td>\n<td align=\"center\">Linear<\/td>\n<td align=\"center\">Non-linear (transformed columns)<\/td>\n<td align=\"center\">Coefficient <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta$<\/math-renderer> of each term<\/td>\n<td align=\"center\">The shape of the nonlinearity is unknown in advance<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">Algorithm-Intensive Model<\/td>\n<td align=\"center\">Non-linear<\/td>\n<td align=\"center\">Linear (original columns)<\/td>\n<td align=\"center\">Variable importance<\/td>\n<td align=\"center\">The extrapolation range and a small sample<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">The Feature-Intensive Model has the analyst decide which terms to build, so there has to be ground for guessing which curve and which interaction the data holds. The Algorithm-Intensive Model fits without that ground, but its accuracy drops in the extrapolation range and on a small sample (section 5.2).<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Principle<\/h2><a id=\"user-content-4-principle\" class=\"anchor\" aria-label=\"Permalink: 4. Principle\" href=\"#4-principle\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.1 Linear Model Mechanics and Limits<\/h3><a id=\"user-content-41-linear-model-mechanics-and-limits\" class=\"anchor\" aria-label=\"Permalink: 4.1 Linear Model Mechanics and Limits\" href=\"#41-linear-model-mechanics-and-limits\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Models such as linear regression, Ridge, Lasso and PLS (Partial Least Squares) assume the relation between the input variable <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$X$<\/math-renderer> and the target variable <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$Y$<\/math-renderer> to be a linear combination.<\/p>\n<math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$$y = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\dots + \\beta_p x_p + \\epsilon \\hspace{19em} (1)$$<\/math-renderer>\n<ul dir=\"auto\">\n<li>Advantage\n<ul dir=\"auto\">\n<li>The model is simple, so the risk of overfitting is small and the parameters converge very fast.<\/li>\n<li>The coefficient <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta_i$<\/math-renderer> tells directly how much each variable contributed to the change of the target.<\/li>\n<\/ul>\n<\/li>\n<li>Limit\n<ul dir=\"auto\">\n<li>When the data holds a non-linear relation or an interaction between variables, a decision boundary shaped as a first-order plane cannot fit that relation, and underfitting follows.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.2 Nonlinear Features in a Linear Model<\/h3><a id=\"user-content-42-nonlinear-features-in-a-linear-model\" class=\"anchor\" aria-label=\"Permalink: 4.2 Nonlinear Features in a Linear Model\" href=\"#42-nonlinear-features-in-a-linear-model\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">In a linear model, the mathematical definition of linearity is being first order in the weight parameter <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta$<\/math-renderer>, the target of the optimization, rather than first order in the input variable <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x$<\/math-renderer>.<\/p>\n<p dir=\"auto\">An expansion of the input space by a non-linear transform therefore keeps the structure that is first order in <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta$<\/math-renderer>, and the closed-form solution of the linear model is used as it is.<\/p>\n<p dir=\"auto\">With the original input data <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_2$<\/math-renderer>, non-linear power terms are added and the input is mapped onto a new basis.<\/p>\n<math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$$\\phi(x_1, x_2) = [1, x_1, x_2, x_1^2, x_2^2, x_1 x_2]^T \\hspace{19em} (2)$$<\/math-renderer>\n<p dir=\"auto\">The linear model is then fitted in this expanded space.<\/p>\n<math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$$y = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\beta_3 x_1^2 + \\beta_4 x_2^2 + \\beta_5 (x_1 x_2) \\hspace{14em} (3)$$<\/math-renderer>\n<ul dir=\"auto\">\n<li>On the variable <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x$<\/math-renderer>: a non-linear model (a curve and an interaction surface are expressible)<\/li>\n<li>On the weight <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta$<\/math-renderer>: a linear model (least squares, Ridge\/Lasso regularization and the other existing algorithms apply unchanged)<\/li>\n<\/ul>\n<p dir=\"auto\">The interaction term <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1 x_2$<\/math-renderer> is non-linear in <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x$<\/math-renderer>. It is a product of two inputs, so it fails <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$f(a x + b z) = a f(x) + b f(z)$<\/math-renderer>, and the response surface turns from a plane into a saddle.<\/p>\n<p dir=\"auto\">The model of equation (3) carries the intercept <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta_0$<\/math-renderer>, so by the definition of linear algebra it is an affine transform, and the linearity used in engineering covers that affine case as well (<a href=\"#appendix-c-two-views-of-linearity\">Appendix C<\/a>).<\/p>\n<p dir=\"auto\">The coefficients of equation (3) are read the same way as the coefficients before the expansion. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta_3$<\/math-renderer> is the curvature of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta_5$<\/math-renderer> is the contribution of the two variables moving together, and least squares fixes both.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.3 Comparison of the Two Models<\/h3><a id=\"user-content-43-comparison-of-the-two-models\" class=\"anchor\" aria-label=\"Permalink: 4.3 Comparison of the Two Models\" href=\"#43-comparison-of-the-two-models\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The two models differ in where the nonlinearity is held, in whether a coefficient can be read out, and in how the work grows with the variable count.<\/p>\n<p dir=\"auto\">Table 2. The two models compared on three criteria<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"center\">Criterion<\/th>\n<th align=\"center\">Feature-Intensive Model<\/th>\n<th align=\"center\">Algorithm-Intensive Model<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\">Core mechanism<\/td>\n<td align=\"center\">Transform terms such as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1^2$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1 x_2$<\/math-renderer>, added explicitly<\/td>\n<td align=\"center\">Automatic search by tree splits and activation functions<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">Explainability (XAI)<\/td>\n<td align=\"center\">Very high. Coefficient <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$\\beta$<\/math-renderer> of each term, read directly<\/td>\n<td align=\"center\">Moderate to low. SHAP, variable importance and other added tools needed<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">Computational efficiency<\/td>\n<td align=\"center\">Good while the variables are few. Columns growing fast in high dimension<\/td>\n<td align=\"center\">Optimized for a large dataset<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. Application<\/h2><a id=\"user-content-5-application\" class=\"anchor\" aria-label=\"Permalink: 5. Application\" href=\"#5-application\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.1 Feature-Intensive Model<\/h3><a id=\"user-content-51-feature-intensive-model\" class=\"anchor\" aria-label=\"Permalink: 5.1 Feature-Intensive Model\" href=\"#51-feature-intensive-model\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><code>Ridge<\/code>, <code>Lasso<\/code> and <code>PLSRegression<\/code> do the fitting, and the three methods of <a href=\"#fig-1\">Fig 1<\/a> decide in front of them which columns go in.<\/p>\n<ul dir=\"auto\">\n<li>\n<strong>Power term<\/strong>: the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x^2$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x^3$<\/math-renderer> columns of one variable. <code>PolynomialFeatures(degree=3)<\/code> builds every term up to the third degree, and the ones holding a single variable are the power terms.<\/li>\n<li>\n<strong>Interaction term<\/strong>: the product column <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1 x_2$<\/math-renderer> of two variables. When only the product is wanted, <code>PolynomialFeatures(interaction_only=True)<\/code> drops the power terms.<\/li>\n<li>\n<strong>Basis expansion<\/strong>: a spline, which joins a polynomial per interval at the points that divide them, and RBF, which builds columns from the distance to a center. <code>n_knots<\/code> of <code>SplineTransformer<\/code> sets the interval count, and the curve of one interval changes without raising the degree.<\/li>\n<\/ul>\n<p dir=\"auto\">The three methods share the conditions below.<\/p>\n<ul dir=\"auto\">\n<li><strong>Assumption<\/strong>: The shape of the nonlinearity to be held can be written as terms in advance.<\/li>\n<li><strong>Settings<\/strong>: The regularization strength <code>alpha<\/code>. The expanded columns differ in scale, so Ridge or Lasso bounds the coefficients.<\/li>\n<li><strong>Breaks when<\/strong>: The true relation lies outside the terms that were written down, and underfitting remains after the expansion. Raising the degree to catch it grows the column count fast, the overfitting risk rises sharply and the coefficients become unstable.<\/li>\n<li><strong>Where you meet it<\/strong>: A place where the data is small, physical ground, process variables for one, lets you guess the curvature and the interaction, and interpretation and root cause come before prediction accuracy.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.2 Algorithm-Intensive Model<\/h3><a id=\"user-content-52-algorithm-intensive-model\" class=\"anchor\" aria-label=\"Permalink: 5.2 Algorithm-Intensive Model\" href=\"#52-algorithm-intensive-model\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The original columns go in unchanged, and the three methods of <a href=\"#fig-1\">Fig 1<\/a> build the nonlinearity inside the model.<\/p>\n<ul dir=\"auto\">\n<li><strong>Tree ensemble<\/strong>: it cuts the input space by splits and fits a constant per range. <code>RandomForestRegressor<\/code>, <code>HistGradientBoostingRegressor<\/code>, XGBoost and LightGBM belong here.<\/li>\n<li><strong>Neural network<\/strong>: the activation function bends the response at every layer and makes a continuous surface. <code>MLPRegressor<\/code> is the implementation.<\/li>\n<li><strong>Kernel method<\/strong>: instead of growing the columns it stands in for the expanded space through the inner product between samples. <code>SVR(kernel='rbf')<\/code> and <code>KernelRidge<\/code> are the implementations.<\/li>\n<\/ul>\n<p dir=\"auto\">The three methods share the conditions below.<\/p>\n<ul dir=\"auto\">\n<li><strong>Assumption<\/strong>: The samples are many enough to fix the split positions and the weights. A tree ensemble fits a constant per range, so the sample count inside a range fixes the accuracy.<\/li>\n<li><strong>Settings<\/strong>: <code>max_depth<\/code> and the learning rate of the tree ensemble, the layer count and the activation function of the neural network, <code>gamma<\/code> and <code>C<\/code> of the kernel method.<\/li>\n<li><strong>Breaks when<\/strong>: For an input outside the train data a tree ensemble returns the constant of the last range and cannot extrapolate. A neural network overfits when the samples are few, a risk contained by hyperparameter tuning, and the work of a kernel method grows with the square of the sample count when they are many.<\/li>\n<li><strong>Where you meet it<\/strong>: A place where the data is sufficient, the variables are too many to write the terms one by one, and the prediction accuracy comes before reading the coefficients.<\/li>\n<\/ul>\n<p dir=\"auto\">A run comparing the accuracy of the two models on the same data is in <a href=\"#appendix-b-python-implementation\">Appendix B<\/a>.<\/p>\n<hr>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix A. Terminology<\/h2><a id=\"user-content-appendix-a-terminology\" class=\"anchor\" aria-label=\"Permalink: Appendix A. Terminology\" href=\"#appendix-a-terminology\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li>\n<strong>affine transform<\/strong>: A linear transform with a constant shift added. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$y = ax + b$<\/math-renderer> with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$b \\neq 0$<\/math-renderer> belongs here.<\/li>\n<li>\n<strong>basis expansion<\/strong>: A transform that turns the input variables into the values of predetermined functions and so grows the columns. Power terms, splines and RBF belong here.<\/li>\n<li>\n<strong>closed-form solution<\/strong>: A solution obtained from one expression without iteration. The normal equation of least squares is an example.<\/li>\n<li>\n<strong>interaction<\/strong>: A contribution that appears only when two variables move together. It is held by the product column <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_1 x_2$<\/math-renderer>.<\/li>\n<li>\n<strong>kernel method<\/strong>: A method that holds a non-linear relation through the inner product between two samples instead of transforming the input itself.<\/li>\n<li>\n<strong>RBF<\/strong>: Radial basis function. A basis function whose value is fixed by the distance from a center.<\/li>\n<li>\n<strong>SHAP<\/strong>: SHapley Additive exPlanations. An XAI method that splits the contribution of each variable to one prediction as a Shapley value.<\/li>\n<li>\n<strong>spline<\/strong>: A function that joins low-degree polynomials at the points that divide the intervals.<\/li>\n<li>\n<strong>tree ensemble<\/strong>: A model that collects the predictions of several decision trees. Random Forest and gradient boosting belong here.<\/li>\n<li>\n<strong>underfitting<\/strong>: A state where the model lacks the capacity to express the relation and the error is large even on the training data.<\/li>\n<li>\n<strong>XAI<\/strong>: Explainable AI. A method that makes the ground of a prediction readable by a person.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix B. Python Implementation<\/h2><a id=\"user-content-appendix-b-python-implementation\" class=\"anchor\" aria-label=\"Permalink: Appendix B. Python Implementation\" href=\"#appendix-b-python-implementation\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The two models are applied to the same data and their accuracy compared.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import numpy as np\nfrom sklearn.ensemble import HistGradientBoostingRegressor\nfrom sklearn.linear_model import Ridge\nfrom sklearn.metrics import r2_score\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.preprocessing import PolynomialFeatures\n\n# --- synthetic data with one curvature term and one interaction term ---\nrng = np.random.default_rng(0)\nn_samples = 400\nx1 = rng.uniform(-3, 3, size=n_samples)\nx2 = rng.uniform(-3, 3, size=n_samples)\ny = 3 + 2 * x1 - x2 + 1.5 * x1 ** 2 + 0.8 * x1 * x2 + rng.normal(0, 1.0, size=n_samples)\n\nX = np.column_stack([x1, x2])\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=0)\n\n# the baseline: a linear model on the original columns\nplain = Ridge(alpha=1.0).fit(X_train, y_train)\n\n# the feature-intensive model: the analyst adds the power and interaction columns\nfeature_intensive = make_pipeline(\n    PolynomialFeatures(degree=2, include_bias=False), Ridge(alpha=1.0)\n).fit(X_train, y_train)\n\n# the algorithm-intensive model: the algorithm splits the original columns on its own\nalgorithm_intensive = HistGradientBoostingRegressor(max_depth=3, random_state=0).fit(X_train, y_train)\n\nfor name, model in ((&quot;linear model, original columns&quot;, plain),\n                    (&quot;feature-intensive: Ridge on degree-2 columns&quot;, feature_intensive),\n                    (&quot;algorithm-intensive: HistGradientBoostingRegressor&quot;, algorithm_intensive)):\n    print(f&quot;{name:50s} R2 = {r2_score(y_test, model.predict(X_test)):.4f}&quot;)\n\n# the coefficients the feature-intensive model reads out, one per term of equation (3)\nterm_names = feature_intensive[0].get_feature_names_out([&quot;x1&quot;, &quot;x2&quot;])\nprint(&quot;feature-intensive coefficients:&quot;,\n      dict(zip(term_names, np.round(feature_intensive[1].coef_, 3))))\"><pre><span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">numpy<\/span> <span class=\"pl-k\">as<\/span> <span class=\"pl-s1\">np<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">ensemble<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">HistGradientBoostingRegressor<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">linear_model<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">Ridge<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">metrics<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">r2_score<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">model_selection<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">train_test_split<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">pipeline<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">make_pipeline<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">preprocessing<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">PolynomialFeatures<\/span>\n\n<span class=\"pl-c\"># --- synthetic data with one curvature term and one interaction term ---<\/span>\n<span class=\"pl-s1\">rng<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">random<\/span>.<span class=\"pl-c1\">default_rng<\/span>(<span class=\"pl-c1\">0<\/span>)\n<span class=\"pl-s1\">n_samples<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-c1\">400<\/span>\n<span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">rng<\/span>.<span class=\"pl-c1\">uniform<\/span>(<span class=\"pl-c1\">-<\/span><span class=\"pl-c1\">3<\/span>, <span class=\"pl-c1\">3<\/span>, <span class=\"pl-s1\">size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">n_samples<\/span>)\n<span class=\"pl-s1\">x2<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">rng<\/span>.<span class=\"pl-c1\">uniform<\/span>(<span class=\"pl-c1\">-<\/span><span class=\"pl-c1\">3<\/span>, <span class=\"pl-c1\">3<\/span>, <span class=\"pl-s1\">size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">n_samples<\/span>)\n<span class=\"pl-s1\">y<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-c1\">3<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-c1\">2<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">-<\/span> <span class=\"pl-s1\">x2<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-c1\">1.5<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">**<\/span> <span class=\"pl-c1\">2<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-c1\">0.8<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x2<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-s1\">rng<\/span>.<span class=\"pl-c1\">normal<\/span>(<span class=\"pl-c1\">0<\/span>, <span class=\"pl-c1\">1.0<\/span>, <span class=\"pl-s1\">size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">n_samples<\/span>)\n\n<span class=\"pl-c1\">X<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">column_stack<\/span>(&#91;<span class=\"pl-s1\">x1<\/span>, <span class=\"pl-s1\">x2<\/span>&#93;)\n<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-v\">X_test<\/span>, <span class=\"pl-s1\">y_train<\/span>, <span class=\"pl-s1\">y_test<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">train_test_split<\/span>(<span class=\"pl-c1\">X<\/span>, <span class=\"pl-s1\">y<\/span>, <span class=\"pl-s1\">test_size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">0.3<\/span>, <span class=\"pl-s1\">random_state<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">0<\/span>)\n\n<span class=\"pl-c\"># the baseline: a linear model on the original columns<\/span>\n<span class=\"pl-s1\">plain<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">Ridge<\/span>(<span class=\"pl-s1\">alpha<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">1.0<\/span>).<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-s1\">y_train<\/span>)\n\n<span class=\"pl-c\"># the feature-intensive model: the analyst adds the power and interaction columns<\/span>\n<span class=\"pl-s1\">feature_intensive<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">make_pipeline<\/span>(\n    <span class=\"pl-en\">PolynomialFeatures<\/span>(<span class=\"pl-s1\">degree<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">2<\/span>, <span class=\"pl-s1\">include_bias<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>), <span class=\"pl-en\">Ridge<\/span>(<span class=\"pl-s1\">alpha<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">1.0<\/span>)\n).<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-s1\">y_train<\/span>)\n\n<span class=\"pl-c\"># the algorithm-intensive model: the algorithm splits the original columns on its own<\/span>\n<span class=\"pl-s1\">algorithm_intensive<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">HistGradientBoostingRegressor<\/span>(<span class=\"pl-s1\">max_depth<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">3<\/span>, <span class=\"pl-s1\">random_state<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">0<\/span>).<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-s1\">y_train<\/span>)\n\n<span class=\"pl-k\">for<\/span> <span class=\"pl-s1\">name<\/span>, <span class=\"pl-s1\">model<\/span> <span class=\"pl-c1\">in<\/span> ((<span class=\"pl-s\">\"linear model, original columns\"<\/span>, <span class=\"pl-s1\">plain<\/span>),\n                    (<span class=\"pl-s\">\"feature-intensive: Ridge on degree-2 columns\"<\/span>, <span class=\"pl-s1\">feature_intensive<\/span>),\n                    (<span class=\"pl-s\">\"algorithm-intensive: HistGradientBoostingRegressor\"<\/span>, <span class=\"pl-s1\">algorithm_intensive<\/span>)):\n    <span class=\"pl-en\">print<\/span>(<span class=\"pl-s\">f\"<span class=\"pl-s1\"><span class=\"pl-kos\">{<\/span><span class=\"pl-s1\">name<\/span>:50s<span class=\"pl-kos\">}<\/span><\/span> R2 = <span class=\"pl-s1\"><span class=\"pl-kos\">{<\/span><span class=\"pl-en\">r2_score<\/span>(<span class=\"pl-s1\">y_test<\/span>, <span class=\"pl-s1\">model<\/span>.<span class=\"pl-c1\">predict<\/span>(<span class=\"pl-v\">X_test<\/span>)):.4f<span class=\"pl-kos\">}<\/span><\/span>\"<\/span>)\n\n<span class=\"pl-c\"># the coefficients the feature-intensive model reads out, one per term of equation (3)<\/span>\n<span class=\"pl-s1\">term_names<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">feature_intensive<\/span>&#91;<span class=\"pl-c1\">0<\/span>&#93;.<span class=\"pl-c1\">get_feature_names_out<\/span>(&#91;<span class=\"pl-s\">\"x1\"<\/span>, <span class=\"pl-s\">\"x2\"<\/span>&#93;)\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s\">\"feature-intensive coefficients:\"<\/span>,\n      <span class=\"pl-en\">dict<\/span>(<span class=\"pl-en\">zip<\/span>(<span class=\"pl-s1\">term_names<\/span>, <span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">round<\/span>(<span class=\"pl-s1\">feature_intensive<\/span>&#91;<span class=\"pl-c1\">1<\/span>&#93;.<span class=\"pl-c1\">coef_<\/span>, <span class=\"pl-c1\">3<\/span>))))<\/pre><\/div>\n<p dir=\"auto\">The first three lines are the held-out <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$R^2$<\/math-renderer> of the three models, and the last line is the coefficient of each term that the Feature-Intensive Model reads out.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"linear model, original columns                     R2 = 0.4735\nfeature-intensive: Ridge on degree-2 columns       R2 = 0.9782\nalgorithm-intensive: HistGradientBoostingRegressor R2 = 0.9689\nfeature-intensive coefficients: {'x1': np.float64(1.963), 'x2': np.float64(-1.015), 'x1^2': np.float64(1.516), 'x1 x2': np.float64(0.76), 'x2^2': np.float64(0.005)}\"><pre lang=\"text\" class=\"notranslate\"><code>linear model, original columns                     R2 = 0.4735\nfeature-intensive: Ridge on degree-2 columns       R2 = 0.9782\nalgorithm-intensive: HistGradientBoostingRegressor R2 = 0.9689\nfeature-intensive coefficients: {'x1': np.float64(1.963), 'x2': np.float64(-1.015), 'x1^2': np.float64(1.516), 'x1 x2': np.float64(0.76), 'x2^2': np.float64(0.005)}\n<\/code><\/pre><\/div>\n<p dir=\"auto\">Four coefficients recovered 2, -1, 1.5 and 0.8, the coefficients of the expression that made the data, and the coefficient of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$x_2^2$<\/math-renderer>, which that expression does not carry, stayed at 0.005.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix C. Two Views of Linearity<\/h2><a id=\"user-content-appendix-c-two-views-of-linearity\" class=\"anchor\" aria-label=\"Permalink: Appendix C. Two Views of Linearity\" href=\"#appendix-c-two-views-of-linearity\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li>Linearity in linear algebra: additivity ($f(x+y)=f(x)+f(y)$) and homogeneity ($f(cx)=cf(x)$) have to hold, and the map has to pass through the origin (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$y=ax+b$<\/math-renderer> with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"d4cc56c4028940fb4201849cae698613\">$b \\neq 0$<\/math-renderer> is an affine transform).<\/li>\n<li>Linearity in a domain or in engineering: a straight-line and proportional relation, used in a wider sense than the strict definition of linear algebra.<\/li>\n<\/ul>\n<\/article><\/div><\/div><\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-tab kt-tab-inner-content kt-inner-tab-2 kt-inner-tab7147_d6e5db-eb\"><div class=\"kt-tab-inner-content-inner\"><p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"Models\/Modeling-Strategies\/Non-Linear-Data-Modeling-Basics\/non-linear-data-modeling-basics-ko.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">Non-Linear Data Modeling Basics<\/h1><a id=\"user-content-non-linear-data-modeling-basics\" class=\"anchor\" aria-label=\"Permalink: Non-Linear Data Modeling Basics\" href=\"#non-linear-data-modeling-basics\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Version 20 | Created: 2026-09-23 | Updated: 2026-11-07 13:46 UTC<\/p>\n<ul dir=\"auto\">\n<li><a href=\"#1-purpose\">1. Purpose<\/a><\/li>\n<li><a href=\"#2-summary\">2. Summary<\/a><\/li>\n<li><a href=\"#3-taxonomy-and-its-hierarchy\">3. Taxonomy and its Hierarchy<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#31-comparison\">3.1 Comparison<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#4-principle\">4. Principle<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#41-linear-model-mechanics-and-limits\">4.1 Linear Model Mechanics and Limits<\/a><\/li>\n<li><a href=\"#42-nonlinear-features-in-a-linear-model\">4.2 Nonlinear Features in a Linear Model<\/a><\/li>\n<li><a href=\"#43-comparison-of-the-two-models\">4.3 Comparison of the Two Models<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#5-application\">5. Application<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#51-feature-intensive-model\">5.1 Feature-Intensive Model<\/a><\/li>\n<li><a href=\"#52-algorithm-intensive-model\">5.2 Algorithm-Intensive Model<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#appendix-a-terminology\">Appendix A. Terminology<\/a><\/li>\n<li><a href=\"#appendix-b-python-implementation\">Appendix B. Python Implementation<\/a><\/li>\n<li><a href=\"#appendix-c-two-views-of-linearity\">Appendix C. Two Views of Linearity<\/a><\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">1. Purpose<\/h2><a id=\"user-content-1-purpose\" class=\"anchor\" aria-label=\"Permalink: 1. Purpose\" href=\"#1-purpose\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li><strong>Problem Statement<\/strong>: \uc218\ub9ac\ud1b5\uacc4\uc640 machine learning model \uc758 \uc120\ud615\uc131 (linearity) \uacfc \ube44\uc120\ud615\uc131 (non-linearity), \uadf8\ub9ac\uace0 data \uc758 \uc120\ud615 \ud2b9\uc131 (linear property) \uacfc \ube44\uc120\ud615 \ud2b9\uc131 (non-linear property) \uc758 \ucc28\uc774\uc5d0 \ub300\ud55c \uc774\ud574\uac00 \ubd80\uc871\ud558\uc5ec modeling \uc804\ub7b5\uc774 \ud63c\ub780\ud558\ub2e4.<\/li>\n<li><strong>Goal<\/strong>: \uc218\ub9ac\ud1b5\uacc4\ud559\uc801 \uc120\ud615\uc131 (linearity) \uc744 \ubc14\ud0d5\uc73c\ub85c, machine learning \uc5d0\uc11c \ubcc0\uc218 \uc0ac\uc774\uc758 \uc0c1\ud638\uc791\uc6a9 (feature interaction) \uc744 \ud3ec\ud568\ud558\ub294 \ube44\uc120\ud615 data \ud2b9\uc131\uc744 \ub2e4\ub8e8\ub294 modeling \uc804\ub7b5\uc744 \ube44\uad50 \ubd84\uc11d\ud55c\ub2e4.<\/li>\n<li><strong>Non-Goal<\/strong>: Model \uc0c1\uc138\ub294 \ub2e4\ub8e8\uc9c0 \uc54a\ub294\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">2. Summary<\/h2><a id=\"user-content-2-summary\" class=\"anchor\" aria-label=\"Permalink: 2. Summary\" href=\"#2-summary\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Model \uc758 \uc120\ud615\uc131\uacfc data \uc758 \ube44\uc120\ud615 \ud2b9\uc131\uc740 \uc11c\ub85c \ub2e4\ub978 \ub300\uc0c1\uc785\ub2c8\ub2e4. \uc120\ud615\uc131\uc740 \uac00\uc911\uce58 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta$<\/math-renderer> \uc5d0 \ub300\ud55c 1\ucc28\uc131\uc774\uace0, \ube44\uc120\ud615 \ud2b9\uc131\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$y$<\/math-renderer> \uc0ac\uc774 \uad00\uacc4\uc758 \uace1\ub960\uacfc \ubcc0\uc218 \uc0ac\uc774\uc758 interaction \uc785\ub2c8\ub2e4. \uadf8\ub798\uc11c \uc785\ub825\uc744 \ube44\uc120\ud615\uc73c\ub85c \ubcc0\ud658\ud574\ub3c4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta$<\/math-renderer> \uc5d0 \ub300\ud55c 1\ucc28 \uad6c\uc870\ub294 \ub0a8\uace0, \ucd5c\uc18c\uc81c\uacf1\ubc95\uacfc Ridge, Lasso, PLS \uc758 \ud574\ubc95\uc744 \uadf8\ub300\ub85c \uc0ac\uc6a9\ud569\ub2c8\ub2e4 (4.2 \uc808).<\/p>\n<p dir=\"auto\">\ube44\uc120\ud615 data \ud2b9\uc131\uc744 \ub204\uac00 \ub2f4\ub2f9\ud558\ub294\uc9c0\uac00 \ub450 modeling \uc804\ub7b5\uc744 \uac00\ub985\ub2c8\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li>\n<strong>Feature-Intensive Model<\/strong>: \uc120\ud615 \ubaa8\ub378 + \ube44\uc120\ud615 Feature (\ud2b9\uc131 \uacf5\ud559 \uc811\uadfc\ubc95). \"\ubaa8\ub378\uc740 \ub2e8\uc21c (\uc120\ud615) \ud558\uac8c \ub450\uace0, \ub370\uc774\ud130 (Feature) \ub97c \ubcf5\uc7a1\ud558\uac8c \ub9cc\ub4e0\ub2e4.\" \ubd84\uc11d\uac00\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1 x_2$<\/math-renderer> \uac19\uc740 \uc5f4\uc744 \ub9cc\ub4e4\uc5b4 \ub123\ub294 \uc120\ud615 \ubaa8\ub378\uc785\ub2c8\ub2e4.<\/li>\n<li>\n<strong>Algorithm-Intensive Model<\/strong>: \ube44\uc120\ud615 \ubaa8\ub378 + \uc120\ud615 Feature (\uc54c\uace0\ub9ac\uc998 \uc811\uadfc\ubc95). \"\ub370\uc774\ud130 (Feature) \ub294 \uc788\ub294 \uadf8\ub300\ub85c (\uc120\ud615\/\uc6d0\ubcf8) \ub450\uace0, \ubaa8\ub378\uc744 \ubcf5\uc7a1 (\ube44\uc120\ud615) \ud558\uac8c \ub9cc\ub4e0\ub2e4.\" \uc6d0\ubcf8 \uc5f4\uc744 \uadf8\ub300\ub85c \ub123\uace0 tree ensemble \uc774\ub098 neural network \uac00 \ub0b4\ubd80\uc5d0\uc11c \ud559\uc2b5\ud558\ub294 \uc811\uadfc\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Taxonomy and its Hierarchy<\/h2><a id=\"user-content-3-taxonomy-and-its-hierarchy\" class=\"anchor\" aria-label=\"Permalink: 3. Taxonomy and its Hierarchy\" href=\"#3-taxonomy-and-its-hierarchy\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ube44\uc120\ud615\uc131\uc740 model \uc758 \uc120\ud615\uc131, feature \uc758 \uc120\ud615\uc131, \uc77d\uc5b4 \ub0b4\ub294 \uac12\uc758 \uc138 \ucd95\uc73c\ub85c \uac08\ub9bd\ub2c8\ub2e4. Feature-Intensive Model \uc740 \uc120\ud615 model \uc5d0 \ube44\uc120\ud615 feature \ub97c \ub123\uc5b4 \ud56d\ub9c8\ub2e4\uc758 \uacc4\uc218\ub97c \uc77d\uace0, Algorithm-Intensive Model \uc740 \ube44\uc120\ud615 model \uc5d0 \uc120\ud615 feature \ub97c \ub123\uc5b4 \ubcc0\uc218 \uc911\uc694\ub3c4\ub97c \uc77d\uc2b5\ub2c8\ub2e4. <a href=\"#fig-1\">Fig 1<\/a> \uc774 \uadf8 \uc138 \ucd95\uacfc \uac01 model \uc5d0 \uc18d\ud55c \ubc29\ubc95\uc785\ub2c8\ub2e4.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"Nonlinearity in a model\n|\n+-- Feature-Intensive Model ........................ linear model + non-linear feature\n|     +-- Power term: x^2, x^3 ..................... curvature of one variable\n|     +-- Interaction term: x1 * x2 ................ joint effect of two variables\n|     +-- Basis expansion: spline, RBF ............. local shape without a global degree\n|\n+-- Algorithm-Intensive Model ...................... non-linear model + linear feature\n      +-- Tree ensemble ............................ split points cut the input space\n      +-- Neural network ........................... activation function bends the response\n      +-- Kernel method ............................ inner product in an implicit feature space\"><pre lang=\"text\" class=\"notranslate\"><code>Nonlinearity in a model\n|\n+-- Feature-Intensive Model ........................ linear model + non-linear feature\n|     +-- Power term: x^2, x^3 ..................... curvature of one variable\n|     +-- Interaction term: x1 * x2 ................ joint effect of two variables\n|     +-- Basis expansion: spline, RBF ............. local shape without a global degree\n|\n+-- Algorithm-Intensive Model ...................... non-linear model + linear feature\n      +-- Tree ensemble ............................ split points cut the input space\n      +-- Neural network ........................... activation function bends the response\n      +-- Kernel method ............................ inner product in an implicit feature space\n<\/code><\/pre><\/div>\n<p dir=\"auto\"><a id=\"user-content-fig-1\"><\/a>\nFig 1. The composition of the two models and the methods on each side<\/p>\n<p dir=\"auto\">\ub450 model \uc758 \uacc4\uce35\uc740 \uac00\uc815\uc758 \uac15\ub3c4\ub85c \ub0b4\ub824\uac11\ub2c8\ub2e4. Feature-Intensive Model \uc740 \ube44\uc120\ud615\uc758 \ud615\ud0dc\ub97c \ud56d\uc73c\ub85c \ubbf8\ub9ac \uc801\uc5b4 \ub450\ub294 \ub300\uc2e0 \uadf8 \ud56d\uc758 \uacc4\uc218\ub97c \uadf8\ub300\ub85c \uc77d\uc2b5\ub2c8\ub2e4. Algorithm-Intensive Model \uc740 \ud615\ud0dc\ub97c \uc801\uc9c0 \uc54a\uc544\ub3c4 \ub418\ub294 \ub300\uc2e0, \uc5b4\ub290 \ubcc0\uc218\uc758 \uc5b4\ub290 \uad6c\uac04\uc774 \uc608\uce21\uc744 \uc6c0\uc9c1\uc600\ub294\uc9c0\ub97c \uacc4\uc218 \ud558\ub098\ub85c \uc77d\uc9c0 \ubabb\ud569\ub2c8\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1 Comparison<\/h3><a id=\"user-content-31-comparison\" class=\"anchor\" aria-label=\"Permalink: 3.1 Comparison\" href=\"#31-comparison\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Table 1. Where each model sits on the three axes<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"center\">Model<\/th>\n<th align=\"center\">Linearity<\/th>\n<th align=\"center\">Feature<\/th>\n<th align=\"center\">What you read out<\/th>\n<th align=\"center\">Breaks when<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\">Feature-Intensive Model<\/td>\n<td align=\"center\">\uc120\ud615<\/td>\n<td align=\"center\">\ube44\uc120\ud615 (\ubcc0\ud658\ub41c \uc5f4)<\/td>\n<td align=\"center\">\ud56d\ub9c8\ub2e4\uc758 \uacc4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta$<\/math-renderer>\n<\/td>\n<td align=\"center\">\ube44\uc120\ud615\uc758 \ud615\ud0dc\ub97c \ubbf8\ub9ac \uc54c \uc218 \uc5c6\uc744 \ub54c<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">Algorithm-Intensive Model<\/td>\n<td align=\"center\">\ube44\uc120\ud615<\/td>\n<td align=\"center\">\uc120\ud615 (\uc6d0\ubcf8 \uc5f4)<\/td>\n<td align=\"center\">\ubcc0\uc218 \uc911\uc694\ub3c4<\/td>\n<td align=\"center\">\uc678\uc0bd \uad6c\uac04\uacfc \uc801\uc740 \ud45c\ubcf8\uc5d0\uc11c<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">Feature-Intensive Model \uc740 \uc5b4\ub5a4 \ud56d\uc744 \ub9cc\ub4e4\uc9c0\ub97c \ubd84\uc11d\uac00\uac00 \uc815\ud558\ubbc0\ub85c, \uc790\ub8cc\uc5d0 \uc5b4\ub5a4 \uace1\uc120\uacfc \uc5b4\ub5a4 interaction \uc774 \uc788\ub294\uc9c0 \uc9d0\uc791\ud560 \uadfc\uac70\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. Algorithm-Intensive Model \uc740 \uadf8 \uadfc\uac70 \uc5c6\uc774\ub3c4 \uc801\ud569\ud558\uc9c0\ub9cc, \uc678\uc0bd \uad6c\uac04\uacfc \uc801\uc740 \ud45c\ubcf8\uc5d0\uc11c \uc815\ud655\ub3c4\uac00 \ub5a8\uc5b4\uc9d1\ub2c8\ub2e4 (5.2 \uc808).<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Principle<\/h2><a id=\"user-content-4-principle\" class=\"anchor\" aria-label=\"Permalink: 4. Principle\" href=\"#4-principle\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.1 Linear Model Mechanics and Limits<\/h3><a id=\"user-content-41-linear-model-mechanics-and-limits\" class=\"anchor\" aria-label=\"Permalink: 4.1 Linear Model Mechanics and Limits\" href=\"#41-linear-model-mechanics-and-limits\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc120\ud615 \ud68c\uadc0, Ridge, Lasso, PLS (Partial Least Squares) \ub4f1\uc758 \ubaa8\ub378\uc740 \uc785\ub825 \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$X$<\/math-renderer> \uc640 target \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$Y$<\/math-renderer> \uc758 \uad00\uacc4\ub97c \uc120\ud615 \uacb0\ud569 (Linear Combination) \uc73c\ub85c \uac00\uc815\ud569\ub2c8\ub2e4.<\/p>\n<math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$$y = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\dots + \\beta_p x_p + \\epsilon \\hspace{19em} (1)$$<\/math-renderer>\n<ul dir=\"auto\">\n<li>\uc7a5\uc810\n<ul dir=\"auto\">\n<li>\ubaa8\ub378\uc774 \ub2e8\uc21c\ud558\uc5ec \uacfc\uc801\ud569 (Overfitting) \uc704\ud5d8\uc774 \uc801\uace0, parameter \uc218\ub834 \uc18d\ub3c4\uac00 \ub9e4\uc6b0 \ube60\ub985\ub2c8\ub2e4.<\/li>\n<li>\uacc4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta_i$<\/math-renderer> \ub97c \ud1b5\ud574 \uc5b4\ub5a4 \ubcc0\uc218\uac00 target \ubcc0\ud654\uc5d0 \uc5bc\ub9c8\ud07c \uae30\uc5ec\ud588\ub294\uc9c0 \uc9c1\uad00\uc801\uc73c\ub85c \ud574\uc11d \uac00\ub2a5\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<li>\ud55c\uacc4\n<ul dir=\"auto\">\n<li>\ub370\uc774\ud130\uc5d0 \uace1\uc120 \uad00\uacc4\uac00 \uc874\uc7ac\ud558\uac70\ub098 \ubcc0\uc218 \uc0ac\uc774\uc5d0 interaction \uc774 \uc788\uc73c\uba74, 1 \ucc28 \ud3c9\uba74 \ud615\ud0dc\uc758 \uc608\uce21 \uacbd\uacc4 (Decision Boundary) \ub85c\ub294 \uadf8 \uad00\uacc4\ub97c \uc801\ud569\ud560 \uc218 \uc5c6\uc5b4 underfitting \uc774 \ubc1c\uc0dd\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.2 Nonlinear Features in a Linear Model<\/h3><a id=\"user-content-42-nonlinear-features-in-a-linear-model\" class=\"anchor\" aria-label=\"Permalink: 4.2 Nonlinear Features in a Linear Model\" href=\"#42-nonlinear-features-in-a-linear-model\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc120\ud615 \ubaa8\ub378\uc5d0\uc11c '\uc120\ud615 (Linearity)' \uc758 \uc218\ud559\uc801 \uc815\uc758\ub294 \uc785\ub825 \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x$<\/math-renderer> \uc5d0 \ub300\ud55c 1\ucc28\uc2dd\uc774 \uc544\ub2c8\ub77c, \ucd5c\uc801\ud654 \ub300\uc0c1\uc778 \uac00\uc911\uce58 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta$<\/math-renderer> \uc5d0 \ub300\ud574 1\ucc28\uc2dd\uc784\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4.<\/p>\n<p dir=\"auto\">\ub530\ub77c\uc11c \uc785\ub825 \uacf5\uac04\uc744 \ube44\uc120\ud615 \ubcc0\ud658\ud558\uc5ec \ud655\uc7a5\ud558\ub354\ub77c\ub3c4, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta$<\/math-renderer> \uc5d0 \ub300\ud55c 1\ucc28 \uad6c\uc870\ub294 \uc720\uc9c0\ub418\ubbc0\ub85c \uc120\ud615 \ubaa8\ub378\uc758 \ud574\ubc95 (Closed-form solution) \uc744 \uadf8\ub300\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p dir=\"auto\">\uc6d0\ub798 \uc785\ub825 \ub370\uc774\ud130\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_2$<\/math-renderer> \uc77c \ub54c, \ube44\uc120\ud615 \ucc28\uc218 \ud56d\uc744 \ucd94\uac00\ud558\uc5ec \uc0c8\ub85c\uc6b4 \uae30\uc800 (Basis) \ub85c \uc62e\uae41\ub2c8\ub2e4.<\/p>\n<math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$$\\phi(x_1, x_2) = [1, x_1, x_2, x_1^2, x_2^2, x_1 x_2]^T \\hspace{19em} (2)$$<\/math-renderer>\n<p dir=\"auto\">\uc774\ud6c4 \uc774 \ud655\uc7a5\ub41c \uacf5\uac04\uc5d0\uc11c \uc120\ud615 \ubaa8\ub378\uc744 \uc801\ud569\ud569\ub2c8\ub2e4.<\/p>\n<math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$$y = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\beta_3 x_1^2 + \\beta_4 x_2^2 + \\beta_5 (x_1 x_2) \\hspace{14em} (3)$$<\/math-renderer>\n<ul dir=\"auto\">\n<li>\ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x$<\/math-renderer> \uae30\uc900: \ube44\uc120\ud615 \ubaa8\ub378 (\uace1\uc120 \ubc0f \uc0c1\ud638\uc791\uc6a9 \uace1\uba74 \ud45c\ud604 \uac00\ub2a5)<\/li>\n<li>\uac00\uc911\uce58 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta$<\/math-renderer> \uae30\uc900: \uc120\ud615 \ubaa8\ub378 (\ucd5c\uc18c\uc81c\uacf1\ubc95, Ridge\/Lasso \uaddc\uc81c \ub4f1 \uae30\uc874 \uc54c\uace0\ub9ac\uc998 \uadf8\ub300\ub85c \uc801\uc6a9)<\/li>\n<\/ul>\n<p dir=\"auto\">\uc0c1\ud638\uc791\uc6a9 \ud56d <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1 x_2$<\/math-renderer> \ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x$<\/math-renderer> \uc5d0 \ub300\ud574 \ube44\uc120\ud615\uc785\ub2c8\ub2e4. \ub450 \uc785\ub825\uc758 \uacf1\uc774\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$f(a x + b z) = a f(x) + b f(z)$<\/math-renderer> \ub97c \ub9cc\uc871\ud558\uc9c0 \uc54a\uace0, \ubc18\uc751\uba74\uc774 \ud3c9\uba74\uc5d0\uc11c \uc548\uc7a5 \ubaa8\uc591\uc758 \uace1\uba74\uc73c\ub85c \ubc14\ub01d\ub2c8\ub2e4.<\/p>\n<p dir=\"auto\">\uc2dd (3) \uc758 model \uc740 \uc808\ud3b8 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta_0$<\/math-renderer> \ub97c \uac00\uc9c0\ubbc0\ub85c \uc120\ud615\ub300\uc218\uc758 \uc815\uc758\ub85c\ub294 affine transform \uc774\uace0, \uacf5\ud559\uc5d0\uc11c \uc4f0\ub294 \uc120\ud615\uc740 \uadf8 affine transform \uae4c\uc9c0 \ud3ec\ud568\ud569\ub2c8\ub2e4 (<a href=\"#appendix-c-two-views-of-linearity\">Appendix C<\/a>).<\/p>\n<p dir=\"auto\">\uc2dd (3) \uc758 \uacc4\uc218\ub294 \ud655\uc7a5 \uc804\uc758 \uacc4\uc218\uc640 \uac19\uc740 \ubc29\uc2dd\uc73c\ub85c \uc77d\uc2b5\ub2c8\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta_3$<\/math-renderer> \uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1$<\/math-renderer> \uc758 \uace1\ub960\uc774\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta_5$<\/math-renderer> \ub294 \ub450 \ubcc0\uc218\uac00 \ud568\uaed8 \uc6c0\uc9c1\uc77c \ub54c\uc758 \uae30\uc5ec\uc774\uba70, \ub458 \ub2e4 \ucd5c\uc18c\uc81c\uacf1\ubc95\uc774 \uc815\ud569\ub2c8\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.3 Comparison of the Two Models<\/h3><a id=\"user-content-43-comparison-of-the-two-models\" class=\"anchor\" aria-label=\"Permalink: 4.3 Comparison of the Two Models\" href=\"#43-comparison-of-the-two-models\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ub450 model \uc740 \ube44\uc120\ud615\uc744 \ub2f4\ub294 \uc790\ub9ac, \uacc4\uc218\ub97c \uc77d\uc5b4 \ub0bc \uc218 \uc788\ub294\uc9c0, \ubcc0\uc218 \uc218\uc5d0 \ub530\ub978 \uc5f0\uc0b0\ub7c9\uc5d0\uc11c \uac08\ub9bd\ub2c8\ub2e4.<\/p>\n<p dir=\"auto\">Table 2. The two models compared on three criteria<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"center\">Criterion<\/th>\n<th align=\"center\">Feature-Intensive Model<\/th>\n<th align=\"center\">Algorithm-Intensive Model<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\">\ud575\uc2ec \uba54\ucee4\ub2c8\uc998<\/td>\n<td align=\"center\">\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1 x_2$<\/math-renderer> \ub4f1 \ubcc0\ud658 \ud56d\uc744 \uba85\uc2dc\uc801\uc73c\ub85c \ucd94\uac00<\/td>\n<td align=\"center\">Tree \ubd84\uae30\uc640 \ud65c\uc131\ud654 \ud568\uc218\ub85c \uc790\ub3d9 \ud0d0\uc0c9<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">\uc124\uba85 \uac00\ub2a5\uc131 (XAI)<\/td>\n<td align=\"center\">\ub9e4\uc6b0 \ub192\uc74c. \ud56d\ub9c8\ub2e4\uc758 \uacc4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$\\beta$<\/math-renderer> \ub97c \uc9c1\uc811 \ud655\uc778<\/td>\n<td align=\"center\">\ubcf4\ud1b5\uc5d0\uc11c \ub0ae\uc74c. SHAP, \ubcc0\uc218 \uc911\uc694\ub3c4 \ub4f1 \ubd80\uac00 \ub3c4\uad6c \ud544\uc694<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">\uc5f0\uc0b0 \ud6a8\uc728\uc131<\/td>\n<td align=\"center\">\ubcc0\uc218 \uc218\uac00 \uc801\uc744 \ub54c \uc6b0\uc218. \uace0\ucc28\uc6d0\uc5d0\uc11c \uc5f4 \uc218\uac00 \uae09\uc99d<\/td>\n<td align=\"center\">\ub300\uc6a9\ub7c9 dataset \ucc98\ub9ac\uc5d0 \ucd5c\uc801\ud654<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. Application<\/h2><a id=\"user-content-5-application\" class=\"anchor\" aria-label=\"Permalink: 5. Application\" href=\"#5-application\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.1 Feature-Intensive Model<\/h3><a id=\"user-content-51-feature-intensive-model\" class=\"anchor\" aria-label=\"Permalink: 5.1 Feature-Intensive Model\" href=\"#51-feature-intensive-model\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc801\ud569\uc740 <code>Ridge<\/code>, <code>Lasso<\/code>, <code>PLSRegression<\/code> \uc774 \ub9e1\uace0, <a href=\"#fig-1\">Fig 1<\/a> \uc758 \uc138 \ubc29\ubc95\uc774 \uadf8 \uc55e\uc5d0\uc11c \ub123\uc744 \uc5f4\uc744 \uc815\ud569\ub2c8\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li>\n<strong>Power term<\/strong>: \ud55c \ubcc0\uc218\uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x^3$<\/math-renderer> \uc5f4. <code>PolynomialFeatures(degree=3)<\/code> \uc774 3 \ucc28\uae4c\uc9c0\uc758 \ud56d\uc744 \ubaa8\ub450 \ub9cc\ub4e4\uba70, \uadf8 \uac00\uc6b4\ub370 \ubcc0\uc218 \ud558\ub098\ub9cc \ub4e0 \ud56d\uc774 power term \uc785\ub2c8\ub2e4.<\/li>\n<li>\n<strong>Interaction term<\/strong>: \ub450 \ubcc0\uc218\uc758 \uacf1 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1 x_2$<\/math-renderer> \uc5f4. \uacf1\ub9cc \ud544\uc694\ud558\uba74 <code>PolynomialFeatures(interaction_only=True)<\/code> \uac00 \uc81c\uacf1 \ud56d\uc744 \ube8d\ub2c8\ub2e4.<\/li>\n<li>\n<strong>Basis expansion<\/strong>: \uad6c\uac04\uc744 \ub098\ub204\ub294 \uc810\ub9c8\ub2e4 \ub2e4\ud56d\uc2dd\uc744 \uc787\ub294 spline \uacfc, \uc911\uc2ec\uc5d0\uc11c\uc758 \uac70\ub9ac\ub85c \uc5f4\uc744 \ub9cc\ub4dc\ub294 RBF. <code>SplineTransformer<\/code> \uc758 <code>n_knots<\/code> \uac00 \uad6c\uac04 \uc218\ub97c \uc815\ud558\uba70, degree \ub97c \uc62c\ub9ac\uc9c0 \uc54a\uace0 \ud55c \uad6c\uac04\uc758 \uace1\uc120\ub9cc \ubc14\uafc9\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p dir=\"auto\">\uc138 \ubc29\ubc95\uc5d0 \uacf5\ud1b5\uc778 \uc870\uac74\uc785\ub2c8\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li><strong>\uac00\uc815<\/strong>: \ub2f4\uc744 \ube44\uc120\ud615\uc758 \ud615\ud0dc\ub97c \ud56d\uc73c\ub85c \ubbf8\ub9ac \uc801\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li><strong>\uc124\uc815\uac12<\/strong>: Regularization \uac15\ub3c4 <code>alpha<\/code>. \ud655\uc7a5\ud55c \uc5f4\uc740 \uaddc\ubaa8\uac00 \ub2ec\ub77c\uc9c0\ubbc0\ub85c Ridge \ub098 Lasso \ub85c \uacc4\uc218\ub97c \uc81c\ud55c\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\uae68\uc9c0\ub294 \uc870\uac74<\/strong>: \ucc38\ub41c \uad00\uacc4\uac00 \uc801\uc5b4 \ub454 \ud56d \ubc16\uc5d0 \uc788\uc73c\uba74 \ud655\uc7a5 \ud6c4\uc5d0\ub3c4 underfitting \uc774 \ub0a8\uc2b5\ub2c8\ub2e4. Degree \ub97c \ub192\uc5ec \ub9de\ucd94\uba74 \uc5f4 \uc218\uac00 \uae09\ud788 \ub298\uc5b4 \uacfc\uc801\ud569 \uc704\ud5d8\uc774 \uae09\uaca9\ud788 \ucee4\uc9c0\uace0 \uacc4\uc218\uac00 \ud754\ub4e4\ub9bd\ub2c8\ub2e4.<\/li>\n<li><strong>\ub9cc\ub098\ub294 \uc790\ub9ac<\/strong>: \ub370\uc774\ud130 \uc591\uc774 \uc801\uace0, \uacf5\uc815 \ubcc0\uc218\ucc98\ub7fc \ubb3c\ub9ac\uc801 \uadfc\uac70\ub85c \uace1\ub960\uacfc interaction \uc744 \uc9d0\uc791\ud560 \uc218 \uc788\uc73c\uba70, \ud574\uc11d\uacfc \uc6d0\uc778 \uaddc\uba85\uc774 \uc608\uce21 \uc815\ud655\ub3c4\ubcf4\ub2e4 \uc55e\uc11c\ub294 \uc790\ub9ac\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.2 Algorithm-Intensive Model<\/h3><a id=\"user-content-52-algorithm-intensive-model\" class=\"anchor\" aria-label=\"Permalink: 5.2 Algorithm-Intensive Model\" href=\"#52-algorithm-intensive-model\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc6d0\ubcf8 \uc5f4\uc744 \uadf8\ub300\ub85c \ubc1b\uace0, <a href=\"#fig-1\">Fig 1<\/a> \uc758 \uc138 \ubc29\ubc95\uc774 model \uc548\uc5d0\uc11c \ube44\uc120\ud615\uc744 \ub9cc\ub4ed\ub2c8\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li><strong>Tree ensemble<\/strong>: \uc785\ub825 \uacf5\uac04\uc744 \ubd84\uae30\ub85c \uc798\ub77c \uad6c\uac04\ub9c8\ub2e4 \uc0c1\uc218\ub97c \uc801\ud569\ud569\ub2c8\ub2e4. <code>RandomForestRegressor<\/code>, <code>HistGradientBoostingRegressor<\/code>, XGBoost, LightGBM \uc774 \uc5ec\uae30\uc5d0 \uc18d\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>Neural network<\/strong>: \ud65c\uc131\ud654 \ud568\uc218\uac00 \uce35\ub9c8\ub2e4 \uc751\ub2f5\uc744 \uad7d\ud600 \uc5f0\uc18d\ud55c \uace1\uba74\uc744 \ub9cc\ub4ed\ub2c8\ub2e4. <code>MLPRegressor<\/code> \uac00 \uadf8 \uad6c\ud604\uc785\ub2c8\ub2e4.<\/li>\n<li><strong>Kernel method<\/strong>: \uc5f4\uc744 \ub298\ub9ac\ub294 \ub300\uc2e0 \ud45c\ubcf8 \uc0ac\uc774\uc758 \ub0b4\uc801\uc73c\ub85c \ud655\uc7a5\ud55c \uacf5\uac04\uc744 \ub300\uc2e0\ud569\ub2c8\ub2e4. <code>SVR(kernel='rbf')<\/code> \uc640 <code>KernelRidge<\/code> \uac00 \uadf8 \uad6c\ud604\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p dir=\"auto\">\uc138 \ubc29\ubc95\uc5d0 \uacf5\ud1b5\uc778 \uc870\uac74\uc785\ub2c8\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li><strong>\uac00\uc815<\/strong>: \ud45c\ubcf8\uc774 \ubd84\uae30 \uc704\uce58\uc640 \uac00\uc911\uce58\ub97c \uc815\ud560 \ub9cc\ud07c \ub9ce\uc2b5\ub2c8\ub2e4. Tree ensemble \uc740 \uad6c\uac04\ub9c8\ub2e4 \uc0c1\uc218\ub97c \uc801\ud569\ud558\ubbc0\ub85c \uad6c\uac04 \uc548\uc758 \ud45c\ubcf8 \uc218\uac00 \uc815\ud655\ub3c4\ub97c \uc815\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\uc124\uc815\uac12<\/strong>: Tree ensemble \uc758 <code>max_depth<\/code> \uc640 learning rate, neural network \uc758 \uce35 \uc218\uc640 \ud65c\uc131\ud654 \ud568\uc218, kernel method \uc758 <code>gamma<\/code> \uc640 <code>C<\/code>.<\/li>\n<li><strong>\uae68\uc9c0\ub294 \uc870\uac74<\/strong>: Train data \ubc16\uc758 \uc785\ub825\uc5d0\uc11c tree ensemble \uc740 \ub9c8\uc9c0\ub9c9 \uad6c\uac04\uc758 \uc0c1\uc218\ub97c \uadf8\ub300\ub85c \ub0b4\ub193\uc544 \uc678\uc0bd\ud558\uc9c0 \ubabb\ud569\ub2c8\ub2e4. \ud45c\ubcf8\uc774 \uc801\uc73c\uba74 neural network \uac00 \uacfc\uc801\ud569\ud558\uba70, \uadf8 \uc704\ud5d8\uc740 hyperparameter \uc870\uc808\ub85c \uc644\ud654\ud569\ub2c8\ub2e4. \ud45c\ubcf8\uc774 \ub9ce\uc73c\uba74 kernel method \uc758 \uacc4\uc0b0\ub7c9\uc774 \ud45c\ubcf8 \uc218\uc758 \uc81c\uacf1\uc73c\ub85c \ub298\uc5b4\ub0a9\ub2c8\ub2e4.<\/li>\n<li><strong>\ub9cc\ub098\ub294 \uc790\ub9ac<\/strong>: \ub370\uc774\ud130 \uc591\uc774 \ucda9\ubd84\ud558\uace0, \ubcc0\uc218 \uc218\uac00 \ub9ce\uc544 \ud56d\uc744 \uc77c\uc77c\uc774 \uc801\uae30 \uc5b4\ub824\uc6b0\uba70, \uc608\uce21 \uc815\ud655\ub3c4\uac00 \uacc4\uc218 \ud574\uc11d\ubcf4\ub2e4 \uc55e\uc11c\ub294 \uc790\ub9ac\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p dir=\"auto\">\ub450 model \uc758 \uc815\ud655\ub3c4\ub97c \uac19\uc740 data \uc5d0\uc11c \ube44\uad50\ud55c \uc2e4\ud589\uc774 <a href=\"#appendix-b-python-implementation\">Appendix B<\/a> \uc5d0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<hr>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix A. Terminology<\/h2><a id=\"user-content-appendix-a-terminology\" class=\"anchor\" aria-label=\"Permalink: Appendix A. Terminology\" href=\"#appendix-a-terminology\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li>\n<strong>affine transform<\/strong>: \uc120\ud615 \ubcc0\ud658\uc5d0 \uc0c1\uc218 \uc774\ub3d9\uc744 \ub354\ud55c \ubcc0\ud658. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$y = ax + b$<\/math-renderer> \uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$b \\neq 0$<\/math-renderer> \uc774\uba74 \uc5ec\uae30\uc5d0 \uc18d\ud55c\ub2e4.<\/li>\n<li>\n<strong>basis expansion<\/strong>: \uc785\ub825 \ubcc0\uc218\ub97c \ubbf8\ub9ac \uc815\ud55c \ud568\uc218\uc758 \uac12\uc73c\ub85c \ubc14\uafb8\uc5b4 \uc5f4\uc744 \ub298\ub9ac\ub294 \ubcc0\ud658. Power term, spline, RBF \uac00 \uc5ec\uae30\uc5d0 \uc18d\ud55c\ub2e4.<\/li>\n<li>\n<strong>closed-form solution<\/strong>: \ubc18\ubcf5 \uc5c6\uc774 \uc2dd \ud558\ub098\ub85c \uc5bb\ub294 \ud574. \ucd5c\uc18c\uc81c\uacf1\ubc95\uc758 \uc815\uaddc\ubc29\uc815\uc2dd\uc774 \uadf8 \uc608\uc774\ub2e4.<\/li>\n<li>\n<strong>interaction<\/strong>: \ub450 \ubcc0\uc218\uac00 \ud568\uaed8 \uc6c0\uc9c1\uc77c \ub54c\ub9cc \ub098\ud0c0\ub098\ub294 \uae30\uc5ec. \uacf1\ud55c \uc5f4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_1 x_2$<\/math-renderer> \ub85c \ub2f4\ub294\ub2e4.<\/li>\n<li>\n<strong>kernel method<\/strong>: \uc785\ub825\uc744 \uc9c1\uc811 \ubcc0\ud658\ud558\uc9c0 \uc54a\uace0 \ub450 \ud45c\ubcf8 \uc0ac\uc774\uc758 \ub0b4\uc801\uc73c\ub85c \ube44\uc120\ud615 \uad00\uacc4\ub97c \ub2f4\ub294 \ubc29\ubc95.<\/li>\n<li>\n<strong>RBF<\/strong>: Radial basis function. \uc911\uc2ec\uc5d0\uc11c\uc758 \uac70\ub9ac\ub85c \uac12\uc774 \uc815\ud574\uc9c0\ub294 \uae30\uc800 \ud568\uc218.<\/li>\n<li>\n<strong>SHAP<\/strong>: SHapley Additive exPlanations. \uac01 \ubcc0\uc218\uac00 \ud55c \uc608\uce21\uc5d0 \uae30\uc5ec\ud55c \ubaab\uc744 Shapley value \ub85c \ub098\ub204\uc5b4 \ub0b4\ub193\ub294 XAI \ubc29\ubc95.<\/li>\n<li>\n<strong>spline<\/strong>: \uad6c\uac04\uc744 \ub098\ub204\ub294 \uc810\ub9c8\ub2e4 \ub0ae\uc740 \ucc28\uc218\uc758 \ub2e4\ud56d\uc2dd\uc744 \uc774\uc5b4 \ubd99\uc778 \ud568\uc218.<\/li>\n<li>\n<strong>tree ensemble<\/strong>: \uc5ec\ub7ec \uacb0\uc815 tree \uc758 \uc608\uce21\uc744 \ubaa8\uc544 \uc4f0\ub294 model. Random Forest \uc640 gradient boosting \uc774 \uc5ec\uae30\uc5d0 \uc18d\ud55c\ub2e4.<\/li>\n<li>\n<strong>underfitting<\/strong>: Model \uc758 \ud45c\ud604\ub825\uc774 \ubaa8\uc790\ub77c training data \uc5d0\uc11c\ub3c4 \uc624\ucc28\uac00 \ud070 \uc0c1\ud0dc.<\/li>\n<li>\n<strong>XAI<\/strong>: Explainable AI. Model \uc774 \ub0b4\ub193\uc740 \uc608\uce21\uc758 \uadfc\uac70\ub97c \uc0ac\ub78c\uc774 \uc77d\uc744 \uc218 \uc788\uac8c \ud558\ub294 \ubc29\ubc95.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix B. Python Implementation<\/h2><a id=\"user-content-appendix-b-python-implementation\" class=\"anchor\" aria-label=\"Permalink: Appendix B. Python Implementation\" href=\"#appendix-b-python-implementation\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ub450 model \uc744 \uac19\uc740 data \uc5d0 \uc801\uc6a9\ud574 \uc815\ud655\ub3c4\ub97c \ube44\uad50\ud569\ub2c8\ub2e4.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import numpy as np\nfrom sklearn.ensemble import HistGradientBoostingRegressor\nfrom sklearn.linear_model import Ridge\nfrom sklearn.metrics import r2_score\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.preprocessing import PolynomialFeatures\n\n# --- synthetic data with one curvature term and one interaction term ---\nrng = np.random.default_rng(0)\nn_samples = 400\nx1 = rng.uniform(-3, 3, size=n_samples)\nx2 = rng.uniform(-3, 3, size=n_samples)\ny = 3 + 2 * x1 - x2 + 1.5 * x1 ** 2 + 0.8 * x1 * x2 + rng.normal(0, 1.0, size=n_samples)\n\nX = np.column_stack([x1, x2])\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=0)\n\n# the baseline: a linear model on the original columns\nplain = Ridge(alpha=1.0).fit(X_train, y_train)\n\n# the feature-intensive model: the analyst adds the power and interaction columns\nfeature_intensive = make_pipeline(\n    PolynomialFeatures(degree=2, include_bias=False), Ridge(alpha=1.0)\n).fit(X_train, y_train)\n\n# the algorithm-intensive model: the algorithm splits the original columns on its own\nalgorithm_intensive = HistGradientBoostingRegressor(max_depth=3, random_state=0).fit(X_train, y_train)\n\nfor name, model in ((&quot;linear model, original columns&quot;, plain),\n                    (&quot;feature-intensive: Ridge on degree-2 columns&quot;, feature_intensive),\n                    (&quot;algorithm-intensive: HistGradientBoostingRegressor&quot;, algorithm_intensive)):\n    print(f&quot;{name:50s} R2 = {r2_score(y_test, model.predict(X_test)):.4f}&quot;)\n\n# the coefficients the feature-intensive model reads out, one per term of equation (3)\nterm_names = feature_intensive[0].get_feature_names_out([&quot;x1&quot;, &quot;x2&quot;])\nprint(&quot;feature-intensive coefficients:&quot;,\n      dict(zip(term_names, np.round(feature_intensive[1].coef_, 3))))\"><pre><span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">numpy<\/span> <span class=\"pl-k\">as<\/span> <span class=\"pl-s1\">np<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">ensemble<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">HistGradientBoostingRegressor<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">linear_model<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">Ridge<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">metrics<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">r2_score<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">model_selection<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">train_test_split<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">pipeline<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">make_pipeline<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">preprocessing<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">PolynomialFeatures<\/span>\n\n<span class=\"pl-c\"># --- synthetic data with one curvature term and one interaction term ---<\/span>\n<span class=\"pl-s1\">rng<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">random<\/span>.<span class=\"pl-c1\">default_rng<\/span>(<span class=\"pl-c1\">0<\/span>)\n<span class=\"pl-s1\">n_samples<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-c1\">400<\/span>\n<span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">rng<\/span>.<span class=\"pl-c1\">uniform<\/span>(<span class=\"pl-c1\">-<\/span><span class=\"pl-c1\">3<\/span>, <span class=\"pl-c1\">3<\/span>, <span class=\"pl-s1\">size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">n_samples<\/span>)\n<span class=\"pl-s1\">x2<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">rng<\/span>.<span class=\"pl-c1\">uniform<\/span>(<span class=\"pl-c1\">-<\/span><span class=\"pl-c1\">3<\/span>, <span class=\"pl-c1\">3<\/span>, <span class=\"pl-s1\">size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">n_samples<\/span>)\n<span class=\"pl-s1\">y<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-c1\">3<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-c1\">2<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">-<\/span> <span class=\"pl-s1\">x2<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-c1\">1.5<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">**<\/span> <span class=\"pl-c1\">2<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-c1\">0.8<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x1<\/span> <span class=\"pl-c1\">*<\/span> <span class=\"pl-s1\">x2<\/span> <span class=\"pl-c1\">+<\/span> <span class=\"pl-s1\">rng<\/span>.<span class=\"pl-c1\">normal<\/span>(<span class=\"pl-c1\">0<\/span>, <span class=\"pl-c1\">1.0<\/span>, <span class=\"pl-s1\">size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">n_samples<\/span>)\n\n<span class=\"pl-c1\">X<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">column_stack<\/span>(&#91;<span class=\"pl-s1\">x1<\/span>, <span class=\"pl-s1\">x2<\/span>&#93;)\n<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-v\">X_test<\/span>, <span class=\"pl-s1\">y_train<\/span>, <span class=\"pl-s1\">y_test<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">train_test_split<\/span>(<span class=\"pl-c1\">X<\/span>, <span class=\"pl-s1\">y<\/span>, <span class=\"pl-s1\">test_size<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">0.3<\/span>, <span class=\"pl-s1\">random_state<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">0<\/span>)\n\n<span class=\"pl-c\"># the baseline: a linear model on the original columns<\/span>\n<span class=\"pl-s1\">plain<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">Ridge<\/span>(<span class=\"pl-s1\">alpha<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">1.0<\/span>).<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-s1\">y_train<\/span>)\n\n<span class=\"pl-c\"># the feature-intensive model: the analyst adds the power and interaction columns<\/span>\n<span class=\"pl-s1\">feature_intensive<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">make_pipeline<\/span>(\n    <span class=\"pl-en\">PolynomialFeatures<\/span>(<span class=\"pl-s1\">degree<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">2<\/span>, <span class=\"pl-s1\">include_bias<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>), <span class=\"pl-en\">Ridge<\/span>(<span class=\"pl-s1\">alpha<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">1.0<\/span>)\n).<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-s1\">y_train<\/span>)\n\n<span class=\"pl-c\"># the algorithm-intensive model: the algorithm splits the original columns on its own<\/span>\n<span class=\"pl-s1\">algorithm_intensive<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">HistGradientBoostingRegressor<\/span>(<span class=\"pl-s1\">max_depth<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">3<\/span>, <span class=\"pl-s1\">random_state<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">0<\/span>).<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-v\">X_train<\/span>, <span class=\"pl-s1\">y_train<\/span>)\n\n<span class=\"pl-k\">for<\/span> <span class=\"pl-s1\">name<\/span>, <span class=\"pl-s1\">model<\/span> <span class=\"pl-c1\">in<\/span> ((<span class=\"pl-s\">\"linear model, original columns\"<\/span>, <span class=\"pl-s1\">plain<\/span>),\n                    (<span class=\"pl-s\">\"feature-intensive: Ridge on degree-2 columns\"<\/span>, <span class=\"pl-s1\">feature_intensive<\/span>),\n                    (<span class=\"pl-s\">\"algorithm-intensive: HistGradientBoostingRegressor\"<\/span>, <span class=\"pl-s1\">algorithm_intensive<\/span>)):\n    <span class=\"pl-en\">print<\/span>(<span class=\"pl-s\">f\"<span class=\"pl-s1\"><span class=\"pl-kos\">{<\/span><span class=\"pl-s1\">name<\/span>:50s<span class=\"pl-kos\">}<\/span><\/span> R2 = <span class=\"pl-s1\"><span class=\"pl-kos\">{<\/span><span class=\"pl-en\">r2_score<\/span>(<span class=\"pl-s1\">y_test<\/span>, <span class=\"pl-s1\">model<\/span>.<span class=\"pl-c1\">predict<\/span>(<span class=\"pl-v\">X_test<\/span>)):.4f<span class=\"pl-kos\">}<\/span><\/span>\"<\/span>)\n\n<span class=\"pl-c\"># the coefficients the feature-intensive model reads out, one per term of equation (3)<\/span>\n<span class=\"pl-s1\">term_names<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">feature_intensive<\/span>&#91;<span class=\"pl-c1\">0<\/span>&#93;.<span class=\"pl-c1\">get_feature_names_out<\/span>(&#91;<span class=\"pl-s\">\"x1\"<\/span>, <span class=\"pl-s\">\"x2\"<\/span>&#93;)\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s\">\"feature-intensive coefficients:\"<\/span>,\n      <span class=\"pl-en\">dict<\/span>(<span class=\"pl-en\">zip<\/span>(<span class=\"pl-s1\">term_names<\/span>, <span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">round<\/span>(<span class=\"pl-s1\">feature_intensive<\/span>&#91;<span class=\"pl-c1\">1<\/span>&#93;.<span class=\"pl-c1\">coef_<\/span>, <span class=\"pl-c1\">3<\/span>))))<\/pre><\/div>\n<p dir=\"auto\">\uccab \uc138 \uc904\uc774 \uc138 model \uc758 held-out <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$R^2$<\/math-renderer> \uc774\uace0, \ub9c8\uc9c0\ub9c9 \uc904\uc774 Feature-Intensive Model \uc774 \uc77d\uc5b4 \ub0b4\ub294 \ud56d\ub9c8\ub2e4\uc758 \uacc4\uc218\uc785\ub2c8\ub2e4.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"linear model, original columns                     R2 = 0.4735\nfeature-intensive: Ridge on degree-2 columns       R2 = 0.9782\nalgorithm-intensive: HistGradientBoostingRegressor R2 = 0.9689\nfeature-intensive coefficients: {'x1': np.float64(1.963), 'x2': np.float64(-1.015), 'x1^2': np.float64(1.516), 'x1 x2': np.float64(0.76), 'x2^2': np.float64(0.005)}\"><pre lang=\"text\" class=\"notranslate\"><code>linear model, original columns                     R2 = 0.4735\nfeature-intensive: Ridge on degree-2 columns       R2 = 0.9782\nalgorithm-intensive: HistGradientBoostingRegressor R2 = 0.9689\nfeature-intensive coefficients: {'x1': np.float64(1.963), 'x2': np.float64(-1.015), 'x1^2': np.float64(1.516), 'x1 x2': np.float64(0.76), 'x2^2': np.float64(0.005)}\n<\/code><\/pre><\/div>\n<p dir=\"auto\">\uacc4\uc218 \ub124 \uac1c\ub294 data \ub97c \ub9cc\ub4e0 \uc2dd\uc758 \uacc4\uc218 2, -1, 1.5, 0.8 \uc744 \ub418\ucc3e\uc558\uace0, \uc2dd\uc5d0 \uc5c6\ub358 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$x_2^2$<\/math-renderer> \uc758 \uacc4\uc218\ub294 0.005 \ub85c \ub0a8\uc558\uc2b5\ub2c8\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix C. Two Views of Linearity<\/h2><a id=\"user-content-appendix-c-two-views-of-linearity\" class=\"anchor\" aria-label=\"Permalink: Appendix C. Two Views of Linearity\" href=\"#appendix-c-two-views-of-linearity\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li>\uc120\ud615\ub300\uc218\ud559\uc758 \uc120\ud615\uc131: \uac00\uc0b0\uc131 ($f(x+y)=f(x)+f(y)$) \uacfc \ub3d9\ucc28\uc131 ($f(cx)=cf(x)$) \uc744 \ub9cc\uc871\ud574\uc57c \ud558\uba70, \ubc18\ub4dc\uc2dc \uc6d0\uc810\uc744 \uc9c0\ub098\uc57c \ud568 (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$y=ax+b$<\/math-renderer> \uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"20e4175e3cabd14feff15ea5ba5d42a9\">$b \\neq 0$<\/math-renderer> \uc774\uba74 affine transform).<\/li>\n<li>\ub3c4\uba54\uc778\/\uacf5\ud559\uc5d0\uc11c\uc758 \uc120\ud615\uc131: \uc9c1\uc120 \ubc0f \ube44\ub840 \uad00\uacc4\ub97c \uc758\ubbf8\ud558\uba70, \uc120\ud615\ub300\uc218\uc758 \uc5c4\ubc00\ud55c \uc815\uc758\ubcf4\ub2e4 \ud655\uc7a5\ub41c \uc758\ubbf8\ub85c \uc0ac\uc6a9\ub428.<\/li>\n<\/ul>\n<\/article><\/div><\/div><\/p>\n<\/div><\/div>\n<\/div><\/div><\/div>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>\ud83c\uddfa\ud83c\uddf8\ud83c\uddf0\ud83c\uddf7 A model&#8217;s linearity is first order in the weights; a data set&#8217;s non-linearity is curvature and interaction between variables. Transforming the inputs leaves the first structure intact, so which side absorbs the curvature splits two strategies: a linear model fed engineered terms, or a non-linear model fed the raw columns.<\/p>\n","protected":false},"author":4,"featured_media":7148,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","fifu_image_url":"","fifu_image_alt":"","iawp_total_views":9,"footnotes":""},"categories":[56,392],"tags":[386,444,443,445],"class_list":["post-7147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science-slug","category-models-slug","tag-github-hosted","tag-linear-property","tag-linearity","tag-non-linear-property"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":1,"sum_votes":2},"jetpack_featured_media_url":"https:\/\/ykim.synology.me\/wordpress\/wp-content\/uploads\/2026\/09\/reeses-peanut-butter-pumpkins-candy.jpg","_links":{"self":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/comments?post=7147"}],"version-history":[{"count":2,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7147\/revisions"}],"predecessor-version":[{"id":7151,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7147\/revisions\/7151"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media\/7148"}],"wp:attachment":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media?parent=7147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/categories?post=7147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/tags?post=7147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}