{"id":7052,"date":"2026-09-09T00:13:37","date_gmt":"2026-09-09T05:13:37","guid":{"rendered":"https:\/\/ykim.synology.me\/wordpress\/polynomial-feature-expansion-korean-7052\/"},"modified":"2026-11-26T22:34:44","modified_gmt":"2026-11-27T04:34:44","slug":"polynomial-feature-expansion-korean","status":"publish","type":"post","link":"https:\/\/ykim.synology.me\/wordpress\/polynomial-feature-expansion-korean-7052\/","title":{"rendered":"Polynomial Feature Expansion"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/yBarn1\/Images\/main\/parks\/harper-park-swing-bench.jpg\" alt=\"\" style=\"width:auto;height:500px\"\/><\/figure>\n\n\n<style>.kt-tabs-id7052_17187a-53 > .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-id7052_17187a-53 > .kt-tabs-title-list li{margin-top:0px;margin-right:8px;margin-bottom:0px;margin-left:0px;}.wp-block-kadence-tabs .kt-tabs-id7052_17187a-53 > .kt-tabs-title-list li:last-child{margin-right:0px;}.wp-block-kadence-tabs .kt-tabs-id7052_17187a-53 > .kt-tabs-title-list li .kt-tab-title, .wp-block-kadence-tabs .kt-tabs-id7052_17187a-53 > .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-id7052_17187a-53 > .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-id7052_17187a-53 > .kt-tabs-title-list li .kt-tab-title:hover, .wp-block-kadence-tabs .kt-tabs-id7052_17187a-53 > .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-id7052_17187a-53 > .kt-tabs-title-list li.kt-tab-title-active .kt-tab-title, .wp-block-kadence-tabs .kt-tabs-id7052_17187a-53 > .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-id7052_17187a-53 > .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-id7052_17187a-53 > .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-id7052_17187a-53 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-tab7052_2b2795-32\"><div class=\"kt-tab-inner-content-inner\"><p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"Feature-Engineering\/PFE\/polynomial-feature-expansion.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">Polynomial Feature Expansion<\/h1><a id=\"user-content-polynomial-feature-expansion\" class=\"anchor\" aria-label=\"Permalink: Polynomial Feature Expansion\" href=\"#polynomial-feature-expansion\"><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 88 | Created: 2026-09-09 | 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-objective\">3. Objective<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#31-power-term\">3.1 Power Term<\/a><\/li>\n<li><a href=\"#32-interaction-term\">3.2 Interaction Term<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#4-mechanism\">4. Mechanism<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#41-expansion\">4.1 Expansion<\/a><\/li>\n<li><a href=\"#42-standardization\">4.2 Standardization<\/a><\/li>\n<li><a href=\"#43-conditioning\">4.3 Conditioning<\/a><\/li>\n<li><a href=\"#44-heredity\">4.4 Heredity<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#5-caution\">5. Caution<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#51-dimensionality-and-overfitting\">5.1 Dimensionality And Overfitting<\/a><\/li>\n<li><a href=\"#52-regularization\">5.2 Regularization<\/a><\/li>\n<li><a href=\"#53-evidence\">5.3 Evidence<\/a><\/li>\n<li><a href=\"#54-failure-modes\">5.4 Failure Modes<\/a><\/li>\n<li><a href=\"#55-diagnostics\">5.5 Diagnostics<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#6-further-work\">6. Further Work<\/a><\/li>\n<li><a href=\"#references\">References<\/a><\/li>\n<li><a href=\"#appendix-a-terminology\">Appendix A. Terminology<\/a><\/li>\n<li><a href=\"#appendix-b-covariance\">Appendix B. Covariance<\/a><\/li>\n<li><a href=\"#appendix-c-correlation-of-a-variable-and-its-square\">Appendix C. Correlation Of A Variable And Its Square<\/a><\/li>\n<li><a href=\"#appendix-d-term-count-derivation\">Appendix D. Term Count Derivation<\/a><\/li>\n<li><a href=\"#appendix-e-ridge-and-lasso-on-expanded-columns\">Appendix E. Ridge And Lasso On Expanded Columns<\/a><\/li>\n<li><a href=\"#appendix-f-implementation\">Appendix F. Implementation<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#f1-options\">F.1 Options<\/a><\/li>\n<li><a href=\"#f2-pipeline\">F.2 Pipeline<\/a><\/li>\n<li><a href=\"#f3-cost\">F.3 Cost<\/a><\/li>\n<li><a href=\"#f4-selective-expansion\">F.4 Selective Expansion<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p dir=\"auto\">Polynomial feature expansion is the operation that builds both the powers of one variable and the products of distinct variables. This document covers modelling the non-linear behaviour of numeric tabular data with those two kinds of column.<\/p>\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>\n<strong>Problem Statement<\/strong>: Numeric tabular data has cases that are hard to express with a linear model.<\/li>\n<li>\n<strong>Goal<\/strong>: To build a non-linear model by adding the power terms of the original variables (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x^3$<\/math-renderer>) and the interaction terms (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1 \\ast x_2$<\/math-renderer>).<\/li>\n<li>\n<strong>Non-Goal<\/strong>: Derived variables are not covered, and the learning on the expanded data set 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\">An expansion computes products and powers from the columns already in the table and appends them as new columns, leaving the rows as they are and growing only the columns. A table with the columns <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2$<\/math-renderer> becomes a table with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1 x_2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2^2$<\/math-renderer>, and those three new columns are what give a linear model a curve and an interaction between variables.<\/p>\n<p dir=\"auto\">What it costs is the rising column count. Once the column count nears the row count the coefficients, the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta$<\/math-renderer> values that multiply the columns, can no longer be pinned to one solution (section 5.1).<\/p>\n<p dir=\"auto\">To lessen that curse of dimensionality, the three below are set as the defaults. A default is what is kept until the data gives a reason to do otherwise, and together the three leave the column count well under the row count and keep those <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta$<\/math-renderer> from moving far when the sample is drawn again.<\/p>\n<ul dir=\"auto\">\n<li>\n<strong>Degree 2<\/strong> \u2014 The terms built are limited to the square of one variable and the product of two (section 5.1).<\/li>\n<li>\n<strong>Standardization<\/strong> \u2014 Each column is brought to mean 0 and standard deviation 1 before and after the expansion. Subtracting the mean lowers the correlation between the columns and leaves the coefficients readable; dividing by the standard deviation removes the differences in column size, so the penalty falls evenly (sections 4.2, 4.3 and 5.2).<\/li>\n<li>\n<strong>Penalty<\/strong> \u2014 The expanded columns carry a ridge or a lasso. Ridge divides every <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta$<\/math-renderer> by the same factor without ever reaching zero, and lasso sets the small ones to exactly zero (section 5.2).<\/li>\n<\/ul>\n<p dir=\"auto\">Standardization and the penalty are the two that get skipped. In uncentered physical units the correlation between <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x^2$<\/math-renderer> is close to 1 (section 4.2), and the columns the expansion makes are not orthogonal to one another even where the raw variables are. So the failure of an expansion arrives not as a model that fits the data badly but as coefficients whose signs flip each time the sample is drawn again. Centering lowers that correlation without taking it to zero (section 4.2), so the sign flips do not go away on centering alone. What is left falls to the penalty, which keeps the columns that resemble one another from carrying large coefficients that cancel (section 5.2).<\/p>\n<p dir=\"auto\">Where the expansion should not be used is equally clear. Past a few dozen variables the column count passes the sample count, a shape that bends several times inside one variable calls for a spline rather than a higher degree, and where prediction outside the training range is needed the way a polynomial diverges beyond that range, its extrapolation behaviour, is itself the risk.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Objective<\/h2><a id=\"user-content-3-objective\" class=\"anchor\" aria-label=\"Permalink: 3. Objective\" href=\"#3-objective\"><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\">An expansion is aimed at two things, a non-linear relationship inside one variable and an interaction between variables, neither of which a linear model expresses. The first is carried by a power term, the second by an interaction term, and both are put into the columns so that the model itself stays linear.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1 Power Term<\/h3><a id=\"user-content-31-power-term\" class=\"anchor\" aria-label=\"Permalink: 3.1 Power Term\" href=\"#31-power-term\"><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 non-linear relationship inside one variable is carried by the powers of that variable, its power terms. Adding <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x^2$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x^3$<\/math-renderer> to a variable <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x$<\/math-renderer>, the model learns equation (1) and draws a curve while staying linear in its coefficients.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\hat{y} = \\beta_0 + \\beta_1 x + \\beta_2 x^2 + \\beta_3 x^3 \\hspace{19em} (1)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Linear here is about the coefficients <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta$<\/math-renderer> rather than about <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x$<\/math-renderer>, which is why least squares, the solve that picks the coefficients minimizing the sum of the squared residuals, carries over as it is. The coefficient <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_2$<\/math-renderer> carries one bend, a peak or a saturation, and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_3$<\/math-renderer> carries a second one. The non-linearity sits in the columns rather than in the model, so the linear model already in use, and the inference and the penalty built on it, are kept as they are.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.2 Interaction Term<\/h3><a id=\"user-content-32-interaction-term\" class=\"anchor\" aria-label=\"Permalink: 3.2 Interaction Term\" href=\"#32-interaction-term\"><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 interaction between variables is carried by the product of two distinct variables, an interaction term. Adding the product <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1 x_2$<\/math-renderer> to the variables <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2$<\/math-renderer> gives equation (2).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\hat{y} = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\beta_3 x_1 x_2 \\hspace{19em} (2)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The product term lets one variable change the slope of another. Differentiating equation (2) with respect to <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer> gives equation (3), which says as much.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\frac{\\partial \\hat{y}}{\\partial x_1} = \\beta_1 + \\beta_3 x_2 \\hspace{19em} (3)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_3$<\/math-renderer> is not zero the effect of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer> differs at each level of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2$<\/math-renderer>. On a process it reads as the effect of pressure depending on the temperature, which the first-order terms of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2$<\/math-renderer> alone cannot write. An effect that appears only when the two variables are high together is carried by this product term and nowhere else. The long practice of writing a response surface, the surface the response traces over the process conditions, as a second-order polynomial is curvature and interaction combined, and reading the optimum off the point where that surface has zero slope, its stationary point, came from there [<a href=\"#ref-1\">1<\/a>].<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Mechanism<\/h2><a id=\"user-content-4-mechanism\" class=\"anchor\" aria-label=\"Permalink: 4. Mechanism\" href=\"#4-mechanism\"><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 Expansion<\/h3><a id=\"user-content-41-expansion\" class=\"anchor\" aria-label=\"Permalink: 4.1 Expansion\" href=\"#41-expansion\"><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 columns an expansion makes are monomials, terms formed by multiplying powers of the raw variables. With <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> variables and a highest degree of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d$<\/math-renderer>, the new columns are the set of equation (4).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\Phi_d(\\mathbf{x}) = \\left\\lbrace \\prod_{i=1}^{n} x_i^{a_i} \\ \\middle|\\ a_i \\in \\mathbb{Z}_{\\ge 0}, \\ 1 \\le \\sum_{i=1}^{n} a_i \\le d \\right\\rbrace \\hspace{19em} (4)$$<\/math-renderer><\/p>\n<p dir=\"auto\">For <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$[X_1, X_2]$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 2$<\/math-renderer> the columns, including the intercept that is a constant column of ones, are <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$[1, X_1, X_2, X_1^2, X_1 X_2, X_2^2]$<\/math-renderer>, which holds the square terms of section 3.1 and the product term of section 3.2 together. Written for <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> variables the second-order model is equation (5).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$y = \\beta_0 + \\sum_{i=1}^{n} \\beta_i x_i + \\sum_{1 \\le i \\le j \\le n} \\beta_{ij} x_i x_j + \\varepsilon \\hspace{19em} (5)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.2 Standardization<\/h3><a id=\"user-content-42-standardization\" class=\"anchor\" aria-label=\"Permalink: 4.2 Standardization\" href=\"#42-standardization\"><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\">Bring each column to mean 0 and standard deviation 1 before expanding.<\/p>\n<blockquote>\n<p dir=\"auto\"><strong>Definition: Standardization<\/strong><br>\nSubtracting the mean from each column and dividing by its standard deviation, so that the column has mean 0 and standard deviation 1, is standardization.<\/p>\n<\/blockquote>\n<blockquote>\n<p dir=\"auto\"><strong>Definition: Centering<\/strong><br>\nThe part of standardization that subtracts the mean alone is centering.<\/p>\n<\/blockquote>\n<p dir=\"auto\">The two parts do different work. Subtracting the mean lowers the correlation between the columns and leaves the coefficients readable, which is the two paragraphs below; dividing by the standard deviation removes the differences in column size, and that part is sections 4.3 and 5.2.<\/p>\n<p dir=\"auto\">The first reason to center is the drop in correlation. For two variables <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$Y$<\/math-renderer> the covariance and the correlation are defined as equation (6) and equation (7), where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$E[\\cdot]$<\/math-renderer> is the expected value and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{sd}$<\/math-renderer> is the standard deviation.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{Cov}(X, Y) = E[XY] - E[X]E[Y] \\hspace{19em} (6)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$r(X, Y) = \\frac{\\mathrm{Cov}(X, Y)}{\\mathrm{sd}(X) \\cdot \\mathrm{sd}(Y)} \\hspace{19em} (7)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Setting <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X = x$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$Y = x^2$<\/math-renderer>, taking the samples <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1, \\dots, x_N$<\/math-renderer> with mean <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x}$<\/math-renderer> and deviations <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$u_i = x_i - \\overline{x}$<\/math-renderer>, and reducing to the moments of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$u$<\/math-renderer> gives equation (8). There <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t = \\overline{x} \/ \\sqrt{\\overline{u^2}}$<\/math-renderer> measures how many spreads the mean sits away from zero, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s = \\overline{u^3} \/ (\\overline{u^2})^{3\/2}$<\/math-renderer> how far the distribution leans to one side, its skewness, and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k = \\overline{u^4} \/ (\\overline{u^2})^2$<\/math-renderer> the weight of its tails, its kurtosis; an overline is the sample mean. The steps between are in <a href=\"#appendix-c-correlation-of-a-variable-and-its-square\">Appendix C<\/a>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$r(x, x^2) = \\frac{2t + s}{\\sqrt{k - 1 + 4t^2 + 4ts}} \\hspace{19em} (8)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Centering takes <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x}$<\/math-renderer> to 0, which forces <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t = 0$<\/math-renderer> and leaves <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> untouched, so equation (8) reduces to equation (9).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$r(u, u^2) = \\frac{s}{\\sqrt{k - 1}} \\hspace{19em} (9)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The difference between the two equations is the ground for centering. Raise <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lvert t \\rvert$<\/math-renderer> in equation (8) and the numerator approaches <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$2t$<\/math-renderer> while the denominator approaches <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$2 \\lvert t \\rvert$<\/math-renderer>, so <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lvert r \\rvert$<\/math-renderer> goes to 1. Since <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t$<\/math-renderer> measures how many spreads the mean sits away from zero, it is large on data in physical units, which is why the correlation between <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x^2$<\/math-renderer> there reaches 1. Equation (9) carries no <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t$<\/math-renderer>. The correlation after centering is set by the shape alone, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer>, independent of where the mean sits, and it is exactly 0 for a symmetric distribution, where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s = 0$<\/math-renderer>.<\/p>\n<p dir=\"auto\">The second reason to center is interpretation. On centered data <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_1$<\/math-renderer> is the slope while the other variables sit at their means, a readable quantity. Uncentered it is the slope while the other variables are zero, and that zero is often a point the data never visits [<a href=\"#ref-2\">2<\/a>].<\/p>\n<p dir=\"auto\">Centering lowers the correlation, though, without removing it. The collinearity an expansion manufactures is a property of the expansion rather than of the data, so a penalty is needed alongside it (section 5.2).<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.3 Conditioning<\/h3><a id=\"user-content-43-conditioning\" class=\"anchor\" aria-label=\"Permalink: 4.3 Conditioning\" href=\"#43-conditioning\"><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\">Conditioning is how sensitive solving the design matrix is to a small error in the input, and the number that measures it is the condition number.<\/p>\n<p dir=\"auto\">The design matrix is the matrix whose rows are the observations and whose columns are the terms the model uses. The least squares of section 3.1 picks the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\boldsymbol{\\beta}$<\/math-renderer> that minimizes the sum of the squared residuals, and that <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\boldsymbol{\\beta}$<\/math-renderer> is the solution of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{X}^{\\top} \\mathbf{X} \\boldsymbol{\\beta} = \\mathbf{X}^{\\top} \\mathbf{y}$<\/math-renderer>, written in the design matrix <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{X}$<\/math-renderer> and the response <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{y}$<\/math-renderer>, so fitting the model, that is settling on the coefficient values the data implies, is solving this matrix. Finding <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\boldsymbol{\\beta}$<\/math-renderer> in equation (1) and equation (2) is that same solve: equation (1) builds a design matrix whose columns are <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$[1, x, x^2, x^3]$<\/math-renderer> and equation (2) one whose columns are <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$[1, x_1, x_2, x_1 x_2]$<\/math-renderer>, and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\boldsymbol{\\beta}$<\/math-renderer> is the solution of the system written in that matrix. Written one row per observation, the system of equation (1) is equation (10), where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_i$<\/math-renderer> is the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$i$<\/math-renderer>-th observation and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$y_i$<\/math-renderer> its response. Those <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$N$<\/math-renderer> equations gathered into one line are <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{X} \\boldsymbol{\\beta} = \\mathbf{y}$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$y_i = \\beta_0 + \\beta_1 x_i + \\beta_2 x_i^2 + \\beta_3 x_i^3, \\qquad i = 1, \\dots, N \\hspace{12em} (10)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The definition is equation (11). For a linear system <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{A}\\mathbf{z} = \\mathbf{b}$<\/math-renderer>, the factor by which a relative error in the right-hand side <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{b}$<\/math-renderer> can grow in the solution <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{z}$<\/math-renderer> is bounded by the condition number <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\kappa(\\mathbf{A})$<\/math-renderer> of the coefficient matrix, which is the ratio of the largest singular value to the smallest.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\frac{\\lVert \\Delta \\mathbf{z} \\rVert}{\\lVert \\mathbf{z} \\rVert} \\le \\kappa(\\mathbf{A}) \\frac{\\lVert \\Delta \\mathbf{b} \\rVert}{\\lVert \\mathbf{b} \\rVert}, \\qquad \\kappa(\\mathbf{A}) = \\frac{\\sigma_{\\max}}{\\sigma_{\\min}} \\hspace{12em} (11)$$<\/math-renderer><\/p>\n<p dir=\"auto\">A condition number is therefore not a ratio of input to output but a bound on how far a relative error grows. The values in this document are the condition number <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\kappa(\\mathbf{X})$<\/math-renderer> of the design matrix; that of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{X}^{\\top} \\mathbf{X}$<\/math-renderer>, the coefficient matrix of the normal equations, is its square. Written for the case of equation (10), equation (11) has <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{A} = \\mathbf{X}^{\\top} \\mathbf{X}$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{z} = \\boldsymbol{\\beta}$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{b} = \\mathbf{X}^{\\top} \\mathbf{y}$<\/math-renderer>, which is equation (12).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\frac{\\lVert \\Delta \\boldsymbol{\\beta} \\rVert}{\\lVert \\boldsymbol{\\beta} \\rVert} \\le \\kappa(\\mathbf{X})^2 \\frac{\\lVert \\Delta \\mathbf{X}^{\\top} \\mathbf{y} \\rVert}{\\lVert \\mathbf{X}^{\\top} \\mathbf{y} \\rVert} \\hspace{12em} (12)$$<\/math-renderer><\/p>\n<p dir=\"auto\">What raises the condition number is the degree and the collinearity between the columns; what lowers it is standardization. Subtracting the mean cuts the overlap between the columns and dividing by the standard deviation removes the differences in their size, so both parts are needed to take the condition number lowest.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.4 Heredity<\/h3><a id=\"user-content-44-heredity\" class=\"anchor\" aria-label=\"Permalink: 4.4 Heredity\" href=\"#44-heredity\"><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\">Keep a product term, and the main effects composing it stay as well. The rule is called heredity, and its ground is the coordinate system rather than statistics.<\/p>\n<p dir=\"auto\">Substituting the shift <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1 = z_1 + a$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2 = z_2 + b$<\/math-renderer> into a product-only model such as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$y = \\beta_{12} x_1 x_2$<\/math-renderer> gives equation (13).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\beta_{12} (z_1 + a)(z_2 + b) = \\beta_{12} z_1 z_2 + \\beta_{12} b z_1 + \\beta_{12} a z_2 + \\beta_{12} ab \\hspace{19em} (13)$$<\/math-renderer><\/p>\n<p dir=\"auto\">On the right of equation (13), <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_{12} b z_1$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_{12} a z_2$<\/math-renderer> are the first-order terms of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$z_1$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$z_2$<\/math-renderer>, their main effects. They appear on their own, out of the shift of origin alone, with no one having put them in the model. A product model without main effects therefore depends on where the origin was placed, and whether temperature is measured in Celsius or in kelvin changes the model. Put the same shift into a model that keeps the main effects, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$y = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\beta_{12} x_1 x_2$<\/math-renderer>, and the coefficient of the product, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_{12}$<\/math-renderer>, is unchanged while the first-order coefficients become <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_1 + \\beta_{12} b$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_2 + \\beta_{12} a$<\/math-renderer> and the intercept becomes <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_0 + \\beta_1 a + \\beta_2 b + \\beta_{12} ab$<\/math-renderer>; the shape of the model is the same. The shift is absorbed as a rearrangement of the coefficient values, and the fitted surface does not move. There is a practice of dropping a main effect on the weak form of the rule, weak heredity, under which only one of the variables forming the product need be present, but the conditions that justify it almost never hold in practice [<a href=\"#ref-4\">4<\/a>]. Where variable selection is automated it is likewise better to carry heredity as a Bayesian prior or as a constraint on the optimization [<a href=\"#ref-5\">5<\/a>] [<a href=\"#ref-6\">6<\/a>].<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. Caution<\/h2><a id=\"user-content-5-caution\" class=\"anchor\" aria-label=\"Permalink: 5. Caution\" href=\"#5-caution\"><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\">An expansion charges two prices.<\/p>\n<ul dir=\"auto\">\n<li><strong>The column count<\/strong> \u2014 It grows fast, which invites overfitting, a model that fits the training data and misses new data, and raises the cost of the fit. The degree holds it down (section 5.1).<\/li>\n<li><strong>Unsettled coefficients<\/strong> \u2014 The columns an expansion makes resemble one another, so the coefficients move far with the sample. A penalty holds them down (section 5.2).<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.1 Dimensionality And Overfitting<\/h3><a id=\"user-content-51-dimensionality-and-overfitting\" class=\"anchor\" aria-label=\"Permalink: 5.1 Dimensionality And Overfitting\" href=\"#51-dimensionality-and-overfitting\"><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 column count grows as the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d$<\/math-renderer>-th power of the variable count. Covering the space those columns span at one density takes exponentially more observations as their number grows, which is the curse of dimensionality, and an expansion walks into it by adding columns to data whose row count does not move. Without the intercept, the full expansion has the column count of equation (14), and <code>interaction_only<\/code>, which keeps only products of distinct variables, has that of equation (15).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$m_{\\mathrm{full}} = \\binom{n+d}{d} - 1 \\hspace{19em} (14)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$m_{\\mathrm{inter}} = \\sum_{j=1}^{\\min(d,\\ n)} \\binom{n}{j} \\hspace{19em} (15)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Both counts are derived from the set of equation (4) in <a href=\"#appendix-d-term-count-derivation\">Appendix D<\/a>.<\/p>\n<p dir=\"auto\">Table 1. Column count after expansion, original variables included and bias column excluded<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer><\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$m_{\\mathrm{full}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 2$<\/math-renderer>\n<\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$m_{\\mathrm{inter}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 2$<\/math-renderer>\n<\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$m_{\\mathrm{full}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 3$<\/math-renderer>\n<\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$m_{\\mathrm{inter}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 3$<\/math-renderer>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>2<\/td>\n<td>5<\/td>\n<td>3<\/td>\n<td>9<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>20<\/td>\n<td>15<\/td>\n<td>55<\/td>\n<td>25<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>65<\/td>\n<td>55<\/td>\n<td>285<\/td>\n<td>175<\/td>\n<\/tr>\n<tr>\n<td>100<\/td>\n<td>5,150<\/td>\n<td>5,050<\/td>\n<td>176,850<\/td>\n<td>166,750<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">What Table 1 says is that <code>interaction_only<\/code> saves little. At <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 2$<\/math-renderer> the difference is the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> square terms alone, so 5,150 becomes 5,050 at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n = 100$<\/math-renderer>. The option is therefore not switched on to cut the column count; it is where the decision to keep curvature inside one variable out of the model is written down.<\/p>\n<p dir=\"auto\">What actually sets the column count is the degree. Raising <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d$<\/math-renderer> from 2 to 3 takes the columns from 65 to 285 at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n = 10$<\/math-renderer>. As the column count approaches the row count the least-squares solution turns unstable, and past it the solution is not unique, so the ceiling on an expansion is set by the sample count rather than by the degree.<\/p>\n<p dir=\"auto\">The degree is therefore chosen on the error over data kept out of the fit, the held-out error, rather than on theory, and the candidates are few. It is 2 in almost every practical case, data that needs 3 is rare, and a degree of 4 or more that appears to win is a sign that something other than an expansion should be used.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.2 Regularization<\/h3><a id=\"user-content-52-regularization\" class=\"anchor\" aria-label=\"Permalink: 5.2 Regularization\" href=\"#52-regularization\"><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 expanded columns always carry a penalty, a term added to the fitting criterion that charges for the size of the coefficients. The expansion raises the column count and at the same time makes columns that resemble one another, and unpenalized least squares absorbs that resemblance into two large coefficients that cancel, which is why the fit moves far on a small disturbance of the data. Ridge answers it with a penalty proportional to the sum of the squared coefficients, which is what stops the two large coefficients from cancelling [<a href=\"#ref-3\">3<\/a>].<\/p>\n<p dir=\"auto\">Ridge is the default of the two. It divides the coefficient among the columns that resemble one another and steadies the prediction, while lasso keeps one of them and drops the rest. Lasso on expanded columns can keep a product term while deleting its main effects, breaking the heredity of section 4.4, so it is used with a hierarchical constraint rather than on its own [<a href=\"#ref-6\">6<\/a>].<\/p>\n<p dir=\"auto\">That ridge never drives a coefficient to zero means no column can be dropped with it. It is still the default because what a penalty buys on an expansion is not a smaller column count but a steadier prediction, and the size of that is the held-out RMSE of section 5.1 falling from 1.08 to 0.75 at degree 3. Where the column count itself has to come down, that is the work of lasso or elastic net.<\/p>\n<p dir=\"auto\">The penalty acts on the size of a column, so it is applied after the expanded columns are standardized, which is what puts the second standardization into the pipeline of <a href=\"#appendix-f-implementation\">Appendix F<\/a>. The objectives of the three penalties, and how far each of them moves a coefficient, are in <a href=\"#appendix-e-ridge-and-lasso-on-expanded-columns\">Appendix E<\/a>.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.3 Evidence<\/h3><a id=\"user-content-53-evidence\" class=\"anchor\" aria-label=\"Permalink: 5.3 Evidence\" href=\"#53-evidence\"><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\">Fig 1 measures on one data set what the three sections before it state: (a) degree and extrapolation (section 5.1), (b) the condition number (section 4.3), and (c) the held-out error as the column count reaches the row count, with what a penalty buys (section 5.2).<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/ykim2718\/AIML\/blob\/main\/Feature-Engineering\/PFE\/polynomial-feature-expansion_fig\/fig1.png\"><img src=\"https:\/\/ykim.synology.me\/wordpress\/wp-json\/gh-readme\/v1\/asset?user=ykim2718&#038;repo=AIML&#038;branch=main&#038;path=Feature-Engineering\/PFE\/polynomial-feature-expansion_fig\/fig1.png&#038;sig=2d52727316ac062e97e7f124893c9d0d888696aed02877c460f060b813314971\" width=\"1100\" alt=\"Fig 1\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">Fig 1. Degree and extrapolation, conditioning, and the cost of expansion<\/p>\n<p dir=\"auto\">Fig 1(a) is the reason to keep the degree low. Degrees 2, 5 and 9 are fitted to 60 samples; inside the training range (grey) degrees 5 and 9 are both plausible, and outside it the higher degree diverges first. The behaviour of a polynomial beyond its range is governed by its top term, so raising the degree where extrapolation is needed improves the fit inside the training range while the error outside it grows.<\/p>\n<p dir=\"auto\">Fig 1(b) draws the condition numbers of section 4.3 against degree, and Fig 1(c) is the relation between the term count and the row count. On data with 5 variables, 60 rows and a true model holding one product term, the held-out RMSE, that error measured as the root of the mean squared error, falls from 1.34 at degree 1 to 0.34 at degree 2 and returns to 1.08 at degree 3. The 55 columns of degree 3 nearly reach the 60 rows. Ridge is at 0.75 in the same place, stopping close to half of that deterioration.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.4 Failure Modes<\/h3><a id=\"user-content-54-failure-modes\" class=\"anchor\" aria-label=\"Permalink: 5.4 Failure Modes\" href=\"#54-failure-modes\"><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\">An expansion fails in six recognizable ways. Most arrive not as a model that fits badly but as coefficients or predictions that turn unstable.<\/p>\n<p dir=\"auto\">Table 2. Failure modes of a polynomial expansion<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>#<\/th>\n<th>Symptom<\/th>\n<th>Cause<\/th>\n<th>Countermeasure<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>Held-out error worse at degree 2 than at degree 1<\/td>\n<td>Term count close to the row count<\/td>\n<td>Ridge or lasso, <code>interaction_only<\/code>, selective expansion<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Coefficient signs flipping across resamples<\/td>\n<td>Collinearity manufactured by the expansion<\/td>\n<td>Centering, a penalty, reading predictions instead of coefficients<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Prediction diverging just outside the training range<\/td>\n<td>Extrapolation behaviour of a polynomial<\/td>\n<td>Spline, a range guard on the input, no extrapolation<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>A handful of rows dominating the fit<\/td>\n<td>Squares amplifying leverage<\/td>\n<td>Outlier handling before expansion, robust loss<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>Duplicate or all-zero columns<\/td>\n<td>Dummy columns squared and crossed<\/td>\n<td><code>interaction_only=True<\/code>, expansion restricted to continuous columns<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>Imputed values amplified<\/td>\n<td>Imputation error squared inside a product<\/td>\n<td>Imputation before expansion, an indicator column for what was imputed<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">Row 5 of Table 2, the duplicate and all-zero columns that come out of dummy columns, is written out separately because the expansion does not catch it on its own. A categorical variable is turned into numbers by giving each category a column that holds 1 where the row falls in that category and 0 otherwise, a dummy. A dummy squared is itself and becomes an exactly duplicated column, and the product of two dummies from the same categorical variable is always zero, since one row cannot fall in two categories at once. The expansion knows none of this, so columns coming from a categorical variable are either left out of the expansion or handled with <code>interaction_only<\/code>.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.5 Diagnostics<\/h3><a id=\"user-content-55-diagnostics\" class=\"anchor\" aria-label=\"Permalink: 5.5 Diagnostics\" href=\"#55-diagnostics\"><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\">Whether an expansion helped is confirmed in four ways.<\/p>\n<ul dir=\"auto\">\n<li>The held-out error curve drawn while raising the degree from 1. Watch whether the minimum stays at 2 or below.<\/li>\n<li>The condition number of the expanded design matrix and the VIF (Variance Inflation Factor) of each column. The VIF of column <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$j$<\/math-renderer> is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$1 \/ (1 - R_j^2)$<\/math-renderer> on the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$R_j^2$<\/math-renderer> of that column regressed on the rest, the factor by which the variance of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\hat{\\beta}_j$<\/math-renderer> is inflated over the orthogonal case (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$R_j^2 = 0.9$<\/math-renderer> gives 10). Where the condition number reads the whole matrix as one number, the VIF names the column that overlaps, and a large value after centering calls for a penalty.<\/li>\n<li>The share of samples redrawn from the data with replacement, the bootstrap, in which a coefficient keeps its sign. A product term whose sign flips is not interpreted.<\/li>\n<li>The residual plotted against the product terms. Confirm that the structure left before the expansion is gone.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">6. Further Work<\/h2><a id=\"user-content-6-further-work\" class=\"anchor\" aria-label=\"Permalink: 6. Further Work\" href=\"#6-further-work\"><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>Sparse polynomial chaos expansion<\/strong> \u2014 A way to cut a high-degree expansion down to a size that can be carried, by selecting terms sparsely over a basis of mutually orthogonal polynomials [<a href=\"#ref-10\">10<\/a>]. Selecting the terms by least angle regression has settled into a procedure, which makes keeping a few dozen out of several hundred candidates computationally practical. Starting needs a distributional assumption on the input variables (the basis follows that distribution) and a designed sample.<\/li>\n<li><strong>Hierarchical interaction selection at scale<\/strong> \u2014 The lasso family that selects product terms with heredity imposed as a convex constraint [<a href=\"#ref-6\">6<\/a>]. Convex means the optimum found is the only one, and it solves up to several hundred variables, so the rule of section 4.4 can be enforced by the optimization rather than by a person. Starting needs a rule that narrows the candidate product terms in advance and a computational budget.<\/li>\n<li><strong>Learned basis<\/strong> \u2014 A model that stacks one-dimensional functions learned from the data in place of a fixed monomial basis [<a href=\"#ref-11\">11<\/a>]. A spline-based implementation was released in 2024, which makes a direct comparison with an expansion plus ridge on the same data possible. Starting needs a held-out comparison procedure and a criterion for whether the learned basis is excessive for the sample count.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">References<\/h2><a id=\"user-content-references\" class=\"anchor\" aria-label=\"Permalink: References\" href=\"#references\"><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\"><a id=\"user-content-ref-1\"><\/a>\n[1] Box, G. E. P. and Wilson, K. B. (1951). <a href=\"https:\/\/doi.org\/10.1111\/j.2517-6161.1951.tb00067.x\" rel=\"nofollow\">On the Experimental Attainment of Optimum Conditions<\/a>. <em>Journal of the Royal Statistical Society: Series B<\/em>, 13(1), 1\u201338.<br>\n<a id=\"user-content-ref-2\"><\/a>\n[2] Marquardt, D. W. (1980). <a href=\"https:\/\/doi.org\/10.1080\/01621459.1980.10477430\" rel=\"nofollow\">Comment: You Should Standardize the Predictor Variables in Your Regression Models<\/a>. <em>Journal of the American Statistical Association<\/em>, 75(369), 87\u201391.<br>\n<a id=\"user-content-ref-3\"><\/a>\n[3] Hoerl, A. E. and Kennard, R. W. (1970). <a href=\"https:\/\/doi.org\/10.1080\/00401706.1970.10488634\" rel=\"nofollow\">Ridge Regression: Biased Estimation for Nonorthogonal Problems<\/a>. <em>Technometrics<\/em>, 12(1), 55\u201367.<br>\n<a id=\"user-content-ref-4\"><\/a>\n[4] Nelder, J. A. (1998). <a href=\"https:\/\/doi.org\/10.1080\/00031305.1998.10480588\" rel=\"nofollow\">The Selection of Terms in Response-Surface Models\u2014How Strong is the Weak-Heredity Principle?<\/a> <em>The American Statistician<\/em>, 52(4), 315\u2013318.<br>\n<a id=\"user-content-ref-5\"><\/a>\n[5] Chipman, H. (1996). <a href=\"https:\/\/doi.org\/10.2307\/3315687\" rel=\"nofollow\">Bayesian variable selection with related predictors<\/a>. <em>The Canadian Journal of Statistics<\/em>, 24(1), 17\u201336.<br>\n<a id=\"user-content-ref-6\"><\/a>\n[6] Bien, J., Taylor, J. and Tibshirani, R. (2013). <a href=\"https:\/\/doi.org\/10.1214\/13-AOS1096\" rel=\"nofollow\">A lasso for hierarchical interactions<\/a>. <em>The Annals of Statistics<\/em>, 41(3), 1111\u20131141.<br>\n<a id=\"user-content-ref-7\"><\/a>\n[7] Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M. and Duchesnay, \u00c9. (2011). <a href=\"https:\/\/www.jmlr.org\/papers\/v12\/pedregosa11a.html\" rel=\"nofollow\">Scikit-learn: Machine Learning in Python<\/a>. <em>Journal of Machine Learning Research<\/em>, 12, 2825\u20132830.<br>\n<a id=\"user-content-ref-8\"><\/a>\n[8] Rahimi, A. and Recht, B. (2007). <a href=\"https:\/\/proceedings.neurips.cc\/paper\/2007\/hash\/013a006f03dbc5392effeb8f18fda755-Abstract.html\" rel=\"nofollow\">Random Features for Large-Scale Kernel Machines<\/a>. <em>Advances in Neural Information Processing Systems<\/em>, 20.<br>\n<a id=\"user-content-ref-9\"><\/a>\n[9] Friedman, J. H. and Popescu, B. E. (2008). <a href=\"https:\/\/doi.org\/10.1214\/07-AOAS148\" rel=\"nofollow\">Predictive learning via rule ensembles<\/a>. <em>The Annals of Applied Statistics<\/em>, 2(3), 916\u2013954.<br>\n<a id=\"user-content-ref-10\"><\/a>\n[10] Blatman, G. and Sudret, B. (2011). <a href=\"https:\/\/doi.org\/10.1016\/j.jcp.2010.12.021\" rel=\"nofollow\">Adaptive sparse polynomial chaos expansion based on least angle regression<\/a>. <em>Journal of Computational Physics<\/em>, 230(6), 2345\u20132367.<br>\n<a id=\"user-content-ref-11\"><\/a>\n[11] Liu, Z., Wang, Y., Vaidya, S., Ruehle, F., Halverson, J., Solja\u010di\u0107, M., Hou, T. Y. and Tegmark, M. (2024). <a href=\"https:\/\/arxiv.org\/abs\/2404.19756\" rel=\"nofollow\">KAN: Kolmogorov-Arnold Networks<\/a>. <em>arXiv:2404.19756<\/em>.<br>\n<a id=\"user-content-ref-12\"><\/a>\n[12] Tibshirani, R. (1996). <a href=\"https:\/\/doi.org\/10.1111\/j.2517-6161.1996.tb02080.x\" rel=\"nofollow\">Regression Shrinkage and Selection via the Lasso<\/a>. <em>Journal of the Royal Statistical Society: Series B<\/em>, 58(1), 267\u2013288.<br>\n<a id=\"user-content-ref-13\"><\/a>\n[13] Zou, H. and Hastie, T. (2005). <a href=\"https:\/\/doi.org\/10.1111\/j.1467-9868.2005.00503.x\" rel=\"nofollow\">Regularization and variable selection via the elastic net<\/a>. <em>Journal of the Royal Statistical Society: Series B<\/em>, 67(2), 301\u2013320.<\/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>collinearity<\/strong>: The state in which two or more columns point in nearly the same direction, so that their coefficients cannot be estimated apart.<\/li>\n<li>\n<strong>condition number<\/strong>: The ratio of the largest singular value of a matrix to the smallest. It says how far a small error in the input is magnified in the solution.<\/li>\n<li>\n<strong>curse of dimensionality<\/strong>: The exponential growth, as the number of columns rises, in the number of observations needed to cover the space at one density.<\/li>\n<li>\n<strong>degree<\/strong>: The highest degree of a monomial the expansion admits. The degree of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X_1^2 X_2$<\/math-renderer> is 3.<\/li>\n<li>\n<strong>derived variable<\/strong>: A variable built from two or more columns by domain knowledge, such as a ratio or a rate.<\/li>\n<li>\n<strong>design matrix<\/strong>: The matrix whose rows are the observations and whose columns are the terms the model uses. The coefficients come from solving it.<\/li>\n<li>\n<strong>dummy<\/strong>: A column holding 1 where a row falls in one category of a categorical variable and 0 otherwise.<\/li>\n<li>\n<strong>extrapolation<\/strong>: Prediction over an input range the training data does not cover.<\/li>\n<li>\n<strong>held-out<\/strong>: Data kept out of the fit and used only to measure the error of the fitted model.<\/li>\n<li>\n<strong>heredity<\/strong>: The rule that a product term put into a model brings the lower-degree terms composing it with it.<\/li>\n<li>\n<strong>imputation<\/strong>: Filling a missing value with another, such as the mean of that column or the prediction of a model.<\/li>\n<li>\n<strong>leverage<\/strong>: How strongly one observation pulls its own fitted value. It grows as the input sits further from the centre.<\/li>\n<li>\n<strong>main effect<\/strong>: The first-order term of a single variable, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\beta_i x_i$<\/math-renderer>.<\/li>\n<li>\n<strong>monomial<\/strong>: A term formed by multiplying powers of the variables. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X_1^2 X_2$<\/math-renderer> is one.<\/li>\n<li>\n<strong>overfitting<\/strong>: The state in which a model fits the training data while missing new data.<\/li>\n<li>\n<strong>penalty<\/strong>: A term added to the fitting criterion that charges for the size of the coefficients, as ridge and lasso do.<\/li>\n<li>\n<strong>RMSE<\/strong>: The square root of the mean squared error (Root Mean Squared Error).<\/li>\n<li>\n<strong>standardization<\/strong>: Subtracting from each column its own mean and dividing by its standard deviation, bringing it to mean 0 and standard deviation 1.<\/li>\n<li>\n<strong>VIF<\/strong>: The variance inflation factor, computed from the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$R^2$<\/math-renderer> of one column regressed on the rest. It is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$1\/(1-R^2)$<\/math-renderer>.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix B. Covariance<\/h2><a id=\"user-content-appendix-b-covariance\" class=\"anchor\" aria-label=\"Permalink: Appendix B. Covariance\" href=\"#appendix-b-covariance\"><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\">A covariance measures how far two columns move together. Its definition on a population is equation (16), where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$E[\\cdot]$<\/math-renderer> is the expected value and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mu_X$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mu_Y$<\/math-renderer> are the expected values of the two variables.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{Cov}(X, Y) = \\sigma_{XY} = E[(X - \\mu_X)(Y - \\mu_Y)] \\hspace{19em} (16)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Multiplying out under the properties of the expectation gives equation (6), the form that is easier to compute and the one section 4.2 uses: the expected value of the product, less the product of the expected values.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{Cov}(X, Y) = E[XY] - E[X]E[Y] \\hspace{19em} (6)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Measured on a sample of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> observations the covariance is equation (17), where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_i$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$y_i$<\/math-renderer> are the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$i$<\/math-renderer>-th observation, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x}$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{y}$<\/math-renderer> are the sample means, and the division by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n - 1$<\/math-renderer> drops one degree of freedom so that the population value is estimated without bias, as an unbiased estimator.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$s_{XY} = \\frac{1}{n-1} \\sum_{i=1}^{n} (x_i - \\overline{x})(y_i - \\overline{y}) \\hspace{19em} (17)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The sign, and the covariance of a variable with itself, say four things.<\/p>\n<ul dir=\"auto\">\n<li>At <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{Cov}(X, Y) \\gt 0$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$Y$<\/math-renderer> rises as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X$<\/math-renderer> rises.<\/li>\n<li>At <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{Cov}(X, Y) \\lt 0$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$Y$<\/math-renderer> falls as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X$<\/math-renderer> rises.<\/li>\n<li>At <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{Cov}(X, Y) = 0$<\/math-renderer> there is no linear relation between the two.<\/li>\n<li>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{Cov}(X, X)$<\/math-renderer> is the variance <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{Var}(X)$<\/math-renderer>.<\/li>\n<\/ul>\n<p dir=\"auto\">Section 4.2 and the derivation in <a href=\"#appendix-c-correlation-of-a-variable-and-its-square\">Appendix C<\/a> use the mean divided by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$1\/N$<\/math-renderer>. A correlation is a covariance over two standard deviations, and the same divisor appears above and below, so the correlation is the same whether <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$1\/N$<\/math-renderer> or <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$1\/(n-1)$<\/math-renderer> is used.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix C. Correlation Of A Variable And Its Square<\/h2><a id=\"user-content-appendix-c-correlation-of-a-variable-and-its-square\" class=\"anchor\" aria-label=\"Permalink: Appendix C. Correlation Of A Variable And Its Square\" href=\"#appendix-c-correlation-of-a-variable-and-its-square\"><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\">Section 4.2 sets <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X = x$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$Y = x^2$<\/math-renderer> in equation (7) to reach equation (8) and equation (9). The steps between are below.<\/p>\n<p dir=\"auto\">The reason to divide is units. Scaling a column <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x$<\/math-renderer> by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$c \\gt 0$<\/math-renderer> gives <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{cov}(cx, (cx)^2) = c^3 \\mathrm{cov}(x, x^2)$<\/math-renderer>, so the size of a covariance moves with a change of units alone and cannot measure how far two variables move together. Dividing by the standard deviations, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{sd}(cx) = c \\cdot \\mathrm{sd}(x)$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{sd}((cx)^2) = c^2 \\cdot \\mathrm{sd}(x^2)$<\/math-renderer> cancel that <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$c^3$<\/math-renderer>, which is the left half of equation (18), and the Cauchy\u2013Schwarz inequality holds the value inside <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$[-1, 1]$<\/math-renderer>, which is the right half.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$r(cx, (cx)^2) = r(x, x^2), \\qquad \\lvert r(x, x^2) \\rvert \\le 1 \\hspace{12em} (18)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The numerator comes first. Equation (6) at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X = x$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$Y = x^2$<\/math-renderer> has the mean of the product as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x^3}$<\/math-renderer> and the product of the means as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x}$<\/math-renderer> times <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x^2}$<\/math-renderer>, so the covariance is equation (19).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{cov}(x, x^2) = \\overline{x^3} - \\overline{x} \\overline{x^2} \\hspace{19em} (19)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Substituting <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x = u + \\overline{x}$<\/math-renderer> writes both means in <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$u$<\/math-renderer>, which is equation (20). Of the expanded terms, each one multiplied by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{u}$<\/math-renderer> drops out, since <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{u} = 0$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\overline{x^3} = \\overline{u^3} + 3 \\overline{x} \\overline{u^2} + \\overline{x}^3, \\qquad \\overline{x^2} = \\overline{u^2} + \\overline{x}^2 \\hspace{19em} (20)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Putting equation (20) into equation (19) gives equation (21).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{cov}(x, x^2) = \\overline{u^3} + 3 \\overline{x} \\overline{u^2} + \\overline{x}^3 - \\overline{x} (\\overline{u^2} + \\overline{x}^2) \\hspace{19em} (21)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x}^3$<\/math-renderer> cancels and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x} \\overline{u^2}$<\/math-renderer> comes off <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$3 \\overline{x} \\overline{u^2}$<\/math-renderer>, so the covariance closes as equation (22).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{cov}(x, x^2) = 2 \\overline{x} \\overline{u^2} + \\overline{u^3} \\hspace{19em} (22)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The two terms of equation (22) come from different places. The first, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$2 \\overline{x} \\overline{u^2}$<\/math-renderer>, comes only from how far the mean sits from zero; the second, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{u^3}$<\/math-renderer>, only from how far the distribution leans to one side. Subtracting the mean takes the first term to 0 and leaves the second as it was.<\/p>\n<p dir=\"auto\">What is left is the two standard deviations of the denominator. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathrm{var}(x) = \\overline{u^2}$<\/math-renderer> is the definition itself. The variance of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x^2$<\/math-renderer> is equation (6) at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$X = Y = x^2$<\/math-renderer>, that is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x^4} - (\\overline{x^2})^2$<\/math-renderer>, and substituting <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x = u + \\overline{x}$<\/math-renderer> into both means and reducing by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{u} = 0$<\/math-renderer> gives equation (23).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{var}(x^2) = \\overline{x^4} - (\\overline{x^2})^2 = \\overline{u^4} - (\\overline{u^2})^2 + 4 \\overline{x}^2 \\overline{u^2} + 4 \\overline{x} \\overline{u^3} \\hspace{6em} (23)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> of section 4.2 gather the terms that centering changes in equation (22) and equation (23) into one place. With the moments and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x}$<\/math-renderer> mixed together it is not visible where the location of the mean enters the correlation, but with the location held in <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t$<\/math-renderer> alone and the shape in <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer>, the equation shows directly that centering takes <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t$<\/math-renderer> to 0 and leaves <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> as they were. All three are divided by the spread and so carry no units, which makes them the same under a change of units in the data.<\/p>\n<p dir=\"auto\">Substituting the three, and taking the square root of equation (23) since a standard deviation is the root of a variance, writes the numerator and the two denominators as equation (24).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\mathrm{cov}(x, x^2) = (\\overline{u^2})^{3\/2} (2t + s), \\quad \\mathrm{sd}(x) = (\\overline{u^2})^{1\/2}, \\quad \\mathrm{sd}(x^2) = \\overline{u^2} \\sqrt{k - 1 + 4t^2 + 4ts} \\hspace{2em} (24)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Put the three into equation (7) and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$(\\overline{u^2})^{3\/2}$<\/math-renderer> cancels, so equation (8) of section 4.2 is what is left.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$r(x, x^2) = \\frac{2t + s}{\\sqrt{k - 1 + 4t^2 + 4ts}} \\hspace{19em} (8)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Both <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$s$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> are written in the deviations <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$u$<\/math-renderer> alone, which centering does not change, and centering only makes <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\overline{x} = 0$<\/math-renderer>, that is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t = 0$<\/math-renderer>, so equation (9) is equation (8) at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$t = 0$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$r(u, u^2) = \\frac{s}{\\sqrt{k - 1}} \\hspace{19em} (9)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Raise <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lvert t \\rvert$<\/math-renderer> and the denominator, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$2 \\lvert t \\rvert \\sqrt{1 + s \/ t + (k - 1) \/ (4t^2)}$<\/math-renderer>, approaches <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$2 \\lvert t \\rvert$<\/math-renderer> while the numerator approaches <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$2t$<\/math-renderer>, so <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lvert r \\rvert$<\/math-renderer> goes to 1.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix D. Term Count Derivation<\/h2><a id=\"user-content-appendix-d-term-count-derivation\" class=\"anchor\" aria-label=\"Permalink: Appendix D. Term Count Derivation\" href=\"#appendix-d-term-count-derivation\"><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\">Set notation comes first. A set is written either by listing its elements, as in <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lbrace 2, 4, 6 \\rbrace$<\/math-renderer>, or by a condition, in the form <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lbrace \\cdot \\mid \\cdot \\rbrace$<\/math-renderer>. In that second form a vertical bar splits the braces: left of the bar stands the shape an element takes, right of it the condition that shape has to meet. So <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lbrace n^2 \\mid n \\in \\mathbb{Z}, \\ 1 \\le n \\le 3 \\rbrace$<\/math-renderer> reads as every <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n^2$<\/math-renderer> for <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> an integer from 1 to 3, which is the set <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lbrace 1, 4, 9 \\rbrace$<\/math-renderer>. A colon is used in place of the bar as often as not, and this document uses both.<\/p>\n<p dir=\"auto\">Equation (4), from section 4.1, is repeated here.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\Phi_d(\\mathbf{x}) = \\left\\lbrace \\prod_{i=1}^{n} x_i^{a_i} \\ \\middle|\\ a_i \\in \\mathbb{Z}_{\\ge 0}, \\ 1 \\le \\sum_{i=1}^{n} a_i \\le d \\right\\rbrace \\hspace{19em} (4)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Equation (4) is dense in notation but simple to read. On the left, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\Phi_d(\\mathbf{x})$<\/math-renderer> is the collection of new columns built from one set of variable values <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mathbf{x} = (x_1, \\dots, x_n)$<\/math-renderer>. Left of the bar, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\prod_{i=1}^{n} x_i^{a_i}$<\/math-renderer> is each variable <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_i$<\/math-renderer> raised to <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$a_i$<\/math-renderer> and all of them multiplied together, which is one monomial. Each exponent <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$a_i$<\/math-renderer> is a non-negative integer, written <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$a_i \\in \\mathbb{Z}_{\\ge 0}$<\/math-renderer>, and where it is 0 that variable drops out of the product. The sum of the exponents <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\sum_i a_i$<\/math-renderer> is the degree of the term, so the condition <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$1 \\le \\sum_i a_i \\le d$<\/math-renderer> excludes the constant term, whose exponents sum to 0, and admits degrees up to <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d$<\/math-renderer>.<\/p>\n<p dir=\"auto\">With two variables and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 2$<\/math-renderer>, five pairs of exponents meet that condition. Table 3 is the five.<\/p>\n<p dir=\"auto\">Table 3. Exponent pairs admitted by equation (4) at two variables and degree 2<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Exponent of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer>\n<\/th>\n<th>Exponent of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2$<\/math-renderer>\n<\/th>\n<th>Degree<\/th>\n<th>Term<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>0<\/td>\n<td>2<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1^2$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1 x_2$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>2<\/td>\n<td>2<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2^2$<\/math-renderer><\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">The one pair left out is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$(0, 0)$<\/math-renderer>, the constant term.<\/p>\n<p dir=\"auto\">Equation (4) defines the set of columns to be built without saying how large it is. That size is equation (14) and equation (15), derived below.<\/p>\n<p dir=\"auto\">One monomial of degree exactly <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> corresponds to one choice of non-negative integer exponents <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$(a_1, \\dots, a_n)$<\/math-renderer> summing to <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer>, so counting the monomials of that degree is counting those choices. That count is equation (25), whose left side carries a pair of bars <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\lvert \\cdot \\rvert$<\/math-renderer> for the number of elements in the set they enclose.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\left| \\lbrace (a_1, \\dots, a_n) : a_i \\in \\mathbb{Z}_{\\ge 0}, \\ \\sum_{i=1}^{n} a_i = k \\rbrace \\right| = \\binom{k+n-1}{n-1} \\hspace{19em} (25)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The count itself is stars and bars. Take the degree <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> identical stars, and the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> variables as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> bins separated by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n-1$<\/math-renderer> bars, so that the stars falling in a bin are the exponent <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$a_i$<\/math-renderer> of that variable. Counting the exponent choices is then laying <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k$<\/math-renderer> stars and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n-1$<\/math-renderer> bars, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k+n-1$<\/math-renderer> symbols, in a row and choosing which <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n-1$<\/math-renderer> positions carry the bars, which is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\binom{k+n-1}{n-1}$<\/math-renderer>.<\/p>\n<p dir=\"auto\">At <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n = 2$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k = 2$<\/math-renderer> that is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\binom{3}{1} = 3$<\/math-renderer>, and the arrangements <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\ast\\ast\\mid$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\ast\\mid\\ast$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\mid\\ast\\ast$<\/math-renderer> read as the exponents <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$(2, 0)$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$(1, 1)$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$(0, 2)$<\/math-renderer> \u2014 the three degree-2 terms <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_1 x_2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$x_2^2$<\/math-renderer> of Table 3.<\/p>\n<p dir=\"auto\">Summing the degrees from 0 to <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d$<\/math-renderer> gives equation (26). Writing it with one slack exponent <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$a_0 \\ge 0$<\/math-renderer> such that <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$a_0 + \\sum_i a_i = d$<\/math-renderer> collapses the sum into a single count, that of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d$<\/math-renderer> items falling into <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n+1$<\/math-renderer> bins.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\sum_{k=0}^{d} \\binom{k+n-1}{n-1} = \\binom{n+d}{d} \\hspace{19em} (26)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The set of equation (4) excludes the constant term at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$k = 0$<\/math-renderer>, so its size is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\binom{n+d}{d} - 1$<\/math-renderer>, which is equation (14).<\/p>\n<p dir=\"auto\">With <code>interaction_only<\/code> no variable is used twice, so a surviving term corresponds to one subset of the <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$n$<\/math-renderer> variables of size <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$j$<\/math-renderer>, where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$j$<\/math-renderer> runs from 1 to <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\min(d, n)$<\/math-renderer>. Adding those counts is equation (15). Once <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d \\ge n$<\/math-renderer> every subset is admitted and the sum closes as equation (27).<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\sum_{j=1}^{n} \\binom{n}{j} = 2^n - 1 \\hspace{19em} (27)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix E. Ridge And Lasso On Expanded Columns<\/h2><a id=\"user-content-appendix-e-ridge-and-lasso-on-expanded-columns\" class=\"anchor\" aria-label=\"Permalink: Appendix E. Ridge And Lasso On Expanded Columns\" href=\"#appendix-e-ridge-and-lasso-on-expanded-columns\"><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 penalty on the expanded columns is one of three. Written as an objective, ridge is equation (28) and lasso is equation (29) [<a href=\"#ref-12\">12<\/a>], where <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\alpha$<\/math-renderer> sets how hard the penalty presses.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\hat{\\boldsymbol{\\beta}}_{\\mathrm{ridge}} = \\arg\\min_{\\boldsymbol{\\beta}} \\lVert \\mathbf{y} - \\mathbf{X}\\boldsymbol{\\beta} \\rVert_2^2 + \\alpha \\lVert \\boldsymbol{\\beta} \\rVert_2^2 \\hspace{15em} (28)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\hat{\\boldsymbol{\\beta}}_{\\mathrm{lasso}} = \\arg\\min_{\\boldsymbol{\\beta}} \\lVert \\mathbf{y} - \\mathbf{X}\\boldsymbol{\\beta} \\rVert_2^2 + \\alpha \\lVert \\boldsymbol{\\beta} \\rVert_1 \\hspace{15em} (29)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The shape of the penalty is the whole difference. Where the columns are standardized and orthogonal the two solutions close in equation (30): ridge divides every coefficient by the same factor and never reaches zero, while lasso sets to exactly zero every coefficient smaller in size than <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\alpha \/ 2$<\/math-renderer> and pulls the rest toward zero by that amount.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\hat{\\beta}_j^{\\mathrm{ridge}} = \\frac{\\hat{\\beta}_j^{\\mathrm{ols}}}{1 + \\alpha}, \\qquad \\hat{\\beta}_j^{\\mathrm{lasso}} = \\mathrm{sign}(\\hat{\\beta}_j^{\\mathrm{ols}}) \\max \\left( \\lvert \\hat{\\beta}_j^{\\mathrm{ols}} \\rvert - \\frac{\\alpha}{2}, \\ 0 \\right) \\hspace{9em} (30)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Expanded columns are far from orthogonal (section 4.2) and come in groups that resemble one another. Ridge spreads one coefficient across such a group; lasso keeps one member and zeroes the rest, and which member survives changes with the sample, so the list of terms lasso returns is itself unstable. Elastic net, equation (31) [<a href=\"#ref-13\">13<\/a>], mixes the two by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\rho$<\/math-renderer>, which is lasso at 1 and ridge at 0. Its quadratic part keeps a group in or out together, so terms are still selected while the list moves less.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$\\hat{\\boldsymbol{\\beta}}_{\\mathrm{enet}} = \\arg\\min_{\\boldsymbol{\\beta}} \\lVert \\mathbf{y} - \\mathbf{X}\\boldsymbol{\\beta} \\rVert_2^2 + \\alpha \\left( \\rho \\lVert \\boldsymbol{\\beta} \\rVert_1 + \\frac{1 - \\rho}{2} \\lVert \\boldsymbol{\\beta} \\rVert_2^2 \\right) \\hspace{9em} (31)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Table 4. Penalties on expanded columns<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Penalty<\/th>\n<th>Term added<\/th>\n<th>A group of columns that resemble one another<\/th>\n<th>Where it fits<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Ridge<\/td>\n<td>Sum of the squared coefficients<\/td>\n<td>Coefficient shared across the group<\/td>\n<td>The default on expanded columns<\/td>\n<\/tr>\n<tr>\n<td>Lasso<\/td>\n<td>Sum of the absolute coefficients<\/td>\n<td>One kept, the rest at zero<\/td>\n<td>A short term list, under a heredity constraint<\/td>\n<\/tr>\n<tr>\n<td>Elastic net<\/td>\n<td>Both, mixed by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\rho$<\/math-renderer>\n<\/td>\n<td>Kept or dropped together<\/td>\n<td>Selection wanted with a list that holds<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$\\alpha$<\/math-renderer> is chosen on held-out error over candidates spaced by powers of ten, and it is meaningful only on standardized columns (section 5.2), which is what <code>RidgeCV<\/code>, <code>LassoCV<\/code> and <code>ElasticNetCV<\/code> search over. The intercept is left out of the penalty: penalizing it pulls the fitted level toward zero and moves the model off the centre of the data.<\/p>\n<p dir=\"auto\">A penalty does not buy a degree of 4. What it buys is the difference between a fit that survives a column count close to the row count and one that does not, and section 5.1 gives the size of that difference.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix F. Implementation<\/h2><a id=\"user-content-appendix-f-implementation\" class=\"anchor\" aria-label=\"Permalink: Appendix F. Implementation\" href=\"#appendix-f-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<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.1 Options<\/h3><a id=\"user-content-f1-options\" class=\"anchor\" aria-label=\"Permalink: F.1 Options\" href=\"#f1-options\"><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 expansion itself is one line of <code>sklearn.preprocessing.PolynomialFeatures<\/code>, and only four arguments have to be settled [<a href=\"#ref-7\">7<\/a>].<\/p>\n<p dir=\"auto\">Table 5. PolynomialFeatures arguments<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Argument<\/th>\n<th>Effect<\/th>\n<th>Note<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>degree<\/code><\/td>\n<td>Highest degree of the monomials<\/td>\n<td>A <code>(min, max)<\/code> tuple for the lowest degree as well, so <code>(2, 2)<\/code> for second-order terms only<\/td>\n<\/tr>\n<tr>\n<td><code>interaction_only<\/code><\/td>\n<td>Products of distinct variables only<\/td>\n<td>First-order terms kept, powers of a single variable dropped<\/td>\n<\/tr>\n<tr>\n<td><code>include_bias<\/code><\/td>\n<td>A constant column of ones<\/td>\n<td>False where the estimator carries its own intercept<\/td>\n<\/tr>\n<tr>\n<td><code>order<\/code><\/td>\n<td>Memory layout of the output array<\/td>\n<td>'C' or 'F', a choice of layout rather than of content<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom sklearn.preprocessing import PolynomialFeatures\n\n# interaction_only=True keeps X1*X2 and drops X1^2, X2^2\npoly = PolynomialFeatures(degree=2, interaction_only=True, include_bias=False)\nX_expanded = poly.fit_transform(X)\nterm_name = poly.get_feature_names_out()\"><pre><span class=\"pl-c\"># Python<\/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\"># interaction_only=True keeps X1*X2 and drops X1^2, X2^2<\/span>\n<span class=\"pl-s1\">poly<\/span> <span class=\"pl-c1\">=<\/span> <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\">interaction_only<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">True<\/span>, <span class=\"pl-s1\">include_bias<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>)\n<span class=\"pl-v\">X_expanded<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">poly<\/span>.<span class=\"pl-c1\">fit_transform<\/span>(<span class=\"pl-c1\">X<\/span>)\n<span class=\"pl-s1\">term_name<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">poly<\/span>.<span class=\"pl-c1\">get_feature_names_out<\/span>()<\/pre><\/div>\n<p dir=\"auto\">The names <code>get_feature_names_out()<\/code> returns are the only route from a coefficient back to its column. Lose them after the expansion and the coefficients remain while which product each belongs to cannot be said.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.2 Pipeline<\/h3><a id=\"user-content-f2-pipeline\" class=\"anchor\" aria-label=\"Permalink: F.2 Pipeline\" href=\"#f2-pipeline\"><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\">An expansion is not used alone but placed between standardization and the penalized fit. The order is standardize the raw variables, expand, standardize the expanded columns again, then fit with a penalty.<\/p>\n<p dir=\"auto\">The first standardization removes the conditioning problem of section 4.3, and the second makes the penalty fall evenly across the columns. The variance of a product term is close to the product of the raw variances and so differs widely from column to column; without the second standardization a ridge penalty lands almost entirely on the columns with the largest variance.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom sklearn.linear_model import Ridge\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import PolynomialFeatures, StandardScaler\n\npipeline = Pipeline([\n    ('raw_scale', StandardScaler()),\n    ('expand', PolynomialFeatures(include_bias=False)),\n    ('term_scale', StandardScaler()),\n    ('fit', Ridge()),\n])\ngrid = {'expand__degree': [1, 2, 3], 'fit__alpha': [0.1, 1.0, 10.0, 100.0]}\nsearch = GridSearchCV(pipeline, grid, scoring='neg_root_mean_squared_error', cv=5)\nsearch.fit(X, y)\"><pre><span class=\"pl-c\"># Python<\/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\">model_selection<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">GridSearchCV<\/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-v\">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>, <span class=\"pl-v\">StandardScaler<\/span>\n\n<span class=\"pl-s1\">pipeline<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">Pipeline<\/span>(&#91;\n    (<span class=\"pl-s\">'raw_scale'<\/span>, <span class=\"pl-en\">StandardScaler<\/span>()),\n    (<span class=\"pl-s\">'expand'<\/span>, <span class=\"pl-en\">PolynomialFeatures<\/span>(<span class=\"pl-s1\">include_bias<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>)),\n    (<span class=\"pl-s\">'term_scale'<\/span>, <span class=\"pl-en\">StandardScaler<\/span>()),\n    (<span class=\"pl-s\">'fit'<\/span>, <span class=\"pl-en\">Ridge<\/span>()),\n&#93;)\n<span class=\"pl-s1\">grid<\/span> <span class=\"pl-c1\">=<\/span> {<span class=\"pl-s\">'expand__degree'<\/span>: &#91;<span class=\"pl-c1\">1<\/span>, <span class=\"pl-c1\">2<\/span>, <span class=\"pl-c1\">3<\/span>&#93;, <span class=\"pl-s\">'fit__alpha'<\/span>: &#91;<span class=\"pl-c1\">0.1<\/span>, <span class=\"pl-c1\">1.0<\/span>, <span class=\"pl-c1\">10.0<\/span>, <span class=\"pl-c1\">100.0<\/span>&#93;}\n<span class=\"pl-s1\">search<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">GridSearchCV<\/span>(<span class=\"pl-s1\">pipeline<\/span>, <span class=\"pl-s1\">grid<\/span>, <span class=\"pl-s1\">scoring<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s\">'neg_root_mean_squared_error'<\/span>, <span class=\"pl-s1\">cv<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>)\n<span class=\"pl-s1\">search<\/span>.<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-c1\">X<\/span>, <span class=\"pl-s1\">y<\/span>)<\/pre><\/div>\n<p dir=\"auto\">Putting the expansion inside the pipeline is not a convenience. The expansion is row-wise and leaks nothing by itself, but the standardizations on either side of it must take their means and variances from the training part of each fold, the pieces cross-validation splits the data into. Choosing the degree and the penalty together also finishes in one search only inside the pipeline.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.3 Cost<\/h3><a id=\"user-content-f3-cost\" class=\"anchor\" aria-label=\"Permalink: F.3 Cost\" href=\"#f3-cost\"><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 cost of an expansion is linear in the column count, and that count grows by equation (14). At 100,000 rows, 100 variables and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$d = 2$<\/math-renderer> the columns number 5,150, and holding them in a dense matrix, one that stores every value, takes 4.1 GB at 64 bits a value. Two routes keep the expanded columns out of memory.<\/p>\n<p dir=\"auto\">The first is the kernel. The polynomial kernel of equation (32) computes the inner product of the expanded space without the expansion.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"350541034836057ebff9b6301bbefcff\">$$K(\\mathbf{x}, \\mathbf{z}) = (\\gamma \\mathbf{x}^{\\top} \\mathbf{z} + c)^{d} \\hspace{19em} (32)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><code>KernelRidge(kernel='poly')<\/code> is that form, and since the cost falls on rows rather than on columns it suits data with many variables and few rows. What it costs is interpretation: no coefficient attaches to an individual monomial, so which product contributed cannot be read.<\/p>\n<p dir=\"auto\">The second is approximation. <code>PolynomialCountSketch<\/code> compresses the terms a polynomial kernel uses into a fixed number of columns, a sketch, and <code>Nystroem<\/code> approximates the kernel matrix from a subset of the samples. Both belong to the family that approximates a kernel with a finite number of columns to keep the speed of a linear model [<a href=\"#ref-8\">8<\/a>], and both bound the column count at a value the user sets.<\/p>\n<p dir=\"auto\">Sparse input is taken as it is. Feed in a CSR matrix, which stores only the non-zero values, and the expansion comes back in the same form, so data carrying many dummy columns does not inflate into a dense array.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.4 Selective Expansion<\/h3><a id=\"user-content-f4-selective-expansion\" class=\"anchor\" aria-label=\"Permalink: F.4 Selective Expansion\" href=\"#f4-selective-expansion\"><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\">Not every pair has to be built. Hand the expansion the columns to be crossed and the column count ends at the number chosen rather than at Table 1.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.preprocessing import PolynomialFeatures\n\nexpand_column = ['temperature', 'pressure']\ntransformer = ColumnTransformer(\n    [('expand', PolynomialFeatures(degree=2, include_bias=False), expand_column)],\n    remainder='passthrough',\n)\"><pre><span class=\"pl-c\"># Python<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">compose<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">ColumnTransformer<\/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-s1\">expand_column<\/span> <span class=\"pl-c1\">=<\/span> &#91;<span class=\"pl-s\">'temperature'<\/span>, <span class=\"pl-s\">'pressure'<\/span>&#93;\n<span class=\"pl-s1\">transformer<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">ColumnTransformer<\/span>(\n    &#91;(<span class=\"pl-s\">'expand'<\/span>, <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-s1\">expand_column<\/span>)&#93;,\n    <span class=\"pl-s1\">remainder<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s\">'passthrough'<\/span>,\n)<\/pre><\/div>\n<p dir=\"auto\">There are three grounds for choosing: an interaction the process already knows, a residual that shows structure over a combination of two variables, and a tree ensemble, several trees combined into one model, run first to measure interaction strength so that only the leading pairs are kept [<a href=\"#ref-9\">9<\/a>]. With none of the three, a penalty on the full expansion is the better move. Choosing pairs without grounds lets the analyst rather than the data decide which interactions reach the model.<\/p>\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-tab7052_06428a-8c\"><div class=\"kt-tab-inner-content-inner\"><p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"Feature-Engineering\/PFE\/polynomial-feature-expansion-ko.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">Polynomial Feature Expansion<\/h1><a id=\"user-content-polynomial-feature-expansion\" class=\"anchor\" aria-label=\"Permalink: Polynomial Feature Expansion\" href=\"#polynomial-feature-expansion\"><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 91 | Created: 2026-09-07 | 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-objective\">3. Objective<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#31-power-term\">3.1 Power Term<\/a><\/li>\n<li><a href=\"#32-interaction-term\">3.2 Interaction Term<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#4-mechanism\">4. Mechanism<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#41-expansion\">4.1 Expansion<\/a><\/li>\n<li><a href=\"#42-standardization\">4.2 Standardization<\/a><\/li>\n<li><a href=\"#43-conditioning\">4.3 Conditioning<\/a><\/li>\n<li><a href=\"#44-heredity\">4.4 Heredity<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#5-caution\">5. Caution<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#51-dimensionality-and-overfitting\">5.1 Dimensionality And Overfitting<\/a><\/li>\n<li><a href=\"#52-regularization\">5.2 Regularization<\/a><\/li>\n<li><a href=\"#53-evidence\">5.3 Evidence<\/a><\/li>\n<li><a href=\"#54-failure-modes\">5.4 Failure Modes<\/a><\/li>\n<li><a href=\"#55-diagnostics\">5.5 Diagnostics<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#6-further-work\">6. Further Work<\/a><\/li>\n<li><a href=\"#references\">References<\/a><\/li>\n<li><a href=\"#appendix-a-terminology\">Appendix A. Terminology<\/a><\/li>\n<li><a href=\"#appendix-b-covariance\">Appendix B. Covariance<\/a><\/li>\n<li><a href=\"#appendix-c-correlation-of-a-variable-and-its-square\">Appendix C. Correlation Of A Variable And Its Square<\/a><\/li>\n<li><a href=\"#appendix-d-term-count-derivation\">Appendix D. Term Count Derivation<\/a><\/li>\n<li><a href=\"#appendix-e-ridge-and-lasso-on-expanded-columns\">Appendix E. Ridge And Lasso On Expanded Columns<\/a><\/li>\n<li><a href=\"#appendix-f-implementation\">Appendix F. Implementation<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#f1-options\">F.1 Options<\/a><\/li>\n<li><a href=\"#f2-pipeline\">F.2 Pipeline<\/a><\/li>\n<li><a href=\"#f3-cost\">F.3 Cost<\/a><\/li>\n<li><a href=\"#f4-selective-expansion\">F.4 Selective Expansion<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p dir=\"auto\">Polynomial feature expansion \uc740 \ud55c \ubcc0\uc218\uc758 \uac70\ub4ed\uc81c\uacf1\uacfc \uc11c\ub85c \ub2e4\ub978 \ubcc0\uc218\uc758 \uacf1\uc744 \ud568\uaed8 \ub9cc\ub4dc\ub294 \uc5f0\uc0b0\uc774\ub2e4. \uc774 \ubb38\uc11c\ub294 \uadf8 \ub450 \uac00\uc9c0 \uc5f4\ub85c numeric tabular data \uc758 non-linear behavior \ub97c model \uc5d0 \ub2f4\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8ec\ub2e4.<\/p>\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>\n<strong>Problem Statement<\/strong>: Numeric tabular data \uc5d0\uc11c \uc120\ud615 model \ub85c\ub294 \ud45c\ud604\ud558\uae30 \ud798\ub4e0 \uacbd\uc6b0\uac00 \uc788\ub2e4.<\/li>\n<li>\n<strong>Goal<\/strong>: Original variable \uc758 power term (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x^3$<\/math-renderer>) \uc640 interaction term (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1 \\ast x_2$<\/math-renderer>) \uc744 \ucd94\uac00\ud558\uc5ec \ube44\uc120\ud615 model \uc744 \ub9cc\ub4e0\ub2e4.<\/li>\n<li>\n<strong>Non-Goal<\/strong>: Derived variable \uc740 \ub2e4\ub8e8\uc9c0 \uc54a\uace0, expanded data set \uc758 \ud559\uc2b5\uc744 \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\">Expansion \uc740 \ud45c\uc5d0 \uc774\ubbf8 \uc788\ub294 \uc5f4\ub85c \uacf1\uacfc \uc81c\uacf1\uc744 \uacc4\uc0b0\ud574 \uc0c8 \uc5f4\ub85c \ubd99\uc774\ub294 \uc5f0\uc0b0\uc774\uba70, \ud589\uc740 \uadf8\ub300\ub85c \ub450\uace0 \uc5f4\ub9cc \ub298\ub9b0\ub2e4. \uc5f4\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2$<\/math-renderer> \uc778 \ud45c\ub294 \uc5f4\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1 x_2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2^2$<\/math-renderer> \uc778 \ud45c\uac00 \ub418\uace0, \uc0c8\ub85c \uc0dd\uae34 \uadf8 \uc138 \uc5f4\uc774 \uc120\ud615 model \uc5d0 \uace1\uc120\uacfc \ubcc0\uc218 \uc0ac\uc774\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \uc900\ub2e4.<\/p>\n<p dir=\"auto\">\ub300\uac00\ub294 \uc5f4\uc758 \uac1c\uc218 \uc99d\uac00\uc774\ub2e4. \uc5f4 \uc218\uac00 \ud589 \uc218\uc5d0 \uadfc\uc811\ud558\uba74 \uacc4\uc218, \uace7 \uac01 \uc5f4\uc5d0 \uacf1\ud574\uc9c0\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta$<\/math-renderer> \uac12\uc744 \ud558\ub098\ub85c \uc815\ud560 \uc218 \uc5c6\ub2e4 (5.1 \uc808).<\/p>\n<p dir=\"auto\">\uc774 \ucc28\uc6d0\uc758 \uc800\uc8fc\ub97c \uac10\uc18c\uc2dc\ud0a4\uae30 \uc704\ud574\uc11c, \uc544\ub798 \uc138 \uac00\uc9c0\ub97c \uae30\ubcf8\uc73c\ub85c \ub454\ub2e4. \uae30\ubcf8\uc774\ub780 \uc790\ub8cc\uc5d0\uc11c \ub2ec\ub9ac \ud560 \uadfc\uac70\uac00 \ub098\uc624\uae30 \uc804\uae4c\uc9c0 \uadf8\ub300\ub85c \uc4f0\ub294 \uc124\uc815\uc774\ub77c\ub294 \ub73b\uc774\uba70, \uc14b\uc744 \ud568\uaed8 \ub450\uba74 \uc5f4 \uc218\uac00 \ud589 \uc218\ubcf4\ub2e4 \ucda9\ubd84\ud788 \uc801\uac8c \ub0a8\uace0 \ud45c\ubcf8\uc744 \ub2e4\uc2dc \ubf51\uc544\ub3c4 \uadf8 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta$<\/math-renderer> \uac00 \ud06c\uac8c \ud754\ub4e4\ub9ac\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li>\n<strong>Degree 2<\/strong> \u2014 \ub9cc\ub4e4 \ud56d\uc744 \ud55c \ubcc0\uc218\uc758 \uc81c\uacf1\uacfc \ub450 \ubcc0\uc218\uc758 \uacf1\uae4c\uc9c0\ub85c \uc81c\ud55c\ud55c\ub2e4 (5.1 \uc808).<\/li>\n<li>\n<strong>Standardization<\/strong> \u2014 Expansion \uc55e\ub4a4\ub85c \uac01 \uc5f4\uc744 \ud3c9\uade0 0, \ud45c\uc900\ud3b8\ucc28 1 \ub85c \ub9de\ucd98\ub2e4. \ud3c9\uade0\uc744 \ube7c\uba74 \uc5f4 \uc0ac\uc774\uc758 \uc0c1\uad00\uc774 \ub0ae\uc544\uc9c0\uace0 \uacc4\uc218\ub97c \uc77d\uc744 \uc218 \uc788\uac8c \ub418\uba70, \ud45c\uc900\ud3b8\ucc28\ub85c \ub098\ub204\uba74 \uc5f4\ub9c8\ub2e4 \ub2e4\ub978 \ud06c\uae30\uac00 \uc5c6\uc5b4\uc838 penalty \uac00 \uacf5\ud3c9\ud558\uac8c \uac78\ub9b0\ub2e4 (4.2, 4.3, 5.2 \uc808).<\/li>\n<li>\n<strong>Penalty<\/strong> \u2014 Expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc5d0 ridge \ub098 lasso \ub97c \uac74\ub2e4. Ridge \ub294 \ubaa8\ub4e0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta$<\/math-renderer> \ub97c \uac19\uc740 \ube44\uc728\ub85c \uc904\uc77c \ubfd0 0 \uc73c\ub85c \ub9cc\ub4e4\uc9c0 \uc54a\uace0, lasso \ub294 \uc791\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta$<\/math-renderer> \ub97c \uc815\ud655\ud788 0 \uc73c\ub85c \ub9cc\ub4e0\ub2e4 (5.2 \uc808).<\/li>\n<\/ul>\n<p dir=\"auto\">\uc138 \uac00\uc9c0 \uac00\uc6b4\ub370 \uc790\uc8fc \ube60\uc9c0\ub294 \uac83\uc740 standardization \uacfc penalty \ub2e4. Centering \ud558\uc9c0 \uc54a\uc740 \ubb3c\ub9ac \ub2e8\uc704\uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x^2$<\/math-renderer> \uc758 \uc0c1\uad00\uc740 1 \uc5d0 \uac00\uae5d\uace0 (4.2 \uc808), expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc740 \uc6d0 \ubcc0\uc218\uac00 \uc11c\ub85c \uc9c1\uad50\ud558\ub354\ub77c\ub3c4 \uc11c\ub85c \uc9c1\uad50\ud558\uc9c0 \uc54a\ub294\ub2e4. \uadf8\ub798\uc11c expansion \uc758 \uc2e4\ud328\ub294 model \uc774 \uc790\ub8cc\ub97c \ubabb \ub9de\ucd94\ub294 \ubaa8\uc2b5\uc774 \uc544\ub2c8\ub77c, \ud45c\ubcf8\uc744 \ub2e4\uc2dc \ubf51\uc744 \ub54c\ub9c8\ub2e4 \uacc4\uc218\uc758 \ubd80\ud638\uac00 \ub4a4\uc9d1\ud788\ub294 \ubaa8\uc2b5\uc73c\ub85c \ub098\ud0c0\ub09c\ub2e4. Centering \uc740 \uadf8 \uc0c1\uad00\uc744 \ub0ae\ucd9c \ubfd0 0 \uc73c\ub85c \ub9cc\ub4e4\uc9c0 \ubabb\ud558\ubbc0\ub85c (4.2 \uc808), \ubd80\ud638\uac00 \ub4a4\uc9d1\ud788\ub294 \uc77c\uc774 centering \ub9cc\uc73c\ub85c \uc0ac\ub77c\uc9c0\uc9c0\ub294 \uc54a\ub294\ub2e4. \ub0a8\ub294 \ubaab\uc740 penalty \uac00 \ub9e1\uc544, \ub2ee\uc740 \uc5f4\ub4e4\uc774 \uc11c\ub85c \uc0c1\uc1c4\ud558\ub294 \ud070 \uacc4\uc218\ub97c \uac16\uc9c0 \ubabb\ud558\uac8c \ud55c\ub2e4 (5.2 \uc808).<\/p>\n<p dir=\"auto\">Expansion \uc744 \uc4f0\uc9c0 \uc54a\uc544\uc57c \ud558\ub294 \uc790\ub9ac\ub3c4 \ubd84\uba85\ud558\ub2e4. \ubcc0\uc218\uac00 \uc218\uc2ed \uac1c\ub97c \ub118\uc73c\uba74 \uc5f4 \uc218\uac00 \ud45c\ubcf8 \uc218\ub97c \ub118\uace0, \ud55c \ubcc0\uc218 \uc548\uc5d0\uc11c \uc5ec\ub7ec \ubc88 \uaebe\uc774\ub294 \ubaa8\uc591\uc774 \ud544\uc694\ud558\uba74 degree \ub97c \uc62c\ub9ac\ub294 \ub300\uc2e0 spline \uc73c\ub85c \uac00\uc57c \ud558\uba70, \ud6c8\ub828 \uad6c\uac04 \ubc16\uc744 \uc608\uce21\ud574\uc57c \ud558\uba74 \uadf8 \uad6c\uac04 \ubc16\uc5d0\uc11c \ub2e4\ud56d\uc2dd\uc774 \ud3ed\uc8fc\ud558\ub294 \uc131\uc9c8, \uace7 extrapolation \uc774 \uadf8\ub300\ub85c \uc704\ud5d8\uc774 \ub41c\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Objective<\/h2><a id=\"user-content-3-objective\" class=\"anchor\" aria-label=\"Permalink: 3. Objective\" href=\"#3-objective\"><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\">Expansion \uc774 \ub178\ub9ac\ub294 \uac83\uc740 \ub450 \uac00\uc9c0\ub2e4. \ud55c \ubcc0\uc218 \uc548\uc758 \ube44\uc120\ud615 \uad00\uacc4\uc640 \ubcc0\uc218 \uc0ac\uc774\uc758 \uc0c1\ud638\uc791\uc6a9\uc774\uba70, \uc120\ud615 model \uc740 \ub458 \ub2e4 \ud45c\ud604\ud558\uc9c0 \ubabb\ud55c\ub2e4. \uc55e\uc758 \uac83\uc740 power term \uc774, \ub4a4\uc758 \uac83\uc740 interaction term \uc774 \ub9e1\uc73c\uba70, \ub458 \ub2e4 \uc5f4\ub85c \ub9cc\ub4e4\uc5b4\uc9c0\ubbc0\ub85c model \uc790\uccb4\ub294 \uc120\ud615\uc73c\ub85c \ub0a8\ub294\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1 Power Term<\/h3><a id=\"user-content-31-power-term\" class=\"anchor\" aria-label=\"Permalink: 3.1 Power Term\" href=\"#31-power-term\"><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\">\ud55c \ubcc0\uc218 \uc548\uc758 \ube44\uc120\ud615 \uad00\uacc4\ub294 \uadf8 \ubcc0\uc218\uc758 \uac70\ub4ed\uc81c\uacf1, \uace7 power term \uc774 \ub9e1\ub294\ub2e4. \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x$<\/math-renderer> \uc5d0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x^2$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x^3$<\/math-renderer> \uc744 \ub354\ud558\uba74 model \uc774 \ud559\uc2b5\ud558\ub294 \uc2dd\uc740 (1) \uc774\uba70, model \uc740 \uacc4\uc218\uc5d0 \ub300\ud574 \uc120\ud615\uc778 \ucc44\ub85c \uace1\uc120\uc744 \uadf8\ub9b0\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\hat{y} = \\beta_0 + \\beta_1 x + \\beta_2 x^2 + \\beta_3 x^3 \\hspace{19em} (1)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc5ec\uae30\uc11c \uc120\ud615\uc774\ub77c\ub294 \ub9d0\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x$<\/math-renderer> \uac00 \uc544\ub2c8\ub77c \uacc4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta$<\/math-renderer> \uc5d0 \ub300\ud55c \uac83\uc774\uba70, \uadf8\ub798\uc11c \uc794\ucc28 \uc81c\uacf1\ud569\uc744 \uac00\uc7a5 \uc791\uac8c \ud558\ub294 \uacc4\uc218\ub97c \ud478\ub294 \ucd5c\uc18c\uc81c\uacf1 (least squares) \uc774 \uadf8\ub300\ub85c \uc4f0\uc778\ub2e4. \uacc4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_2$<\/math-renderer> \ub294 \ud55c \ubc88 \uaebe\uc774\ub294 \uace1\ub960, \uace7 \uc815\uc810\uc774\ub098 \ud3ec\ud654\ub97c \ub2f4\uace0, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_3$<\/math-renderer> \uc740 \ud55c \ubc88 \ub354 \uaebe\uc774\ub294 \ubaa8\uc591\uc744 \ub2f4\ub294\ub2e4. \ube44\uc120\ud615\uc740 model \uc774 \uc544\ub2c8\ub77c \uc5f4\uc5d0 \ub4e4\uc5b4 \uc788\uc73c\ubbc0\ub85c, \uc4f0\ub358 \uc120\ud615 model \uacfc \uadf8 \uc704\uc5d0 \uc313\uc778 \ucd94\ub860\u00b7penalty \ub97c \uadf8\ub300\ub85c \ub454 \ucc44 \ube44\uc120\ud615\uc744 \uc5bb\ub294\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.2 Interaction Term<\/h3><a id=\"user-content-32-interaction-term\" class=\"anchor\" aria-label=\"Permalink: 3.2 Interaction Term\" href=\"#32-interaction-term\"><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\">\ubcc0\uc218 \uc0ac\uc774\uc758 \uc0c1\ud638\uc791\uc6a9\uc740 \uc11c\ub85c \ub2e4\ub978 \ub450 \ubcc0\uc218\uc758 \uacf1, \uace7 interaction term \uc774 \ub9e1\ub294\ub2e4. \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2$<\/math-renderer> \uc5d0 \uacf1 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1 x_2$<\/math-renderer> \ub97c \ub354\ud558\uba74 \uc2dd (2) \uac00 \ub41c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\hat{y} = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\beta_3 x_1 x_2 \\hspace{19em} (2)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uacf1\ud56d\uc740 \ud55c \ubcc0\uc218\uc758 \uae30\uc6b8\uae30\ub97c \ub2e4\ub978 \ubcc0\uc218\uac00 \ubc14\uafb8\ub3c4\ub85d \ud5c8\uc6a9\ud55c\ub2e4. \uc2dd (2) \ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer> \ub85c \ubbf8\ubd84\ud55c \uc2dd (3) \uc774 \uadf8 \ub73b\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\frac{\\partial \\hat{y}}{\\partial x_1} = \\beta_1 + \\beta_3 x_2 \\hspace{19em} (3)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_3$<\/math-renderer> \uc774 0 \uc774 \uc544\ub2c8\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer> \uc758 \ud6a8\uacfc\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2$<\/math-renderer> \uc758 \uc218\uc900\ub9c8\ub2e4 \ub2e4\ub974\ub2e4. \uacf5\uc815\uc73c\ub85c \uc62e\uae30\uba74 \uc555\ub825\uc758 \ud6a8\uacfc\uac00 \uc628\ub3c4\uc5d0 \ub530\ub77c \ub2ec\ub77c\uc9c4\ub2e4\ub294 \ub73b\uc774\uba70, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer> \uacfc <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2$<\/math-renderer> \uc758 1\ucc28 \ud56d \ub450 \uac1c\ub9cc\uc73c\ub85c\ub294 \uc801\uc744 \uc218 \uc5c6\ub2e4. \ub450 \ubcc0\uc218\uac00 \ud568\uaed8 \ub192\uc744 \ub54c\ub9cc \ub098\ud0c0\ub098\ub294 \ud6a8\uacfc\ub294 \uc774 \uacf1\ud56d\uc5d0\ub9cc \ub2f4\uae34\ub2e4. \uc751\ub2f5\uba74 (response surface), \uace7 \uacf5\uc815 \uc870\uac74 \uc704\uc5d0 \uc751\ub2f5\uc774 \uadf8\ub9ac\ub294 \uace1\uba74\uc744 2\ucc28 \ub2e4\ud56d\uc2dd\uc73c\ub85c \uc801\ub294 \uc624\ub79c \uad00\ud589\uc774 \uace1\ub960\uacfc \uc0c1\ud638\uc791\uc6a9\uc758 \uc870\ud569\uc774\uba70, \ucd5c\uc801 \uc870\uac74\uc744 \uadf8 \uace1\uba74\uc5d0\uc11c \uae30\uc6b8\uae30\uac00 0 \uc774 \ub418\ub294 \uc810 (stationary point) \uc73c\ub85c \uc77d\ub294 \ubc29\ubc95\uc774 \uac70\uae30\uc11c \ub098\uc654\ub2e4 [<a href=\"#ref-1\">1<\/a>].<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Mechanism<\/h2><a id=\"user-content-4-mechanism\" class=\"anchor\" aria-label=\"Permalink: 4. Mechanism\" href=\"#4-mechanism\"><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 Expansion<\/h3><a id=\"user-content-41-expansion\" class=\"anchor\" aria-label=\"Permalink: 4.1 Expansion\" href=\"#41-expansion\"><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\">Expansion \uc774 \ub9cc\ub4dc\ub294 \uc5f4\uc740 \uc6d0 \ubcc0\uc218\uc758 \uac70\ub4ed\uc81c\uacf1\uc744 \uacf1\ud55c \ud56d, \uace7 monomial \uc774\ub2e4. \ubcc0\uc218\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uac1c\uc774\uace0 \ucd5c\uace0 \ucc28\uc218\ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d$<\/math-renderer> \ub85c \ub450\uba74 \uc0c8 \uc5f4\uc740 \uc2dd (4) \uc758 \uc9d1\ud569\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\Phi_d(\\mathbf{x}) = \\left\\lbrace \\prod_{i=1}^{n} x_i^{a_i} \\ \\middle|\\ a_i \\in \\mathbb{Z}_{\\ge 0}, \\ 1 \\le \\sum_{i=1}^{n} a_i \\le d \\right\\rbrace \\hspace{19em} (4)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ubcc0\uc218\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$[X_1, X_2]$<\/math-renderer> \uc774\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 2$<\/math-renderer> \uc774\uba74 \ubaa8\ub4e0 \ud589\uc5d0\uc11c \uac12\uc774 1 \uc778 \uc0c1\uc218 \uc5f4, \uace7 \uc808\ud3b8 (intercept) \uc744 \ud3ec\ud568\ud55c \uc5f4\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$[1, X_1, X_2, X_1^2, X_1 X_2, X_2^2]$<\/math-renderer> \uc774\uba70, 3.1 \uc808\uc758 \uc81c\uacf1\ud56d\uacfc 3.2 \uc808\uc758 \uacf1\ud56d\uc774 \uadf8 \uc548\uc5d0 \ud568\uaed8 \ub4e4\uc5b4 \uc788\ub2e4. \ubcc0\uc218\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uac1c\uc778 2\ucc28 model \uc758 \uc77c\ubc18\ud615\uc740 \uc2dd (5) \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$y = \\beta_0 + \\sum_{i=1}^{n} \\beta_i x_i + \\sum_{1 \\le i \\le j \\le n} \\beta_{ij} x_i x_j + \\varepsilon \\hspace{19em} (5)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.2 Standardization<\/h3><a id=\"user-content-42-standardization\" class=\"anchor\" aria-label=\"Permalink: 4.2 Standardization\" href=\"#42-standardization\"><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\">Expansion \uc804\uc5d0 \uac01 \uc5f4\uc744 \ud3c9\uade0 0, \ud45c\uc900\ud3b8\ucc28 1 \ub85c \ub9de\ucd98\ub2e4.<\/p>\n<blockquote>\n<p dir=\"auto\"><strong>Definition: Standardization<\/strong><br>\n\uac01 \uc5f4\uc5d0\uc11c \ud3c9\uade0\uc744 \ube7c\uace0 \ud45c\uc900\ud3b8\ucc28\ub85c \ub098\ub204\uc5b4 \ud3c9\uade0 0, \ud45c\uc900\ud3b8\ucc28 1 \ub85c \ub9de\ucd94\ub294 \uac83\uc744 standardization \uc774\ub77c \ud55c\ub2e4.<\/p>\n<\/blockquote>\n<blockquote>\n<p dir=\"auto\"><strong>Definition: Centering<\/strong><br>\nStandardization \uac00\uc6b4\ub370 \ud3c9\uade0\uc744 \ube7c\ub294 \ubd80\ubd84\ub9cc \ub530\ub85c centering \uc774\ub77c \ud55c\ub2e4.<\/p>\n<\/blockquote>\n<p dir=\"auto\">\ub450 \ubd80\ubd84\uc774 \ud558\ub294 \uc77c\uc740 \ub2e4\ub974\ub2e4. \ud3c9\uade0\uc744 \ube7c\uba74 \uc5f4 \uc0ac\uc774\uc758 \uc0c1\uad00\uc774 \ub0ae\uc544\uc9c0\uace0 \uacc4\uc218\ub97c \uc77d\uc744 \uc218 \uc788\uac8c \ub418\uba70, \uc774\uac83\uc774 \uc544\ub798 \ub450 \ubb38\ub2e8\uc774\ub2e4. \ud45c\uc900\ud3b8\ucc28\ub85c \ub098\ub204\uba74 \uc5f4\ub9c8\ub2e4 \ub2e4\ub978 \ud06c\uae30\uac00 \uc5c6\uc5b4\uc9c0\uace0, \uadf8 \ubaab\uc740 4.3 \uc808\uacfc 5.2 \uc808\uc5d0 \uc788\ub2e4.<\/p>\n<p dir=\"auto\">Centering \uc758 \uccab \ubc88\uc9f8 \uc774\uc720\ub294 \uc0c1\uad00\uc758 \uac10\uc18c\ub2e4. \ub450 \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$Y$<\/math-renderer> \uc5d0 \ub300\ud55c \uacf5\ubd84\uc0b0\uacfc \uc0c1\uad00\uc758 \uc815\uc758\uac00 \uc2dd (6) \uacfc \uc2dd (7) \uc774\uba70, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$E[\\cdot]$<\/math-renderer> \ub294 \uae30\ub313\uac12 (expected value), <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{sd}$<\/math-renderer> \ub294 \ud45c\uc900\ud3b8\ucc28\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{Cov}(X, Y) = E[XY] - E[X]E[Y] \\hspace{19em} (6)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$r(X, Y) = \\frac{\\mathrm{Cov}(X, Y)}{\\mathrm{sd}(X) \\cdot \\mathrm{sd}(Y)} \\hspace{19em} (7)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc5ec\uae30\uc5d0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X = x$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$Y = x^2$<\/math-renderer> \uc744 \ub123\uace0, \ud45c\ubcf8\uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1, \\dots, x_N$<\/math-renderer>, \uadf8 \ud3c9\uade0\uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x}$<\/math-renderer>, \ud3c9\uade0\uc744 \ube80 \uac12\uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$u_i = x_i - \\overline{x}$<\/math-renderer> \ub85c \ub450\uc5b4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$u$<\/math-renderer> \uc758 \uc801\ub960\ub85c \uc815\ub9ac\ud558\uba74 \uc2dd (8) \uc774 \ub41c\ub2e4. \uc5ec\uae30\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t = \\overline{x} \/ \\sqrt{\\overline{u^2}}$<\/math-renderer> \ub294 \ud3c9\uade0\uc774 \ud769\uc5b4\uc9d0\uc758 \uba87 \ubc30\ub9cc\ud07c 0 \uc5d0\uc11c \ub5a8\uc5b4\uc838 \uc788\ub294\uc9c0\ub97c, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s = \\overline{u^3} \/ (\\overline{u^2})^{3\/2}$<\/math-renderer> \ub294 \ubd84\ud3ec\uac00 \ud55c\ucabd\uc73c\ub85c \uae30\uc6b4 \uc815\ub3c4 (skewness) \ub97c, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k = \\overline{u^4} \/ (\\overline{u^2})^2$<\/math-renderer> \ub294 \uaf2c\ub9ac\uc758 \ub450\uaed8 (kurtosis) \ub97c \uc7ac\uba70, \uc717\uc904\uc740 \ud45c\ubcf8 \ud3c9\uade0\uc774\ub2e4. \uc911\uac04 \uc720\ub3c4\ub294 <a href=\"#appendix-c-correlation-of-a-variable-and-its-square\">Appendix C<\/a> \uc5d0 \uc788\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$r(x, x^2) = \\frac{2t + s}{\\sqrt{k - 1 + 4t^2 + 4ts}} \\hspace{19em} (8)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Centering \uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x}$<\/math-renderer> \ub97c 0 \uc73c\ub85c \ub9cc\ub4e4\uc5b4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t = 0$<\/math-renderer> \uc744 \uac15\uc81c\ud558\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \ub294 \uac74\ub4dc\ub9ac\uc9c0 \uc54a\uc73c\ubbc0\ub85c, \uc2dd (8) \uc740 \uc2dd (9) \ub85c \uc904\uc5b4\ub4e0\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$r(u, u^2) = \\frac{s}{\\sqrt{k - 1}} \\hspace{19em} (9)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ub450 \uc2dd\uc758 \ucc28\uc774\uac00 centering \uc774 \uc0c1\uad00\uc744 \ub0ae\ucd94\ub294 \uadfc\uac70\ub2e4. \uc2dd (8) \uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lvert t \\rvert$<\/math-renderer> \ub97c \ud0a4\uc6b0\uba74 \ubd84\uc790\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$2t$<\/math-renderer>, \ubd84\ubaa8\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$2 \\lvert t \\rvert$<\/math-renderer> \uc5d0 \uac00\uae4c\uc6cc\uc9c0\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lvert r \\rvert$<\/math-renderer> \ub294 1 \ub85c \uac04\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t$<\/math-renderer> \ub294 \ud3c9\uade0\uc774 \ud769\uc5b4\uc9d0\uc758 \uba87 \ubc30\ub9cc\ud07c 0 \uc5d0\uc11c \ub5a8\uc5b4\uc838 \uc788\ub294\uc9c0\ub97c \uc7ac\ub294 \uac12\uc774\uc5b4\uc11c \ubb3c\ub9ac \ub2e8\uc704\uc758 \uc790\ub8cc\uc5d0\uc11c\ub294 \ud06c\uace0, \uadf8\ub798\uc11c \uadf8 \uc790\ub8cc\uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x^2$<\/math-renderer> \uc758 \uc0c1\uad00\uc740 1 \uc5d0 \ub2ff\ub294\ub2e4. \uc2dd (9) \uc5d0\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t$<\/math-renderer> \uac00 \uc5c6\ub2e4. Centering \ub4a4\uc758 \uc0c1\uad00\uc740 \ud3c9\uade0\uc758 \uc704\uce58\uc640 \ubb34\uad00\ud558\uac8c \ubd84\ud3ec\uc758 \ubaa8\uc591 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \ub85c\ub9cc \uc815\ud574\uc9c0\uba70, \ub300\uce6d \ubd84\ud3ec\uc5d0\uc11c\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s = 0$<\/math-renderer> \uc774\ubbc0\ub85c \uc815\ud655\ud788 0 \uc774\ub2e4.<\/p>\n<p dir=\"auto\">Centering \uc758 \ub450 \ubc88\uc9f8 \uc774\uc720\ub294 \ud574\uc11d\uc774\ub2e4. Centering \ud55c \uc790\ub8cc\uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_1$<\/math-renderer> \uc740 \ub2e4\ub978 \ubcc0\uc218\uac00 \ud3c9\uade0\uc77c \ub54c\uc758 \uae30\uc6b8\uae30\uc5ec\uc11c \uc77d\uc744 \uc218 \uc788\ub294 \uac12\uc774 \ub41c\ub2e4. Centering \ud558\uc9c0 \uc54a\uc73c\uba74 \uadf8\uac83\uc740 \ub2e4\ub978 \ubcc0\uc218\uac00 0 \uc77c \ub54c\uc758 \uae30\uc6b8\uae30\uc774\uace0, \uadf8 0 \uc740 \uc790\ub8cc\uc5d0 \uc5c6\ub294 \uc810\uc778 \uacbd\uc6b0\uac00 \ub9ce\ub2e4 [<a href=\"#ref-2\">2<\/a>].<\/p>\n<p dir=\"auto\">\ub2e4\ub9cc centering \uc740 \uc0c1\uad00\uc744 \ub0ae\ucd9c \ubfd0 \uc5c6\uc560\uc9c0 \ubabb\ud55c\ub2e4. Expansion \uc774 \ub9cc\ub4e0 collinearity \ub294 \uc790\ub8cc\uc758 \uc131\uc9c8\uc774 \uc544\ub2c8\ub77c expansion \uc790\uccb4\uc758 \uc131\uc9c8\uc774\ubbc0\ub85c, penalty \uac00 \ud568\uaed8 \ud544\uc694\ud558\ub2e4 (5.2 \uc808).<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.3 Conditioning<\/h3><a id=\"user-content-43-conditioning\" class=\"anchor\" aria-label=\"Permalink: 4.3 Conditioning\" href=\"#43-conditioning\"><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\">Conditioning \uc740 design matrix \ub97c \ud478\ub294 \uc77c\uc774 \uc785\ub825\uc758 \uc791\uc740 \uc624\ucc28\uc5d0 \uc5bc\ub9c8\ub098 \ubbfc\uac10\ud55c\uc9c0\ub97c \ub9d0\ud558\uba70, \uadf8\uac83\uc744 \uc7ac\ub294 \uac12\uc774 \uc870\uac74\uc218 (condition number) \ub2e4.<\/p>\n<p dir=\"auto\">Design matrix \ub294 \ud589\uc774 \uad00\uce21\uc774\uace0 \uc5f4\uc774 model \uc774 \uc4f0\ub294 \ud56d\uc778 \ud589\ub82c\uc774\ub2e4. 3.1 \uc808\uc758 \ucd5c\uc18c\uc81c\uacf1\uc740 \uc794\ucc28 \uc81c\uacf1\ud569\uc744 \uac00\uc7a5 \uc791\uac8c \ud558\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\boldsymbol{\\beta}$<\/math-renderer> \ub97c \uad6c\ud558\ub294 \uc77c\uc774\uace0 \uadf8 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\boldsymbol{\\beta}$<\/math-renderer> \ub294 design matrix <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{X}$<\/math-renderer> \uc640 \uc751\ub2f5 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{y}$<\/math-renderer> \ub85c \uc801\uc740 \uc5f0\ub9bd\ubc29\uc815\uc2dd <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{X}^{\\top} \\mathbf{X} \\boldsymbol{\\beta} = \\mathbf{X}^{\\top} \\mathbf{y}$<\/math-renderer> \uc758 \ud574\uc774\ubbc0\ub85c, model \uc744 \uc801\ud569\ud558\ub294 \uc77c, \uace7 \uc790\ub8cc\uac00 \uac00\ub9ac\ud0a4\ub294 \uacc4\uc218 \uac12\uc744 \uc815\ud558\ub294 \uc77c\uc774 \uc774 \ud589\ub82c\uc744 \ud478\ub294 \uc77c\uc774\ub2e4. \uc2dd (1) \uacfc \uc2dd (2) \uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\boldsymbol{\\beta}$<\/math-renderer> \ub97c \uad6c\ud558\ub294 \uc77c\ub3c4 \uadf8\uac83\uc774\ub2e4. \uc2dd (1) \uc740 \uc5f4\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$[1, x, x^2, x^3]$<\/math-renderer> \uc778 design matrix \ub97c, \uc2dd (2) \ub294 \uc5f4\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$[1, x_1, x_2, x_1 x_2]$<\/math-renderer> \uc778 design matrix \ub97c \ub9cc\ub4e4\uace0, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\boldsymbol{\\beta}$<\/math-renderer> \ub294 \uadf8 \ud589\ub82c\ub85c \uc801\uc740 \uc5f0\ub9bd\ubc29\uc815\uc2dd\uc758 \ud574\ub2e4. \uc2dd (1) \uc758 \uc5f0\ub9bd\ubc29\uc815\uc2dd\uc744 \uad00\uce21\ub9c8\ub2e4 \uc801\uc73c\uba74 \uc2dd (10) \uc774\uba70, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_i$<\/math-renderer> \ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$i$<\/math-renderer> \ubc88\uc9f8 \uad00\uce21, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$y_i$<\/math-renderer> \ub294 \uadf8 \uad00\uce21\uc758 \uc751\ub2f5\uc774\ub2e4. \uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$N$<\/math-renderer> \uac1c\uc758 \uc2dd\uc744 \ud55c \uc904\ub85c \ubb36\uc740 \uac83\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{X} \\boldsymbol{\\beta} = \\mathbf{y}$<\/math-renderer> \ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$y_i = \\beta_0 + \\beta_1 x_i + \\beta_2 x_i^2 + \\beta_3 x_i^3, \\qquad i = 1, \\dots, N \\hspace{12em} (10)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc870\uac74\uc218\uc758 \uc815\uc758\ub294 \uc2dd (11) \uc774\ub2e4. \uc5f0\ub9bd\ubc29\uc815\uc2dd <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{A}\\mathbf{z} = \\mathbf{b}$<\/math-renderer> \uc5d0\uc11c \uc624\ub978\ucabd <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{b}$<\/math-renderer> \uc758 \uc0c1\ub300\uc624\ucc28\uac00 \ud574 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{z}$<\/math-renderer> \uc758 \uc0c1\ub300\uc624\ucc28\ub85c \ucee4\uc9c0\ub294 \ubc30\uc218\uc758 \uc0c1\ud55c\uc774 \uadf8 \uacc4\uc218\ud589\ub82c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{A}$<\/math-renderer> \uc758 \uc870\uac74\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\kappa(\\mathbf{A})$<\/math-renderer> \uc774\uba70, \uadf8 \uac12\uc740 \ucd5c\ub300 \ud2b9\uc774\uac12\uacfc \ucd5c\uc18c \ud2b9\uc774\uac12\uc758 \ube44\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\frac{\\lVert \\Delta \\mathbf{z} \\rVert}{\\lVert \\mathbf{z} \\rVert} \\le \\kappa(\\mathbf{A}) \\frac{\\lVert \\Delta \\mathbf{b} \\rVert}{\\lVert \\mathbf{b} \\rVert}, \\qquad \\kappa(\\mathbf{A}) = \\frac{\\sigma_{\\max}}{\\sigma_{\\min}} \\hspace{12em} (11)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uace7 \uc870\uac74\uc218\ub294 \uc785\ub825\uacfc \ucd9c\ub825\uc758 \ube44\uac00 \uc544\ub2c8\ub77c \uc0c1\ub300\uc624\ucc28\uac00 \ucee4\uc9c0\ub294 \ubc30\uc218\uc758 \uc0c1\ud55c\uc774\ub2e4. \uc774 \ubb38\uc11c\uac00 \uc801\ub294 \uac12\uc740 design matrix \uc758 \uc870\uac74\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\kappa(\\mathbf{X})$<\/math-renderer> \uc774\uace0, \uc815\uaddc\ubc29\uc815\uc2dd\uc758 \uacc4\uc218\ud589\ub82c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{X}^{\\top} \\mathbf{X}$<\/math-renderer> \uc758 \uc870\uac74\uc218\ub294 \uadf8\uac83\uc758 \uc81c\uacf1\uc774\ub2e4. \uc2dd (11) \uc744 \uc2dd (10) \uc758 \uacbd\uc6b0\ub85c \uc801\uc73c\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{A} = \\mathbf{X}^{\\top} \\mathbf{X}$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{z} = \\boldsymbol{\\beta}$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{b} = \\mathbf{X}^{\\top} \\mathbf{y}$<\/math-renderer> \uc5ec\uc11c \uc2dd (12) \uac00 \ub41c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\frac{\\lVert \\Delta \\boldsymbol{\\beta} \\rVert}{\\lVert \\boldsymbol{\\beta} \\rVert} \\le \\kappa(\\mathbf{X})^2 \\frac{\\lVert \\Delta \\mathbf{X}^{\\top} \\mathbf{y} \\rVert}{\\lVert \\mathbf{X}^{\\top} \\mathbf{y} \\rVert} \\hspace{12em} (12)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc870\uac74\uc218\ub97c \uc62c\ub9ac\ub294 \uac83\uc740 degree \uc640 \uc5f4 \uc0ac\uc774\uc758 collinearity \uc774\uace0, \ub0b4\ub9ac\ub294 \uac83\uc740 standardization \uc774\ub2e4. \ud3c9\uade0\uc744 \ube7c\uba74 \uc5f4 \uc0ac\uc774\uc758 \uacb9\uce68\uc774 \uc904\uace0 \ud45c\uc900\ud3b8\ucc28\ub85c \ub098\ub204\uba74 \uc5f4\ub9c8\ub2e4 \ub2e4\ub978 \ud06c\uae30\uac00 \uc5c6\uc5b4\uc9c0\ubbc0\ub85c, \ub450 \ubd80\ubd84\uc744 \ud568\uaed8 \ud574\uc57c \uc870\uac74\uc218\uac00 \uac00\uc7a5 \ub0ae\uc544\uc9c4\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">4.4 Heredity<\/h3><a id=\"user-content-44-heredity\" class=\"anchor\" aria-label=\"Permalink: 4.4 Heredity\" href=\"#44-heredity\"><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\">\uacf1\ud56d\uc744 \ub0a8\uae30\uba74 \uadf8 \uacf1\uc744 \uc774\ub8e8\ub294 \ub450 \ubcc0\uc218\uc758 1\ucc28 \ud56d, \uace7 main effect \ub3c4 \ud568\uaed8 \ub0a8\uae34\ub2e4. \uc774 \uaddc\uce59\uc744 heredity \ub77c \ud558\uba70, \uadfc\uac70\ub294 \ud1b5\uacc4\uac00 \uc544\ub2c8\ub77c \uc88c\ud45c\uacc4\uc5d0 \uc788\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$y = \\beta_{12} x_1 x_2$<\/math-renderer> \ucc98\ub7fc \uacf1\ud56d\ub9cc \uc788\ub294 model \uc5d0 \uc6d0\uc810 \uc774\ub3d9 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1 = z_1 + a$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2 = z_2 + b$<\/math-renderer> \ub97c \ub123\uc73c\uba74 \uc2dd (13) \uc774 \ub41c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\beta_{12} (z_1 + a)(z_2 + b) = \\beta_{12} z_1 z_2 + \\beta_{12} b z_1 + \\beta_{12} a z_2 + \\beta_{12} ab \\hspace{19em} (13)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc2dd (13) \uc758 \uc624\ub978\ucabd\uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_{12} b z_1$<\/math-renderer> \uacfc <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_{12} a z_2$<\/math-renderer> \uac00 \uac01\uac01 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$z_1$<\/math-renderer> \uacfc <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$z_2$<\/math-renderer> \uc758 1\ucc28 \ud56d, \uace7 main effect \ub2e4. Model \uc5d0 \ub123\uc9c0 \uc54a\uc558\ub294\ub370\ub3c4 \uc6d0\uc810\uc744 \uc62e\uae34 \uac83\ub9cc\uc73c\ub85c \uc800\uc808\ub85c \uc0dd\uae34\ub2e4. \uace7 main effect \uc5c6\ub294 \uacf1\ud56d model \uc740 \uc6d0\uc810\uc744 \uc5b4\ub514\uc5d0 \ub450\uc5c8\ub290\ub0d0\uc5d0 \ub530\ub77c \ub2ec\ub77c\uc838, \uc628\ub3c4\ub97c \uc12d\uc528\ub85c \uc7ac\ub290\ub0d0 \uc808\ub300\uc628\ub3c4\ub85c \uc7ac\ub290\ub0d0\uac00 model \uc744 \ubc14\uafbc\ub2e4. Main effect \ub97c \ud568\uaed8 \ub454 model <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$y = \\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + \\beta_{12} x_1 x_2$<\/math-renderer> \uc5d0 \uac19\uc740 \uc774\ub3d9\uc744 \ub123\uc73c\uba74 \uacf1\ud56d\uc758 \uacc4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_{12}$<\/math-renderer> \ub294 \uadf8\ub300\ub85c\uc774\uace0, 1\ucc28 \ud56d\uc758 \uacc4\uc218\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_1 + \\beta_{12} b$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_2 + \\beta_{12} a$<\/math-renderer> \ub85c, \uc808\ud3b8\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_0 + \\beta_1 a + \\beta_2 b + \\beta_{12} ab$<\/math-renderer> \ub85c \ubc14\ub014 \ubfd0 model \uc758 \uaf34\uc740 \uac19\ub2e4. \uace7 \uc6d0\uc810\uc744 \uc62e\uae34 \uacb0\uacfc\uac00 \uacc4\uc218 \uac12\uc758 \uc7ac\ubc30\uc5f4\ub85c \ud761\uc218\ub418\uc5b4 \uc801\ud569\ub41c \uace1\uba74\uc740 \ub2ec\ub77c\uc9c0\uc9c0 \uc54a\ub294\ub2e4. \uacf1\uc744 \uc774\ub8e8\ub294 \ubcc0\uc218 \uac00\uc6b4\ub370 \ud558\ub098\ub9cc \uc788\uc5b4\ub3c4 \ub41c\ub2e4\ub294 \uc57d\ud55c \ud615\ud0dc (weak heredity) \ub97c \uadfc\uac70\ub85c main effect \ub97c \uc9c0\uc6b0\ub294 \uad00\ud589\uc774 \uc788\uc73c\ub098, \uadf8\uac83\uc774 \uc815\ub2f9\ud654\ub418\ub294 \uc870\uac74\uc740 \uc2e4\ubb34\uc5d0\uc11c \uac70\uc758 \uc131\ub9bd\ud558\uc9c0 \uc54a\ub294\ub2e4 [<a href=\"#ref-4\">4<\/a>]. \ubcc0\uc218 \uc120\ud0dd\uc744 \uc790\ub3d9\ud654\ud560 \ub54c\ub3c4 heredity \ub97c Bayes \uc758 \uc0ac\uc804 \ubd84\ud3ec (prior) \ub098 \ucd5c\uc801\ud654\uc758 \uc81c\uc57d\uc73c\ub85c \uac78\uc5b4 \ub450\ub294 \ud3b8\uc774 \ub0ab\ub2e4 [<a href=\"#ref-5\">5<\/a>] [<a href=\"#ref-6\">6<\/a>].<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. Caution<\/h2><a id=\"user-content-5-caution\" class=\"anchor\" aria-label=\"Permalink: 5. Caution\" href=\"#5-caution\"><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\">Expansion \uc758 \ub300\uac00\ub294 \ub450 \uac00\uc9c0\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li><strong>\uc5f4 \uc218<\/strong> \u2014 \uc5f4 \uc218\uac00 \ube60\ub974\uac8c \ub298\uc5b4 overfitting, \uace7 \ud6c8\ub828 \uc790\ub8cc\uc5d0\ub294 \ub9de\uc9c0\ub9cc \uc0c8 \uc790\ub8cc\uc5d0\uc11c\ub294 \uc5b4\uae0b\ub098\ub294 \uc0c1\ud0dc\ub97c \ubd80\ub974\uace0 \uacc4\uc0b0 \ube44\uc6a9\uc744 \uc62c\ub9b0\ub2e4. Degree \ub85c \uc7a1\ub294\ub2e4 (5.1 \uc808).<\/li>\n<li><strong>\uacc4\uc218\uc758 \ud754\ub4e4\ub9bc<\/strong> \u2014 Expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc774 \uc11c\ub85c \ub2ee\uc544 \uacc4\uc218\uac00 \ud45c\ubcf8\uc5d0 \ub530\ub77c \ud06c\uac8c \uc6c0\uc9c1\uc778\ub2e4. Penalty \ub85c \uc7a1\ub294\ub2e4 (5.2 \uc808).<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.1 Dimensionality And Overfitting<\/h3><a id=\"user-content-51-dimensionality-and-overfitting\" class=\"anchor\" aria-label=\"Permalink: 5.1 Dimensionality And Overfitting\" href=\"#51-dimensionality-and-overfitting\"><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\">\uc5f4\uc758 \uc218\ub294 \ubcc0\uc218\uc758 \uc218\uc5d0 \ub300\ud574 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d$<\/math-renderer> \ucc28\ub85c \ub298\uc5b4\ub09c\ub2e4. \uc5f4\uc774 \ub298\uc218\ub85d \uadf8 \uc5f4\ub4e4\uc774 \uc774\ub8e8\ub294 \uacf5\uac04\uc744 \uac19\uc740 \ubc00\ub3c4\ub85c \ucc44\uc6b0\ub294 \ub370 \ud544\uc694\ud55c \uad00\uce21 \uc218\ub294 \uc9c0\uc218\ub85c \ub298\uc5b4\ub098\uba70, \uc774\uac83\uc744 curse of dimensionality \ub77c \ud55c\ub2e4. Expansion \uc740 \ud589 \uc218\ub97c \uadf8\ub300\ub85c \ub454 \ucc44 \uc5f4\ub9cc \ub298\ub9ac\ubbc0\ub85c \uadf8 \ud604\uc0c1\uc744 \uc790\ucd08\ud55c\ub2e4. \uc808\ud3b8\uc744 \ube80 \uc804\uccb4 expansion \uc758 \uc5f4 \uc218\ub294 \uc2dd (14), \uc11c\ub85c \ub2e4\ub978 \ubcc0\uc218\uc758 \uacf1\ub9cc \ub0a8\uae30\ub294 <code>interaction_only<\/code> \uc758 \uc5f4 \uc218\ub294 \uc2dd (15) \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$m_{\\mathrm{full}} = \\binom{n+d}{d} - 1 \\hspace{19em} (14)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$m_{\\mathrm{inter}} = \\sum_{j=1}^{\\min(d,\\ n)} \\binom{n}{j} \\hspace{19em} (15)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ub450 \uc2dd\uc740 \ubaa8\ub450 \uc2dd (4) \uc758 \uc9d1\ud569\uc5d0\uc11c \ub098\uc624\uba70, \uadf8 \uc720\ub3c4\ub294 <a href=\"#appendix-d-term-count-derivation\">Appendix D<\/a> \uc5d0 \uc788\ub2e4.<\/p>\n<p dir=\"auto\">Table 1. Column count after expansion, original variables included and bias column excluded<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer><\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$m_{\\mathrm{full}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 2$<\/math-renderer>\n<\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$m_{\\mathrm{inter}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 2$<\/math-renderer>\n<\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$m_{\\mathrm{full}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 3$<\/math-renderer>\n<\/th>\n<th>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$m_{\\mathrm{inter}}$<\/math-renderer> at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 3$<\/math-renderer>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>2<\/td>\n<td>5<\/td>\n<td>3<\/td>\n<td>9<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>20<\/td>\n<td>15<\/td>\n<td>55<\/td>\n<td>25<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>65<\/td>\n<td>55<\/td>\n<td>285<\/td>\n<td>175<\/td>\n<\/tr>\n<tr>\n<td>100<\/td>\n<td>5,150<\/td>\n<td>5,050<\/td>\n<td>176,850<\/td>\n<td>166,750<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">Table 1 \uc5d0\uc11c \uc77d\uc744 \uac83\uc740 <code>interaction_only<\/code> \uac00 \uc904\uc5ec \uc8fc\ub294 \ubaab\uc774 \uc791\ub2e4\ub294 \uc0ac\uc2e4\uc774\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 2$<\/math-renderer> \uc5d0\uc11c \uadf8 \ucc28\uc774\ub294 \uc81c\uacf1\ud56d <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uac1c\ubfd0\uc774\uc5b4\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n = 100$<\/math-renderer> \uc758 5,150 \uc774 5,050 \uc774 \ub420 \ubfd0\uc774\ub2e4. \uace7 \uc774 option \uc740 \uc5f4 \uc218\ub97c \uc904\uc774\ub824\uace0 \ucf1c\ub294 \uac83\uc774 \uc544\ub2c8\ub77c, \ud55c \ubcc0\uc218 \uc548\uc758 \uace1\ub960\uc744 model \uc5d0 \ub123\uc9c0 \uc54a\uaca0\ub2e4\ub294 \ud310\ub2e8\uc744 \uc801\uc5b4 \ub450\ub294 \uac83\uc774\ub2e4.<\/p>\n<p dir=\"auto\">\uc5f4 \uc218\ub97c \uc2e4\uc81c\ub85c \uc815\ud558\ub294 \uac83\uc740 degree \ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d$<\/math-renderer> \ub97c 2 \uc5d0\uc11c 3 \uc73c\ub85c \uc62c\ub9ac\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n = 10$<\/math-renderer> \uc5d0\uc11c \uc5f4\uc740 65 \uc5d0\uc11c 285 \ub85c \ub298\uc5b4\ub09c\ub2e4. \uc5f4 \uc218\uac00 \ud589 \uc218\uc5d0 \uac00\uae4c\uc6cc\uc9c0\uba74 \ucd5c\uc18c\uc81c\uacf1\uc758 \ud574\ub294 \ubd88\uc548\uc815\ud574\uc9c0\uace0 \ub118\uc5b4\uc11c\uba74 \uc720\uc77c\ud558\uc9c0 \uc54a\uc73c\ubbc0\ub85c, expansion \uc758 \uc0c1\ud55c\uc744 \uc815\ud558\ub294 \uac83\uc740 degree \uac00 \uc544\ub2c8\ub77c \ud45c\ubcf8 \uc218\uc774\ub2e4.<\/p>\n<p dir=\"auto\">\uadf8\ub798\uc11c degree \ub294 \uc774\ub860\uc774 \uc544\ub2c8\ub77c \uc801\ud569\uc5d0 \uc4f0\uc9c0 \uc54a\uace0 \ub0a8\uaca8 \ub454 \uc790\ub8cc\uc758 \uc624\ucc28, \uace7 held-out \uc624\ucc28\ub85c \uace0\ub974\uba70, \ud6c4\ubcf4\ub294 \uc881\ub2e4. \uc2e4\ubb34\uc758 \uac70\uc758 \ubaa8\ub4e0 \uacbd\uc6b0\uc5d0 2 \uc774\uace0, 3 \uc774 \ud544\uc694\ud55c \uc790\ub8cc\ub294 \ub4dc\ubb3c\uba70, 4 \uc774\uc0c1\uc774 \uc774\uae30\ub294 \uac83\ucc98\ub7fc \ubcf4\uc774\uba74 expansion \uc774 \uc544\ub2c8\ub77c \ub2e4\ub978 \ubc29\ubc95\uc744 \uc368\uc57c \ud55c\ub2e4\ub294 \uc2e0\ud638\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.2 Regularization<\/h3><a id=\"user-content-52-regularization\" class=\"anchor\" aria-label=\"Permalink: 5.2 Regularization\" href=\"#52-regularization\"><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\">Expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc5d0\ub294 penalty \ub97c \ubc18\ub4dc\uc2dc \ud568\uaed8 \uac74\ub2e4. Penalty \ub294 \uacc4\uc218\uc758 \ud06c\uae30\uc5d0 \uac12\uc744 \ub9e4\uaca8 \uc801\ud569 \uae30\uc900\uc5d0 \ub354\ud558\ub294 \ud56d\uc774\ub2e4. Expansion \uc740 \uc5f4 \uc218\ub97c \ub298\ub9ac\ub294 \ub3d9\uc2dc\uc5d0 \uc11c\ub85c \ub2ee\uc740 \uc5f4\uc744 \ub9cc\ub4dc\ub294\ub370, penalty \uc5c6\ub294 \ucd5c\uc18c\uc81c\uacf1\uc740 \uadf8 \ub2ee\uc74c\uc744 \uc11c\ub85c \uc0c1\uc1c4\ud558\ub294 \ub450 \uac1c\uc758 \ud070 \uacc4\uc218\ub85c \ud761\uc218\ud558\uba70, \uadf8\ub798\uc11c \uc790\ub8cc\uac00 \uc870\uae08\ub9cc \ud754\ub4e4\ub824\ub3c4 \uc801\ud569\uc774 \ud06c\uac8c \uc6c0\uc9c1\uc778\ub2e4. Ridge \ub294 \uacc4\uc218 \uc81c\uacf1\ud569\uc5d0 \ube44\ub840\ud558\ub294 penalty \ub97c \uac78\uc5b4 \uadf8 \uc0c1\uc1c4\ub97c \ub9c9\ub294\ub2e4 [<a href=\"#ref-3\">3<\/a>].<\/p>\n<p dir=\"auto\">\ub458 \uc911 \uae30\ubcf8\uc740 ridge \ub2e4. Ridge \ub294 \ub2ee\uc740 \uc5f4\ub4e4\uc5d0 \uacc4\uc218\ub97c \ub098\ub204\uc5b4 \uc8fc\uc5b4 \uc608\uce21\uc744 \uc548\uc815\uc2dc\ud0a4\uace0, lasso \ub294 \uadf8 \uac00\uc6b4\ub370 \ud558\ub098\ub9cc \ub0a8\uae30\uace0 \ub098\uba38\uc9c0\ub97c \uc9c0\uc6b4\ub2e4. Expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc5d0\uc11c lasso \ub294 \uacf1\ud56d\uc744 \ub0a8\uae30\uace0 \uadf8 main effect \ub97c \uc9c0\uc6cc 4.4 \uc808\uc758 heredity \ub97c \uae68\ub728\ub9b4 \uc218 \uc788\uc73c\ubbc0\ub85c, \ud640\ub85c \uc4f0\uae30\ubcf4\ub2e4 \uacc4\uce35 \uc81c\uc57d\uacfc \ud568\uaed8 \uc4f4\ub2e4 [<a href=\"#ref-6\">6<\/a>].<\/p>\n<p dir=\"auto\">Ridge \uac00 \uacc4\uc218\ub97c 0 \uc73c\ub85c \ub9cc\ub4e4\uc9c0 \uc54a\ub294\ub2e4\ub294 \uac83\uc740 ridge \ub85c\ub294 \uc5f4\uc744 \uc9c0\uc6b8 \uc218 \uc5c6\ub2e4\ub294 \ub73b\uc774\ub2e4. \uadf8\ub798\ub3c4 \uae30\ubcf8\uc73c\ub85c \ub450\ub294 \uc774\uc720\ub294 expansion \uc5d0\uc11c penalty \uac00 \ubc84\ub294 \uac83\uc774 \uc5f4\uc758 \uac1c\uc218\uac00 \uc544\ub2c8\ub77c \uc608\uce21\uc758 \uc548\uc815\uc774\uae30 \ub54c\ubb38\uc774\uba70, \uadf8 \ud06c\uae30\ub294 5.1 \uc808\uc758 degree 3 \uc5d0\uc11c held-out RMSE \uac00 1.08 \uc5d0\uc11c 0.75 \ub85c \ub0b4\ub824\uac00\ub294 \ucc28\uc774\ub2e4. \uc5f4\uc758 \uac1c\uc218\ub97c \uc2e4\uc81c\ub85c \uc904\uc5ec\uc57c \ud558\uba74 \uadf8\uac83\uc740 lasso \ub098 elastic net \uc758 \ubaab\uc774\ub2e4.<\/p>\n<p dir=\"auto\">Penalty \ub294 \uc5f4\uc758 \ud06c\uae30\uc5d0 \uac78\ub9ac\ubbc0\ub85c expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc744 standardization \ud55c \ub4a4\uc5d0 \uc801\uc6a9\ud558\uba70, <a href=\"#appendix-f-implementation\">Appendix F<\/a> \uc758 pipeline \uc5d0 \ub450 \ubc88\uc9f8 standardization \uc774 \ub4e4\uc5b4\uac00\ub294 \uc774\uc720\uac00 \uadf8\uac83\uc774\ub2e4. \uc138 penalty \uc758 \ubaa9\uc801 \ud568\uc218\uc640 \uac01\uac01\uc774 \uacc4\uc218\ub97c \uc5bc\ub9c8\ub098 \uc6c0\uc9c1\uc774\ub294\uc9c0\ub294 <a href=\"#appendix-e-ridge-and-lasso-on-expanded-columns\">Appendix E<\/a> \uc5d0 \uc788\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.3 Evidence<\/h3><a id=\"user-content-53-evidence\" class=\"anchor\" aria-label=\"Permalink: 5.3 Evidence\" href=\"#53-evidence\"><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\">Fig 1 \uc740 \uc55e\uc758 \uc138 \uaf2d\uc9c0\uac00 \ub9d0\ud55c \uac83\uc744 \ud55c \uc790\ub8cc\uc5d0\uc11c \uc7b0 \uadf8\ub9bc\uc774\ub2e4. (a) \ub294 degree \uc640 extrapolation (5.1 \uc808), (b) \ub294 \uc870\uac74\uc218 (4.3 \uc808), (c) \ub294 \uc5f4 \uc218\uac00 \ud589 \uc218\uc5d0 \ub2ff\uc744 \ub54c\uc758 held-out \uc624\ucc28\uc640 penalty \uc758 \ud6a8\uacfc (5.2 \uc808) \ub2e4.<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/ykim2718\/AIML\/blob\/main\/Feature-Engineering\/PFE\/polynomial-feature-expansion_fig\/fig1.png\"><img src=\"https:\/\/ykim.synology.me\/wordpress\/wp-json\/gh-readme\/v1\/asset?user=ykim2718&#038;repo=AIML&#038;branch=main&#038;path=Feature-Engineering\/PFE\/polynomial-feature-expansion_fig\/fig1.png&#038;sig=2d52727316ac062e97e7f124893c9d0d888696aed02877c460f060b813314971\" width=\"1100\" alt=\"Fig 1\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">Fig 1. Degree and extrapolation, conditioning, and the cost of expansion<\/p>\n<p dir=\"auto\">Fig 1(a) \ub294 degree \ub97c \ub0ae\uac8c \ub450\ub294 \uc774\uc720\ub2e4. 60 \uac1c \ud45c\ubcf8\uc5d0 degree 2, 5, 9 \ub97c \ub9de\ucd98 \uac83\uc73c\ub85c, \ud6c8\ub828 \uad6c\uac04 (\ud68c\uc0c9) \uc548\uc5d0\uc11c\ub294 degree 5 \uc640 9 \uac00 \ubaa8\ub450 \uadf8\ub7f4\ub4ef\ud558\uc9c0\ub9cc \uad6c\uac04\uc744 \ubc97\uc5b4\ub098\uba74 \ucc28\uc218\uac00 \ub192\uc740 \uace1\uc120\uc774 \uba3c\uc800 \ud3ed\uc8fc\ud55c\ub2e4. \ub2e4\ud56d\uc2dd\uc758 \ubc14\uae65 \uac70\ub3d9\uc740 \ucd5c\uace0\ucc28\ud56d\uc774 \uc9c0\ubc30\ud558\ubbc0\ub85c, extrapolation \uc774 \ud544\uc694\ud55c \uacf3\uc5d0\uc11c degree \ub97c \uc62c\ub9ac\uba74 \ud6c8\ub828 \uad6c\uac04 \uc548\uc758 \uc801\ud569\uc740 \uc88b\uc544\uc838\ub3c4 \uad6c\uac04 \ubc16 \uc608\uce21\uc758 \uc624\ucc28\ub294 \ucee4\uc9c4\ub2e4.<\/p>\n<p dir=\"auto\">Fig 1(b) \ub294 4.3 \uc808\uc758 \uc870\uac74\uc218\ub97c \ucc28\uc218\ubcc4\ub85c \uadf8\ub9b0 \uac83\uc774\uace0, Fig 1(c) \ub294 \ud56d \uc218\uc640 \ud589 \uc218\uc758 \uad00\uacc4\ub2e4. \ubcc0\uc218 5 \uac1c, \ud589 60 \uac1c, \ucc38 model \uc774 \uacf1\ud56d \ud558\ub098\uc778 \uc790\ub8cc\uc5d0\uc11c held-out RMSE, \uace7 \uadf8 \uc624\ucc28\ub97c \uc81c\uacf1 \ud3c9\uade0\uc758 \uc81c\uacf1\uadfc\uc73c\ub85c \uc7b0 \uac12\uc740 degree 1 \uc758 1.34 \uc5d0\uc11c degree 2 \uc758 0.34 \ub85c \ub0b4\ub824\uac14\ub2e4\uac00 degree 3 \uc5d0\uc11c 1.08 \ub85c \ub418\ub3cc\uc544\uac04\ub2e4. degree 3 \uc758 \uc5f4 \uc218\ub294 55 \ub85c \ud589 \uc218 60 \uc5d0 \uac70\uc758 \ub2ff\ub294\ub2e4. \uac19\uc740 \uc790\ub9ac\uc5d0\uc11c ridge \ub294 0.75 \uc5ec\uc11c \uadf8 \uc545\ud654\uc758 \uc808\ubc18 \uac00\uae4c\uc774\ub97c \ub9c9\ub294\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.4 Failure Modes<\/h3><a id=\"user-content-54-failure-modes\" class=\"anchor\" aria-label=\"Permalink: 5.4 Failure Modes\" href=\"#54-failure-modes\"><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\">Expansion \uc774 \uc2e4\ud328\ud558\ub294 \ubaa8\uc2b5\uc740 \uc5ec\uc12f \uac00\uc9c0\ub85c \uc815\ub9ac\ub41c\ub2e4. \ub300\ubd80\ubd84\uc740 model \uc774 \ubabb \ub9de\ucd94\ub294 \ubaa8\uc2b5\uc774 \uc544\ub2c8\ub77c \uacc4\uc218\ub098 \uc608\uce21\uc774 \ubd88\uc548\uc815\ud574\uc9c0\ub294 \ubaa8\uc2b5\uc73c\ub85c \uc628\ub2e4.<\/p>\n<p dir=\"auto\">Table 2. Failure modes of a polynomial expansion<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>#<\/th>\n<th>Symptom<\/th>\n<th>Cause<\/th>\n<th>Countermeasure<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>Degree 2 \uc758 held-out \uc624\ucc28\uac00 degree 1 \ubcf4\ub2e4 \ub098\uc068<\/td>\n<td>\ud56d \uc218\uac00 \ud589 \uc218\uc5d0 \uac00\uae4c\uc6c0<\/td>\n<td>Ridge \ub098 lasso, <code>interaction_only<\/code>, \uc120\ud0dd\uc801 expansion<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\ud45c\ubcf8\uc744 \ub2e4\uc2dc \ubf51\uc744 \ub54c\ub9c8\ub2e4 \uacc4\uc218\uc758 \ubd80\ud638\uac00 \ub4a4\uc9d1\ud798<\/td>\n<td>Expansion \uc774 \ub9cc\ub4e0 collinearity<\/td>\n<td>Centering, penalty, \uacc4\uc218 \ub300\uc2e0 \uc608\uce21\uc744 \uc77d\uae30<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\ud6c8\ub828 \uad6c\uac04\uc744 \uc870\uae08 \ubc97\uc5b4\ub098\uba74 \uc608\uce21\uc774 \ud3ed\uc8fc\ud568<\/td>\n<td>\ub2e4\ud56d\uc2dd\uc758 extrapolation \uac70\ub3d9<\/td>\n<td>Spline, \uc785\ub825 \ubc94\uc704 \uac80\uc0ac, extrapolation \ud558\uc9c0 \uc54a\uae30<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\uba87 \uac1c\uc758 \ud589\uc774 \uc801\ud569\uc744 \uc9c0\ubc30\ud568<\/td>\n<td>\uc81c\uacf1\ud56d\uc774 leverage \ub97c \ud0a4\uc6c0<\/td>\n<td>Expansion \uc804 \uc774\uc0c1\uce58 \ucc98\ub9ac, robust loss<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\uc911\ubcf5\ub41c \uc5f4\uc774\ub098 \uac12\uc774 \ubaa8\ub450 0 \uc778 \uc5f4<\/td>\n<td>Dummy \uc5f4\uc758 \uc81c\uacf1\uacfc \uacf1<\/td>\n<td><code>interaction_only=True<\/code>, \uc5f0\uc18d\ud615 \uc5f4\ub9cc expansion<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>Imputation \uc73c\ub85c \ucc44\uc6b4 \uac12\uc774 \uc99d\ud3ed\ub428<\/td>\n<td>\uacf1 \uc548\uc5d0\uc11c \uc81c\uacf1\ub41c imputation \uc624\ucc28<\/td>\n<td>Expansion \uc804 imputation, \ub300\uccb4 \uc5ec\ubd80\ub97c \uc801\ub294 \uc9c0\uc2dc \uc5f4<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">Table 2 \uc758 5 \ud589, \uace7 dummy \uc5f4\uc5d0\uc11c \ub098\uc624\ub294 \uc911\ubcf5\ub41c \uc5f4\uacfc \uac12\uc774 \ubaa8\ub450 0 \uc778 \uc5f4\uc740 expansion \uc774 \uc2a4\uc2a4\ub85c \uac78\ub7ec \uc8fc\uc9c0 \uc54a\uc73c\ubbc0\ub85c \ub530\ub85c \uc801\ub294\ub2e4. \ubc94\uc8fc\ud615 \ubcc0\uc218\ub294 \ubc94\uc8fc \ud558\ub098\uc5d0 \uc5f4 \ud558\ub098\ub97c \ub450\uace0 \uadf8 \ubc94\uc8fc\uba74 1, \uc544\ub2c8\uba74 0 \uc744 \uc801\uc5b4 \uc218\uce58\ub85c \ubc14\uafb8\uba70, \uadf8 \uc5f4\uc744 dummy \ub77c \ud55c\ub2e4. Dummy \ub294 \uc81c\uacf1\uc774 \uc790\uae30 \uc790\uc2e0\uc774\uc5b4\uc11c \uc644\uc804\ud788 \uc911\ubcf5\ub41c \uc5f4\uc774 \ub418\uace0, \ud55c \ud589\uc774 \ub450 \ubc94\uc8fc\uc5d0 \ud568\uaed8 \uc18d\ud560 \uc218 \uc5c6\uc73c\ubbc0\ub85c \uac19\uc740 \ubc94\uc8fc\ud615 \ubcc0\uc218\uc5d0\uc11c \ub098\uc628 \ub450 dummy \uc758 \uacf1\uc740 \uc5b8\uc81c\ub098 0 \uc774\ub2e4. Expansion \uc740 \uadf8\uac83\uc744 \uc54c\uc9c0 \ubabb\ud558\ubbc0\ub85c, \ubc94\uc8fc\ud615\uc5d0\uc11c \ub098\uc628 \uc5f4\uc740 expansion \ub300\uc0c1\uc5d0\uc11c \ube7c\uac70\ub098 <code>interaction_only<\/code> \ub85c \ub2e4\ub8e8\uc5b4\uc57c \ud55c\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.5 Diagnostics<\/h3><a id=\"user-content-55-diagnostics\" class=\"anchor\" aria-label=\"Permalink: 5.5 Diagnostics\" href=\"#55-diagnostics\"><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\">Expansion \uc774 \ub3c4\uc6c0\uc774 \ub418\uc5c8\ub294\uc9c0\ub294 \ub124 \uac00\uc9c0\ub85c \ud655\uc778\ud55c\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li>Degree \ub97c 1 \ubd80\ud130 \uc62c\ub9ac\uba70 \uadf8\ub9b0 held-out \uc624\ucc28 \uace1\uc120. \ucd5c\uc800\uc810\uc774 2 \ub97c \ub118\uc9c0 \uc54a\ub294\uc9c0 \ubcf8\ub2e4.<\/li>\n<li>Expansion \ub4a4 design matrix \uc758 \uc870\uac74\uc218\uc640 \uc5f4\ubcc4 VIF (Variance Inflation Factor). VIF \ub294 \uc5f4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$j$<\/math-renderer> \ub97c \ub098\uba38\uc9c0 \uc5f4\ub85c \ud68c\uadc0\ud574 \uc5bb\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$R_j^2$<\/math-renderer> \ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$1 \/ (1 - R_j^2)$<\/math-renderer> \uc774\uba70, \uadf8 \uc5f4\uc774 \ub098\uba38\uc9c0\uc640 \uc9c1\uad50\ud55c \uacbd\uc6b0\uc5d0 \ube44\ud574 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\hat{\\beta}_j$<\/math-renderer> \uc758 \ubd84\uc0b0\uc774 \uba87 \ubc30\ub85c \ubd80\ud47c\uc9c0\ub97c \ub73b\ud55c\ub2e4 (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$R_j^2 = 0.9$<\/math-renderer> \uba74 10). \uc870\uac74\uc218\uac00 \ud589\ub82c \uc804\uccb4\ub97c \ud55c \uc218\ub85c \ubcf4\ub294 \ub370 \ube44\ud574 VIF \ub294 \uc5b4\ub290 \uc5f4\uc774 \uacb9\uce58\ub294\uc9c0 \uc5f4\ub9c8\ub2e4 \uc9da\uc5b4 \uc8fc\uba70, centering \ub4a4\uc5d0\ub3c4 \ud070 \uac12\uc774\uba74 penalty \uac00 \ud544\uc694\ud558\ub2e4.<\/li>\n<li>\uc790\ub8cc\uc5d0\uc11c \ubcf5\uc6d0\ucd94\ucd9c\ub85c \ub2e4\uc2dc \ubf51\uc740 \ud45c\ubcf8 (bootstrap) \uc5d0\uc11c \uacc4\uc218 \ubd80\ud638\uac00 \uc720\uc9c0\ub418\ub294 \ube44\uc728. \uacf1\ud56d\uc758 \ubd80\ud638\uac00 \ub4a4\uc9d1\ud788\uba74 \uadf8 \ud56d\uc740 \ud574\uc11d\ud558\uc9c0 \uc54a\ub294\ub2e4.<\/li>\n<li>\uc794\ucc28\ub97c \uacf1\ud56d\uc5d0 \ub300\ud574 \uadf8\ub9b0 \uc0b0\uc810\ub3c4. Expansion \uc804\uc5d0 \ub0a8\uc544 \uc788\ub358 \uad6c\uc870\uac00 \uc0ac\ub77c\uc84c\ub294\uc9c0 \ud655\uc778\ud55c\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">6. Further Work<\/h2><a id=\"user-content-6-further-work\" class=\"anchor\" aria-label=\"Permalink: 6. Further Work\" href=\"#6-further-work\"><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>Sparse polynomial chaos expansion<\/strong> \u2014 \uc11c\ub85c \uc9c1\uad50\ud558\ub294 \ub2e4\ud56d\uc2dd\ub4e4\uc758 \ubaa8\uc74c \uc704\uc5d0\uc11c \ud56d\uc744 \ud76c\uc18c\ud558\uac8c \uace8\ub77c \uace0\ucc28 expansion \uc758 \ud56d \uc218\ub97c \uc904\uc774\ub294 \ubc29\ubc95\uc774\ub2e4 [<a href=\"#ref-10\">10<\/a>]. \ucd5c\uc18c\uac01 \ud68c\uadc0 (least angle regression) \ub85c \ud56d\uc744 \uace0\ub974\ub294 \uc808\ucc28\uac00 \uc790\ub9ac \uc7a1\uc544 \uc218\ubc31 \uac1c \ud6c4\ubcf4\uc5d0\uc11c \uc218\uc2ed \uac1c\ub9cc \ub0a8\uae30\ub294 \uc77c\uc774 \uacc4\uc0b0\uc73c\ub85c \uac00\ub2a5\ud574\uc84c\ub2e4. \ucc29\uc218\uc5d0\ub294 \uc785\ub825 \ubcc0\uc218\uc758 \ubd84\ud3ec \uac00\uc815 (\uae30\uc800\uac00 \uadf8 \ubd84\ud3ec\uc5d0 \ub530\ub77c \uc815\ud574\uc9c4\ub2e4) \uacfc \uc124\uacc4\ub41c \ud45c\ubcf8\uc774 \ud544\uc694\ud558\ub2e4.<\/li>\n<li><strong>Hierarchical interaction selection at scale<\/strong> \u2014 heredity \ub97c convex \uc81c\uc57d\uc73c\ub85c \uac78\uc5b4 \uacf1\ud56d\uc744 \uace0\ub974\ub294 lasso \uacc4\uc5f4\uc774\ub2e4 [<a href=\"#ref-6\">6<\/a>]. \uc81c\uc57d\uc774 convex \uc5ec\uc11c \ucc3e\uc740 \ucd5c\uc801\ud574\uac00 \uc720\uc77c\ud558\uace0 \uc218\ubc31 \ubcc0\uc218\uae4c\uc9c0 \ud480\ub9ac\ubbc0\ub85c, 4.4 \uc808\uc758 \uaddc\uce59\uc744 \uc0ac\ub78c\uc774 \uc9c0\ud0a4\ub294 \ub300\uc2e0 \ucd5c\uc801\ud654\uac00 \uc9c0\ud0a4\uac8c \ud560 \uc218 \uc788\ub2e4. \ucc29\uc218\uc5d0\ub294 \uacf1\ud56d \ud6c4\ubcf4\uc758 \ubc94\uc704\ub97c \ubbf8\ub9ac \uc881\ud788\ub294 \uaddc\uce59\uacfc \uacc4\uc0b0 \uc608\uc0b0\uc774 \ud544\uc694\ud558\ub2e4.<\/li>\n<li><strong>Learned basis<\/strong> \u2014 \uace0\uc815\ub41c monomial \uae30\uc800 \ub300\uc2e0 1\ucc28\uc6d0 \ud568\uc218\ub97c \ud559\uc2b5\ud574 \uc313\ub294 model \uc774\ub2e4 [<a href=\"#ref-11\">11<\/a>]. 2024 \ub144\uc5d0 spline \uae30\ubc18 \uad6c\ud604\uc774 \uacf5\uac1c\ub418\uc5b4 \uac19\uc740 \uc790\ub8cc\uc5d0\uc11c expansion + ridge \uc640 \uc9c1\uc811 \uacac\uc904 \uc218 \uc788\uac8c \ub418\uc5c8\ub2e4. \ucc29\uc218\uc5d0\ub294 held-out \ube44\uad50 \uc808\ucc28\uc640, \ud559\uc2b5\ub418\ub294 \uae30\uc800\uac00 \ud45c\ubcf8 \uc218\uc5d0 \ube44\ud574 \uacfc\ud558\uc9c0 \uc54a\uc740\uc9c0 \ud310\ub2e8\ud560 \uae30\uc900\uc774 \ud544\uc694\ud558\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">References<\/h2><a id=\"user-content-references\" class=\"anchor\" aria-label=\"Permalink: References\" href=\"#references\"><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\"><a id=\"user-content-ref-1\"><\/a>\n[1] Box, G. E. P. and Wilson, K. B. (1951). <a href=\"https:\/\/doi.org\/10.1111\/j.2517-6161.1951.tb00067.x\" rel=\"nofollow\">On the Experimental Attainment of Optimum Conditions<\/a>. <em>Journal of the Royal Statistical Society: Series B<\/em>, 13(1), 1\u201338.<br>\n<a id=\"user-content-ref-2\"><\/a>\n[2] Marquardt, D. W. (1980). <a href=\"https:\/\/doi.org\/10.1080\/01621459.1980.10477430\" rel=\"nofollow\">Comment: You Should Standardize the Predictor Variables in Your Regression Models<\/a>. <em>Journal of the American Statistical Association<\/em>, 75(369), 87\u201391.<br>\n<a id=\"user-content-ref-3\"><\/a>\n[3] Hoerl, A. E. and Kennard, R. W. (1970). <a href=\"https:\/\/doi.org\/10.1080\/00401706.1970.10488634\" rel=\"nofollow\">Ridge Regression: Biased Estimation for Nonorthogonal Problems<\/a>. <em>Technometrics<\/em>, 12(1), 55\u201367.<br>\n<a id=\"user-content-ref-4\"><\/a>\n[4] Nelder, J. A. (1998). <a href=\"https:\/\/doi.org\/10.1080\/00031305.1998.10480588\" rel=\"nofollow\">The Selection of Terms in Response-Surface Models\u2014How Strong is the Weak-Heredity Principle?<\/a> <em>The American Statistician<\/em>, 52(4), 315\u2013318.<br>\n<a id=\"user-content-ref-5\"><\/a>\n[5] Chipman, H. (1996). <a href=\"https:\/\/doi.org\/10.2307\/3315687\" rel=\"nofollow\">Bayesian variable selection with related predictors<\/a>. <em>The Canadian Journal of Statistics<\/em>, 24(1), 17\u201336.<br>\n<a id=\"user-content-ref-6\"><\/a>\n[6] Bien, J., Taylor, J. and Tibshirani, R. (2013). <a href=\"https:\/\/doi.org\/10.1214\/13-AOS1096\" rel=\"nofollow\">A lasso for hierarchical interactions<\/a>. <em>The Annals of Statistics<\/em>, 41(3), 1111\u20131141.<br>\n<a id=\"user-content-ref-7\"><\/a>\n[7] Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M. and Duchesnay, \u00c9. (2011). <a href=\"https:\/\/www.jmlr.org\/papers\/v12\/pedregosa11a.html\" rel=\"nofollow\">Scikit-learn: Machine Learning in Python<\/a>. <em>Journal of Machine Learning Research<\/em>, 12, 2825\u20132830.<br>\n<a id=\"user-content-ref-8\"><\/a>\n[8] Rahimi, A. and Recht, B. (2007). <a href=\"https:\/\/proceedings.neurips.cc\/paper\/2007\/hash\/013a006f03dbc5392effeb8f18fda755-Abstract.html\" rel=\"nofollow\">Random Features for Large-Scale Kernel Machines<\/a>. <em>Advances in Neural Information Processing Systems<\/em>, 20.<br>\n<a id=\"user-content-ref-9\"><\/a>\n[9] Friedman, J. H. and Popescu, B. E. (2008). <a href=\"https:\/\/doi.org\/10.1214\/07-AOAS148\" rel=\"nofollow\">Predictive learning via rule ensembles<\/a>. <em>The Annals of Applied Statistics<\/em>, 2(3), 916\u2013954.<br>\n<a id=\"user-content-ref-10\"><\/a>\n[10] Blatman, G. and Sudret, B. (2011). <a href=\"https:\/\/doi.org\/10.1016\/j.jcp.2010.12.021\" rel=\"nofollow\">Adaptive sparse polynomial chaos expansion based on least angle regression<\/a>. <em>Journal of Computational Physics<\/em>, 230(6), 2345\u20132367.<br>\n<a id=\"user-content-ref-11\"><\/a>\n[11] Liu, Z., Wang, Y., Vaidya, S., Ruehle, F., Halverson, J., Solja\u010di\u0107, M., Hou, T. Y. and Tegmark, M. (2024). <a href=\"https:\/\/arxiv.org\/abs\/2404.19756\" rel=\"nofollow\">KAN: Kolmogorov-Arnold Networks<\/a>. <em>arXiv:2404.19756<\/em>.<br>\n<a id=\"user-content-ref-12\"><\/a>\n[12] Tibshirani, R. (1996). <a href=\"https:\/\/doi.org\/10.1111\/j.2517-6161.1996.tb02080.x\" rel=\"nofollow\">Regression Shrinkage and Selection via the Lasso<\/a>. <em>Journal of the Royal Statistical Society: Series B<\/em>, 58(1), 267\u2013288.<br>\n<a id=\"user-content-ref-13\"><\/a>\n[13] Zou, H. and Hastie, T. (2005). <a href=\"https:\/\/doi.org\/10.1111\/j.1467-9868.2005.00503.x\" rel=\"nofollow\">Regularization and variable selection via the elastic net<\/a>. <em>Journal of the Royal Statistical Society: Series B<\/em>, 67(2), 301\u2013320.<\/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>collinearity<\/strong>: \ub450 \uac1c \uc774\uc0c1\uc758 \uc5f4\uc774 \uac70\uc758 \uac19\uc740 \ubc29\ud5a5\uc744 \uac00\ub9ac\ucf1c \uacc4\uc218\ub97c \ub530\ub85c \ucd94\uc815\ud560 \uc218 \uc5c6\ub294 \uc0c1\ud0dc.<\/li>\n<li>\n<strong>condition number<\/strong>: \ud589\ub82c\uc758 \ucd5c\ub300 \ud2b9\uc774\uac12\uacfc \ucd5c\uc18c \ud2b9\uc774\uac12\uc758 \ube44. \uc785\ub825\uc758 \uc791\uc740 \uc624\ucc28\uac00 \ud574\uc5d0\uc11c \uc5bc\ub9c8\ub098 \ucee4\uc9c0\ub294\uc9c0\ub97c \ub098\ud0c0\ub0b8\ub2e4.<\/li>\n<li>\n<strong>curse of dimensionality<\/strong>: \uc5f4\uc774 \ub298\uc218\ub85d \uadf8 \uacf5\uac04\uc744 \uac19\uc740 \ubc00\ub3c4\ub85c \ucc44\uc6b0\ub294 \ub370 \ud544\uc694\ud55c \uad00\uce21 \uc218\uac00 \uc9c0\uc218\ub85c \ub298\uc5b4\ub098\ub294 \ud604\uc0c1.<\/li>\n<li>\n<strong>degree<\/strong>: expansion \uc774 \ud5c8\uc6a9\ud558\ub294 monomial \uc758 \ucd5c\uace0 \ucc28\uc218. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X_1^2 X_2$<\/math-renderer> \uc758 \ucc28\uc218\ub294 3 \uc774\ub2e4.<\/li>\n<li>\n<strong>derived variable<\/strong>: \ub3c4\uba54\uc778 \uc9c0\uc2dd\uc73c\ub85c \ub450 \uac1c \uc774\uc0c1\uc758 \uc5f4\uc744 \ubb36\uc5b4 \uc0c8\ub85c \ub9cc\ub4e0 \ubcc0\uc218. \ube44\ub098 \uc728\uc774 \uadf8 \uc608\ub2e4.<\/li>\n<li>\n<strong>design matrix<\/strong>: \ud589\uc774 \uad00\uce21\uc774\uace0 \uc5f4\uc774 model \uc774 \uc4f0\ub294 \ud56d\uc778 \ud589\ub82c. \uacc4\uc218\ub294 \uc774 \ud589\ub82c\uc744 \ud480\uc5b4 \uc5bb\ub294\ub2e4.<\/li>\n<li>\n<strong>dummy<\/strong>: \ubc94\uc8fc\ud615 \ubcc0\uc218\uc758 \ud55c \ubc94\uc8fc\uc5d0 \ub300\uc751\ud558\uc5ec \uadf8 \ubc94\uc8fc\uba74 1, \uc544\ub2c8\uba74 0 \uc744 \ub2f4\ub294 \uc5f4.<\/li>\n<li>\n<strong>extrapolation<\/strong>: \ud6c8\ub828 \uc790\ub8cc\uac00 \ub36e\uc9c0 \uc54a\ub294 \uc785\ub825 \ubc94\uc704\uc5d0 \ub300\ud55c \uc608\uce21.<\/li>\n<li>\n<strong>held-out<\/strong>: \uc801\ud569\uc5d0 \uc4f0\uc9c0 \uc54a\uace0 \uc801\ud569\ud55c model \uc758 \uc624\ucc28\ub97c \uc7ac\ub294 \ub370\ub9cc \uc4f0\ub294 \uc790\ub8cc.<\/li>\n<li>\n<strong>heredity<\/strong>: \uacf1\ud56d\uc744 model \uc5d0 \ub123\uc73c\uba74 \uadf8\uac83\uc744 \uc774\ub8e8\ub294 \ub0ae\uc740 \ucc28\uc218 \ud56d\ub3c4 \ud568\uaed8 \ub123\ub294 \uaddc\uce59.<\/li>\n<li>\n<strong>imputation<\/strong>: \ube44\uc5b4 \uc788\ub294 \uac12\uc744 \ub2e4\ub978 \uac12\uc73c\ub85c \ucc44\uc6b0\ub294 \uc77c. \uadf8 \uc5f4\uc758 \ud3c9\uade0\uc774\ub098 model \uc758 \uc608\uce21\uc73c\ub85c \ucc44\uc6b4\ub2e4.<\/li>\n<li>\n<strong>leverage<\/strong>: \ud55c \uad00\uce21\uc774 \uc790\uc2e0\uc758 \uc608\uce21\uac12\uc744 \ub04c\uc5b4\ub2f9\uae30\ub294 \uc815\ub3c4. \uc785\ub825\uc774 \uc911\uc2ec\uc5d0\uc11c \uba40\uc218\ub85d \ucee4\uc9c4\ub2e4.<\/li>\n<li>\n<strong>main effect<\/strong>: \ubcc0\uc218 \ud558\ub098\uc758 1\ucc28 \ud56d <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\beta_i x_i$<\/math-renderer>.<\/li>\n<li>\n<strong>monomial<\/strong>: \ubcc0\uc218\ub4e4\uc758 \uac70\ub4ed\uc81c\uacf1\uc744 \uacf1\ud55c \ud56d. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X_1^2 X_2$<\/math-renderer> \uac00 \uadf8 \uc608\ub2e4.<\/li>\n<li>\n<strong>overfitting<\/strong>: \ud6c8\ub828 \uc790\ub8cc\uc5d0\ub294 \ub9de\uc9c0\ub9cc \uc0c8 \uc790\ub8cc\uc5d0\uc11c\ub294 \uc5b4\uae0b\ub098\ub294 \uc0c1\ud0dc.<\/li>\n<li>\n<strong>penalty<\/strong>: \uacc4\uc218\uc758 \ud06c\uae30\uc5d0 \uac12\uc744 \ub9e4\uaca8 \uc801\ud569 \uae30\uc900\uc5d0 \ub354\ud558\ub294 \ud56d. ridge \uc640 lasso \uac00 \uadf8\uac83\uc774\ub2e4.<\/li>\n<li>\n<strong>RMSE<\/strong>: \uc81c\uacf1 \uc624\ucc28\uc758 \ud3c9\uade0\uc5d0 \uc81c\uacf1\uadfc\uc744 \ucde8\ud55c \uac12 (Root Mean Squared Error).<\/li>\n<li>\n<strong>standardization<\/strong>: \uac01 \uc5f4\uc5d0\uc11c \uadf8 \uc5f4\uc758 \ud3c9\uade0\uc744 \ube7c\uace0 \ud45c\uc900\ud3b8\ucc28\ub85c \ub098\ub204\uc5b4 \ud3c9\uade0 0, \ud45c\uc900\ud3b8\ucc28 1 \ub85c \ub9de\ucd94\ub294 \uc5f0\uc0b0.<\/li>\n<li>\n<strong>VIF<\/strong>: \ud55c \uc5f4\uc744 \ub098\uba38\uc9c0 \uc5f4\ub85c \ud68c\uadc0\ud588\uc744 \ub54c\uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$R^2$<\/math-renderer> \ub85c \uacc4\uc0b0\ud558\ub294 \ubd84\uc0b0 \ud33d\ucc3d \uacc4\uc218. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$1\/(1-R^2)$<\/math-renderer> \uc774\ub2e4.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix B. Covariance<\/h2><a id=\"user-content-appendix-b-covariance\" class=\"anchor\" aria-label=\"Permalink: Appendix B. Covariance\" href=\"#appendix-b-covariance\"><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\">\uacf5\ubd84\uc0b0\uc740 \ub450 \uc5f4\uc774 \ud568\uaed8 \uc6c0\uc9c1\uc774\ub294 \uc815\ub3c4\ub97c \uc7ac\ub294 \uac12\uc774\ub2e4. \ubaa8\uc9d1\ub2e8\uc5d0 \ub300\ud55c \uc815\uc758\uac00 \uc2dd (16) \uc774\uba70, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$E[\\cdot]$<\/math-renderer> \ub294 \uae30\ub313\uac12 (expected value), <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mu_X$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mu_Y$<\/math-renderer> \ub294 \ub450 \ubcc0\uc218\uc758 \uae30\ub313\uac12\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{Cov}(X, Y) = \\sigma_{XY} = E[(X - \\mu_X)(Y - \\mu_Y)] \\hspace{19em} (16)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uae30\ub313\uac12\uc758 \uc131\uc9c8\ub85c \uad04\ud638\ub97c \ud480\uba74 \uacc4\uc0b0\ud558\uae30 \uc26c\uc6b4 \uc2dd (6) \uc774 \ub41c\ub2e4. \ub450 \ubcc0\uc218\uc758 \uacf1\uc758 \uae30\ub313\uac12\uc5d0\uc11c \uac01 \ubcc0\uc218\uc758 \uae30\ub313\uac12\uc758 \uacf1\uc744 \ube80 \uac83\uc774\uba70, 4.2 \uc808\uc774 \uc4f0\ub294 \ud615\ud0dc\uac00 \uc774\uac83\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{Cov}(X, Y) = E[XY] - E[X]E[Y] \\hspace{19em} (6)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ud45c\ubcf8 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uac1c\ub85c \uc7ac\ub294 \uacf5\ubd84\uc0b0\uc740 \uc2dd (17) \uc774\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_i$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$y_i$<\/math-renderer> \ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$i$<\/math-renderer> \ubc88\uc9f8 \uad00\uce21\uc774\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x}$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{y}$<\/math-renderer> \ub294 \ud45c\ubcf8 \ud3c9\uade0\uc774\uba70, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n - 1$<\/math-renderer> \ub85c \ub098\ub204\ub294 \uac83\uc740 \ubaa8\uc9d1\ub2e8\uc758 \uac12\uc744 \uce58\uc6b0\uce68 \uc5c6\uc774 \ucd94\uc815 (unbiased estimator) \ud558\ub3c4\ub85d \uc790\uc720\ub3c4\ub97c \ud558\ub098 \uc904\uc778 \uac83\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$s_{XY} = \\frac{1}{n-1} \\sum_{i=1}^{n} (x_i - \\overline{x})(y_i - \\overline{y}) \\hspace{19em} (17)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ubd80\ud638\uc640 \uc790\uae30 \uc790\uc2e0\uacfc\uc758 \uacf5\ubd84\uc0b0\uc774 \ub73b\ud558\ub294 \uac83\uc740 \ub137\uc774\ub2e4.<\/p>\n<ul dir=\"auto\">\n<li>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{Cov}(X, Y) \\gt 0$<\/math-renderer> \uc774\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X$<\/math-renderer> \uac00 \ucee4\uc9c8 \ub54c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$Y$<\/math-renderer> \ub3c4 \ucee4\uc9c4\ub2e4.<\/li>\n<li>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{Cov}(X, Y) \\lt 0$<\/math-renderer> \uc774\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X$<\/math-renderer> \uac00 \ucee4\uc9c8 \ub54c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$Y$<\/math-renderer> \ub294 \uc791\uc544\uc9c4\ub2e4.<\/li>\n<li>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{Cov}(X, Y) = 0$<\/math-renderer> \uc774\uba74 \ub450 \ubcc0\uc218 \uc0ac\uc774\uc5d0 \uc120\ud615 \uad00\uacc4\uac00 \uc5c6\ub2e4.<\/li>\n<li>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{Cov}(X, X)$<\/math-renderer> \ub294 \ubd84\uc0b0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{Var}(X)$<\/math-renderer> \ub2e4.<\/li>\n<\/ul>\n<p dir=\"auto\">4.2 \uc808\uacfc <a href=\"#appendix-c-correlation-of-a-variable-and-its-square\">Appendix C<\/a> \uc758 \uc720\ub3c4\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$1\/N$<\/math-renderer> \ub85c \ub098\ub208 \ud3c9\uade0\uc744 \uc4f4\ub2e4. \uc0c1\uad00\uc740 \uacf5\ubd84\uc0b0\uc744 \ub450 \ud45c\uc900\ud3b8\ucc28\ub85c \ub098\ub208 \uac12\uc774\uace0 \ubd84\uc790\uc640 \ubd84\ubaa8\uac00 \uac19\uc740 \uc57d\uc218\ub97c \uac00\uc9c0\ubbc0\ub85c, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$1\/N$<\/math-renderer> \uc744 \uc4f0\ub4e0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$1\/(n-1)$<\/math-renderer> \uc744 \uc4f0\ub4e0 \uc0c1\uad00\uc758 \uac12\uc740 \uac19\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix C. Correlation Of A Variable And Its Square<\/h2><a id=\"user-content-appendix-c-correlation-of-a-variable-and-its-square\" class=\"anchor\" aria-label=\"Permalink: Appendix C. Correlation Of A Variable And Its Square\" href=\"#appendix-c-correlation-of-a-variable-and-its-square\"><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\">4.2 \uc808\uc740 \uc2dd (7) \uc5d0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X = x$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$Y = x^2$<\/math-renderer> \uc744 \ub123\uc5b4 \uc2dd (8) \uacfc \uc2dd (9) \ub97c \uc5bb\uc5c8\ub2e4. \uadf8 \uc0ac\uc774\uc758 \uc720\ub3c4\uac00 \uc544\ub798\ub2e4.<\/p>\n<p dir=\"auto\">\ub098\ub204\uc5b4\uc57c \ud558\ub294 \uc774\uc720\ub294 \ub2e8\uc704\ub2e4. \uc5f4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x$<\/math-renderer> \ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$c \\gt 0$<\/math-renderer> \ubc30 \ud558\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{cov}(cx, (cx)^2) = c^3 \\mathrm{cov}(x, x^2)$<\/math-renderer> \uc774\ubbc0\ub85c, \uacf5\ubd84\uc0b0\uc758 \ud06c\uae30\ub294 \uc790\ub8cc\uc758 \ub2e8\uc704\ub97c \ubc14\uafb8\uae30\ub9cc \ud574\ub3c4 \ub2ec\ub77c\uc838 \ub450 \ubcc0\uc218\uac00 \ud568\uaed8 \uc6c0\uc9c1\uc774\ub294 \uc815\ub3c4\ub97c \uc7ac\ub294 \ub370 \uc4f8 \uc218 \uc5c6\ub2e4. \ud45c\uc900\ud3b8\ucc28\ub85c \ub098\ub204\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{sd}(cx) = c \\cdot \\mathrm{sd}(x)$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{sd}((cx)^2) = c^2 \\cdot \\mathrm{sd}(x^2)$<\/math-renderer> \uc774 \uadf8 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$c^3$<\/math-renderer> \uc744 \uc57d\ubd84\ud558\ubbc0\ub85c \uc2dd (18) \uc758 \uc67c\ucabd\uc774 \uc131\ub9bd\ud558\uace0, Cauchy\u2013Schwarz \ubd80\ub4f1\uc2dd\uc774 \uadf8 \uac12\uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$[-1, 1]$<\/math-renderer> \uc548\uc5d0 \ubb36\uc5b4 \uc624\ub978\ucabd\uc774 \uc131\ub9bd\ud55c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$r(cx, (cx)^2) = r(x, x^2), \\qquad \\lvert r(x, x^2) \\rvert \\le 1 \\hspace{12em} (18)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ubd84\uc790\ubd80\ud130 \uad6c\ud55c\ub2e4. \uc2dd (6) \uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X = x$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$Y = x^2$<\/math-renderer> \uc5d0 \uc801\uc6a9\ud558\uba74 \uacf1\uc758 \ud3c9\uade0\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x^3}$<\/math-renderer> \uc774\uace0 \uac01 \ud3c9\uade0\uc758 \uacf1\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x}$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x^2}$<\/math-renderer> \uc758 \uacf1\uc774\ubbc0\ub85c, \uacf5\ubd84\uc0b0\uc740 \uc2dd (19) \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{cov}(x, x^2) = \\overline{x^3} - \\overline{x} \\overline{x^2} \\hspace{19em} (19)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x = u + \\overline{x}$<\/math-renderer> \ub97c \ub123\uc5b4 \ub450 \ud3c9\uade0\uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$u$<\/math-renderer> \ub85c \uc801\uc73c\uba74 \uc2dd (20) \uc774 \ub41c\ub2e4. \uc804\uac1c\ud55c \ud56d \uac00\uc6b4\ub370 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{u}$<\/math-renderer> \uac00 \uacf1\ud574\uc9c4 \uac83\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{u} = 0$<\/math-renderer> \uc774\ubbc0\ub85c \uac01\uac01 \uc0ac\ub77c\uc9c4\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\overline{x^3} = \\overline{u^3} + 3 \\overline{x} \\overline{u^2} + \\overline{x}^3, \\qquad \\overline{x^2} = \\overline{u^2} + \\overline{x}^2 \\hspace{19em} (20)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc2dd (20) \uc744 \uc2dd (19) \uc5d0 \ub123\uc73c\uba74 \uc2dd (21) \uc774 \ub41c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{cov}(x, x^2) = \\overline{u^3} + 3 \\overline{x} \\overline{u^2} + \\overline{x}^3 - \\overline{x} (\\overline{u^2} + \\overline{x}^2) \\hspace{19em} (21)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x}^3$<\/math-renderer> \uc774 \uc0c1\uc1c4\ub418\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$3 \\overline{x} \\overline{u^2}$<\/math-renderer> \uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x} \\overline{u^2}$<\/math-renderer> \ub97c \ube7c\uba74, \uacf5\ubd84\uc0b0\uc740 \uc2dd (22) \ub85c \ub2eb\ud78c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{cov}(x, x^2) = 2 \\overline{x} \\overline{u^2} + \\overline{u^3} \\hspace{19em} (22)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc2dd (22) \uc758 \ub450 \ud56d\uc740 \ucd9c\ucc98\uac00 \ub2e4\ub974\ub2e4. \uc55e\uc758 \ud56d <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$2 \\overline{x} \\overline{u^2}$<\/math-renderer> \ub294 \ud3c9\uade0\uc774 0 \uc5d0\uc11c \uc5bc\ub9c8\ub098 \ub5a8\uc5b4\uc838 \uc788\ub294\uc9c0\uc5d0\uc11c\ub9cc \uc624\uace0, \ub4a4\uc758 \ud56d <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{u^3}$<\/math-renderer> \ub294 \ubd84\ud3ec\uac00 \ud55c\ucabd\uc73c\ub85c \uae30\uc6b4 \uc815\ub3c4\uc5d0\uc11c\ub9cc \uc628\ub2e4. \ud3c9\uade0\uc744 \ube7c\ub294 \uc77c\uc740 \uc55e\uc758 \ud56d\uc744 0 \uc73c\ub85c \ub9cc\ub4e4\uace0 \ub4a4\uc758 \ud56d\uc740 \uadf8\ub300\ub85c \ub454\ub2e4.<\/p>\n<p dir=\"auto\">\ub0a8\uc740 \uac83\uc740 \ubd84\ubaa8\uc758 \ub450 \ud45c\uc900\ud3b8\ucc28\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathrm{var}(x) = \\overline{u^2}$<\/math-renderer> \ub294 \uc815\uc758 \uadf8\ub300\ub85c\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x^2$<\/math-renderer> \uc758 \ubd84\uc0b0\uc740 \uc2dd (6) \uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$X = Y = x^2$<\/math-renderer> \uc5d0 \uc801\uc6a9\ud55c \uac83, \uace7 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x^4} - (\\overline{x^2})^2$<\/math-renderer> \uc774\uba70, \ub450 \ud3c9\uade0\uc5d0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x = u + \\overline{x}$<\/math-renderer> \ub97c \ub123\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{u} = 0$<\/math-renderer> \uc73c\ub85c \uc815\ub9ac\ud558\uba74 \uc2dd (23) \uc774 \ub41c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{var}(x^2) = \\overline{x^4} - (\\overline{x^2})^2 = \\overline{u^4} - (\\overline{u^2})^2 + 4 \\overline{x}^2 \\overline{u^2} + 4 \\overline{x} \\overline{u^3} \\hspace{6em} (23)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc2dd (22) \uc640 \uc2dd (23) \uc5d0\uc11c centering \uc774 \ubc14\uafb8\ub294 \ud56d\uc744 \ud55c\uc790\ub9ac\uc5d0 \ubaa8\uc73c\uae30 \uc704\ud574 4.2 \uc808\uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \ub97c \uc4f4\ub2e4. \uc801\ub960\uacfc <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x}$<\/math-renderer> \uac00 \ub4a4\uc11e\uc778 \ucc44\ub85c\ub294 \ud3c9\uade0\uc758 \uc704\uce58\uac00 \uc0c1\uad00\uc758 \uc5b4\ub514\uc5d0 \ub4e4\uc5b4 \uc788\ub294\uc9c0 \ubcf4\uc774\uc9c0 \uc54a\uc9c0\ub9cc, \ud3c9\uade0\uc758 \uc704\uce58\ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t$<\/math-renderer> \ud558\ub098\uc5d0 \ub2f4\uace0 \ubd84\ud3ec\uc758 \ubaa8\uc591\uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \uc5d0 \ub2f4\uc73c\uba74 centering \uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t$<\/math-renderer> \ub9cc 0 \uc73c\ub85c \ub9cc\ub4e4\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \ub294 \uac74\ub4dc\ub9ac\uc9c0 \uc54a\ub294\ub2e4\ub294 \uac83\uc774 \uc2dd\uc5d0\uc11c \ubc14\ub85c \uc77d\ud78c\ub2e4. \uc14b \ubaa8\ub450 \ud769\uc5b4\uc9d0\uc73c\ub85c \ub098\ub208 \uac12\uc774\ub77c \ub2e8\uc704\uac00 \uc5c6\uc5b4, \uc790\ub8cc\uc758 \ub2e8\uc704\ub97c \ubc14\uafb8\uc5b4\ub3c4 \uac12\uc774 \uac19\ub2e4.<\/p>\n<p dir=\"auto\">\uc14b\uc744 \ub123\uace0, \ud45c\uc900\ud3b8\ucc28\ub294 \ubd84\uc0b0\uc758 \uc81c\uacf1\uadfc\uc774\ubbc0\ub85c \uc2dd (23) \uc5d0 \uc81c\uacf1\uadfc\uc744 \ucde8\ud558\uba74, \ubd84\uc790\uc640 \ub450 \ubd84\ubaa8\uac00 \uc2dd (24) \ub85c \uc801\ud78c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\mathrm{cov}(x, x^2) = (\\overline{u^2})^{3\/2} (2t + s), \\quad \\mathrm{sd}(x) = (\\overline{u^2})^{1\/2}, \\quad \\mathrm{sd}(x^2) = \\overline{u^2} \\sqrt{k - 1 + 4t^2 + 4ts} \\hspace{2em} (24)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc14b\uc744 \uc2dd (7) \uc5d0 \ub123\uc73c\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$(\\overline{u^2})^{3\/2}$<\/math-renderer> \uc774 \uc57d\ubd84\ub418\uc5b4 4.2 \uc808\uc758 \uc2dd (8) \uc774 \ub0a8\ub294\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$r(x, x^2) = \\frac{2t + s}{\\sqrt{k - 1 + 4t^2 + 4ts}} \\hspace{19em} (8)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$s$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \ub294 \ud3c9\uade0\uc744 \ube80 \uac12 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$u$<\/math-renderer> \ub85c\ub9cc \uc801\ud600 \uc788\uc5b4 centering \uc774 \ubc14\uafb8\uc9c0 \uc54a\uace0, centering \uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\overline{x} = 0$<\/math-renderer> \uace7 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t = 0$<\/math-renderer> \ub9cc \ub9cc\ub4e4\ubbc0\ub85c \uc2dd (8) \uc5d0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$t = 0$<\/math-renderer> \uc744 \ub123\uc740 \uac83\uc774 \uc2dd (9) \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$r(u, u^2) = \\frac{s}{\\sqrt{k - 1}} \\hspace{19em} (9)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lvert t \\rvert$<\/math-renderer> \ub97c \ud0a4\uc6b0\uba74 \ubd84\ubaa8\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$2 \\lvert t \\rvert \\sqrt{1 + s \/ t + (k - 1) \/ (4t^2)}$<\/math-renderer> \uc5ec\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$2 \\lvert t \\rvert$<\/math-renderer> \uc5d0 \uac00\uae4c\uc6cc\uc9c0\uace0 \ubd84\uc790\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$2t$<\/math-renderer> \uc5d0 \uac00\uae4c\uc6cc\uc9c0\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lvert r \\rvert$<\/math-renderer> \ub294 1 \ub85c \uac04\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix D. Term Count Derivation<\/h2><a id=\"user-content-appendix-d-term-count-derivation\" class=\"anchor\" aria-label=\"Permalink: Appendix D. Term Count Derivation\" href=\"#appendix-d-term-count-derivation\"><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\">\uc9d1\ud569 \ud45c\uae30\ub97c \uc77d\ub294 \ubc95\uc774 \uba3c\uc800\ub2e4. \uc9d1\ud569\uc740 \uc6d0\uc18c\ub97c \ub298\uc5b4\ub193\uc544 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lbrace 2, 4, 6 \\rbrace$<\/math-renderer> \ucc98\ub7fc \uc801\uac70\ub098, \uc870\uac74\uc73c\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lbrace \\cdot \\mid \\cdot \\rbrace$<\/math-renderer> \uaf34\ub85c \uc801\ub294\ub2e4. \ub4a4\uc758 \uaf34\uc5d0\uc11c\ub294 \uc138\ub85c\uc904\uc774 \uc911\uad04\ud638 \uc548\uc744 \ub458\ub85c \ub098\ub204\uc5b4, \uc67c\ucabd\uc5d0 \uc6d0\uc18c\uac00 \ucde8\ud558\ub294 \ubaa8\uc591\uc744, \uc624\ub978\ucabd\uc5d0 \uadf8 \ubaa8\uc591\uc774 \ub9cc\uc871\ud574\uc57c \ud560 \uc870\uac74\uc744 \uc801\ub294\ub2e4. \uadf8\ub798\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lbrace n^2 \\mid n \\in \\mathbb{Z}, \\ 1 \\le n \\le 3 \\rbrace$<\/math-renderer> \uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uc774 1 \ubd80\ud130 3 \uae4c\uc9c0\uc758 \uc815\uc218\uc77c \ub54c\uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n^2$<\/math-renderer> \uc744 \ubaa8\ub450 \ubaa8\uc740 \uac83, \uace7 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lbrace 1, 4, 9 \\rbrace$<\/math-renderer> \uc774\ub2e4. \uc138\ub85c\uc904 \uc790\ub9ac\uc5d0\ub294 \ucf5c\ub860\ub3c4 \uadf8\ub9cc\ud07c \uc790\uc8fc \uc4f0\uc774\uba70, \uc774 \ubb38\uc11c\ub294 \ub458\uc744 \ud568\uaed8 \uc4f4\ub2e4.<\/p>\n<p dir=\"auto\">4.1 \uc808\uc758 \uc2dd (4) \ub97c \uc5ec\uae30\uc5d0 \ub2e4\uc2dc \uc801\ub294\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\Phi_d(\\mathbf{x}) = \\left\\lbrace \\prod_{i=1}^{n} x_i^{a_i} \\ \\middle|\\ a_i \\in \\mathbb{Z}_{\\ge 0}, \\ 1 \\le \\sum_{i=1}^{n} a_i \\le d \\right\\rbrace \\hspace{19em} (4)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc2dd (4) \ub294 \uae30\ud638\uac00 \ube7d\ube7d\ud558\uc9c0\ub9cc \uc77d\ub294 \ubc95\uc740 \uac04\ub2e8\ud558\ub2e4. \uc67c\ucabd\uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\Phi_d(\\mathbf{x})$<\/math-renderer> \ub294 \ubcc0\uc218 \uac12 \ud55c \ubc8c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mathbf{x} = (x_1, \\dots, x_n)$<\/math-renderer> \uc5d0\uc11c \ub9cc\ub4e4\uc5b4\uc9c0\ub294 \uc0c8 \uc5f4\ub4e4\uc758 \ubaa8\uc74c\uc774\ub2e4. \uc138\ub85c\uc904 \uc67c\ucabd\uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\prod_{i=1}^{n} x_i^{a_i}$<\/math-renderer> \ub294 \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_i$<\/math-renderer> \ub97c \uac01\uac01 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$a_i$<\/math-renderer> \uc81c\uacf1\ud558\uc5ec \ubaa8\ub450 \uacf1\ud55c \uac83, \uace7 monomial \ud558\ub098\ub2e4. \uc9c0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$a_i$<\/math-renderer> \ub294 0 \uc774\uc0c1\uc758 \uc815\uc218\uc774\uba70 (<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$a_i \\in \\mathbb{Z}_{\\ge 0}$<\/math-renderer>), 0 \uc774\uba74 \uadf8 \ubcc0\uc218\ub294 \uacf1\uc5d0\uc11c \ube60\uc9c4\ub2e4. \uc9c0\uc218\uc758 \ud569 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\sum_i a_i$<\/math-renderer> \uac00 \uadf8 \ud56d\uc758 \ucc28\uc218\uc774\ubbc0\ub85c, \uc870\uac74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$1 \\le \\sum_i a_i \\le d$<\/math-renderer> \ub294 \ud569\uc774 0 \uc778 \uc0c1\uc218\ud56d\uc744 \ube7c\uace0 \ucc28\uc218\ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d$<\/math-renderer> \uae4c\uc9c0\ub9cc \ud5c8\uc6a9\ud55c\ub2e4\ub294 \ub73b\uc774\ub2e4.<\/p>\n<p dir=\"auto\">\ubcc0\uc218\uac00 \ub450 \uac1c\uc774\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 2$<\/math-renderer> \uc774\uba74 \uadf8 \uc870\uac74\uc744 \ub9cc\uc871\ud558\ub294 \uc9c0\uc218 \uc9dd\uc740 \ub2e4\uc12f\uc774\ub2e4. Table 3 \uc774 \uadf8 \ub2e4\uc12f\uc774\ub2e4.<\/p>\n<p dir=\"auto\">Table 3. Exponent pairs admitted by equation (4) at two variables and degree 2<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Exponent of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer>\n<\/th>\n<th>Exponent of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2$<\/math-renderer>\n<\/th>\n<th>Degree<\/th>\n<th>Term<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>0<\/td>\n<td>2<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1^2$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1 x_2$<\/math-renderer><\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>2<\/td>\n<td>2<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2^2$<\/math-renderer><\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">\ube60\uc9c4 \uc9dd\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$(0, 0)$<\/math-renderer> \ud558\ub098\uc774\uba70, \uadf8\uac83\uc774 \uc0c1\uc218\ud56d\uc774\ub2e4.<\/p>\n<p dir=\"auto\">\uc2dd (4) \ub294 \ub9cc\ub4e4 \uc5f4\uc758 \uc9d1\ud569\uc744 \uc815\uc758\ud560 \ubfd0 \uadf8 \ud06c\uae30\ub97c \ub9d0\ud558\uc9c0 \uc54a\ub294\ub2e4. \uadf8 \ud06c\uae30\uac00 \uc2dd (14) \uc640 \uc2dd (15) \uc774\uba70, \uc544\ub798\uac00 \uadf8 \uc720\ub3c4\ub2e4.<\/p>\n<p dir=\"auto\">\ucc28\uc218\uac00 \uc815\ud655\ud788 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \uc778 monomial \ud558\ub098\ub294 \ud569\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \uc778 \uc74c\uc774 \uc544\ub2cc \uc815\uc218 \uc9c0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$(a_1, \\dots, a_n)$<\/math-renderer> \ud558\ub098\uc5d0 \ub300\uc751\ud558\ubbc0\ub85c, \uadf8 \ucc28\uc218\uc758 monomial \uc744 \uc138\ub294 \uc77c\uc740 \uadf8\ub7f0 \uc9c0\uc218 \ubc8c\uc744 \uc138\ub294 \uc77c\uc774\ub2e4. \uadf8 \uc218\uac00 \uc2dd (25) \uc774\uba70, \uc67c\ucabd\uc758 \uc138\ub85c\uc904 \ub458 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\lvert \\cdot \\rvert$<\/math-renderer> \uc740 \uadf8 \uc548\uc5d0 \ub4e0 \uc9d1\ud569\uc758 \uc6d0\uc18c \uac1c\uc218\ub97c \ub73b\ud55c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\left| \\lbrace (a_1, \\dots, a_n) : a_i \\in \\mathbb{Z}_{\\ge 0}, \\ \\sum_{i=1}^{n} a_i = k \\rbrace \\right| = \\binom{k+n-1}{n-1} \\hspace{19em} (25)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc138\ub294 \ubc29\ubc95\uc740 \ubcc4\uacfc \ub9c9\ub300 (stars and bars) \ub2e4. \ucc28\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \ub97c \uac19\uc740 \ubcc4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \uac1c\ub85c \ub193\uace0, \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uac1c\ub97c \ub9c9\ub300 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n-1$<\/math-renderer> \uac1c\ub85c \ub098\ub208 \uce78 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uac1c\ub85c \ub193\uc73c\uba74, \ud55c \uce78\uc5d0 \ub4e0 \ubcc4\uc758 \uc218\uac00 \uadf8 \ubcc0\uc218\uc758 \uc9c0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$a_i$<\/math-renderer> \uac00 \ub41c\ub2e4. \uadf8\ub7ec\uba74 \uc9c0\uc218 \ubc8c\uc744 \uc138\ub294 \uc77c\uc740 \ubcc4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k$<\/math-renderer> \uac1c\uc640 \ub9c9\ub300 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n-1$<\/math-renderer> \uac1c, \ubaa8\ub450 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k+n-1$<\/math-renderer> \uac1c\ub97c \ud55c \uc904\ub85c \ub298\uc5b4\ub193\uace0 \uadf8\uc911 \uc5b4\ub290 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n-1$<\/math-renderer> \uc790\ub9ac\ub97c \ub9c9\ub300\ub85c \uc0bc\uc744\uc9c0 \uace0\ub974\ub294 \uc77c\uacfc \uac19\uc544\uc838 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\binom{k+n-1}{n-1}$<\/math-renderer> \uc774 \ub41c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n = 2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k = 2$<\/math-renderer> \ub85c \ud655\uc778\ud558\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\binom{3}{1} = 3$<\/math-renderer> \uc774\uace0, \ubc30\uc5f4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\ast\\ast\\mid$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\ast\\mid\\ast$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\mid\\ast\\ast$<\/math-renderer> \uac00 \uac01\uac01 \uc9c0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$(2, 0)$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$(1, 1)$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$(0, 2)$<\/math-renderer>, \uace7 Table 3 \uc758 \ucc28\uc218 2 \ud56d <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1^2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_1 x_2$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$x_2^2$<\/math-renderer> \uc14b\uacfc \uac19\ub2e4.<\/p>\n<p dir=\"auto\">\ucc28\uc218\ub97c 0 \ubd80\ud130 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d$<\/math-renderer> \uae4c\uc9c0 \ub354\ud558\uba74 \uc2dd (26) \uc774 \ub41c\ub2e4. \ub0a8\ub294 \ubaab\uc744 \ub2f4\uc744 \uc9c0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$a_0 \\ge 0$<\/math-renderer> \uc744 \ud558\ub098 \ub354 \ub450\uc5b4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$a_0 + \\sum_i a_i = d$<\/math-renderer> \ub85c \uc801\uc73c\uba74, \uc774 \ud569\uc740 \ubb3c\uac74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d$<\/math-renderer> \uac1c\ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n+1$<\/math-renderer> \uac1c\uc758 \uce78\uc5d0 \ub2f4\ub294 \uacbd\uc6b0\uc758 \uc218 \ud558\ub098\ub85c \ubb36\uc778\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\sum_{k=0}^{d} \\binom{k+n-1}{n-1} = \\binom{n+d}{d} \\hspace{19em} (26)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc2dd (4) \uc758 \uc9d1\ud569\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$k = 0$<\/math-renderer> \uc778 \uc0c1\uc218\ud56d\uc744 \ube80 \uac83\uc774\ubbc0\ub85c \uadf8 \ud06c\uae30\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\binom{n+d}{d} - 1$<\/math-renderer> \uc774\uace0, \uc774\uac83\uc774 \uc2dd (14) \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><code>interaction_only<\/code> \uc5d0\uc11c\ub294 \uac19\uc740 \ubcc0\uc218\ub97c \ub450 \ubc88 \uc4f0\uc9c0 \uc54a\uc73c\ubbc0\ub85c, \ub0a8\ub294 \ud56d \ud558\ub098\ub294 \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$n$<\/math-renderer> \uac1c\uc5d0\uc11c \uace0\ub978 \ud06c\uae30 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$j$<\/math-renderer> \uc758 \ubd80\ubd84\uc9d1\ud569 \ud558\ub098\uc5d0 \ub300\uc751\ud55c\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$j$<\/math-renderer> \ub294 1 \ubd80\ud130 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\min(d, n)$<\/math-renderer> \uae4c\uc9c0\uc774\uace0, \uadf8 \uc218\ub97c \ub354\ud55c \uac83\uc774 \uc2dd (15) \uc774\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d \\ge n$<\/math-renderer> \uc774\uba74 \ubaa8\ub4e0 \ubd80\ubd84\uc9d1\ud569\uc774 \ud5c8\uc6a9\ub418\uc5b4 \uadf8 \ud569\uc740 \uc2dd (27) \ub85c \ub2eb\ud78c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\sum_{j=1}^{n} \\binom{n}{j} = 2^n - 1 \\hspace{19em} (27)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix E. Ridge And Lasso On Expanded Columns<\/h2><a id=\"user-content-appendix-e-ridge-and-lasso-on-expanded-columns\" class=\"anchor\" aria-label=\"Permalink: Appendix E. Ridge And Lasso On Expanded Columns\" href=\"#appendix-e-ridge-and-lasso-on-expanded-columns\"><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\">Expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc5d0 \uac70\ub294 penalty \ub294 \uc14b \uac00\uc6b4\ub370 \ud558\ub098\ub2e4. \ubaa9\uc801 \ud568\uc218\ub85c \uc801\uc73c\uba74 ridge \ub294 \uc2dd (28), lasso \ub294 \uc2dd (29) \uc774\uba70 [<a href=\"#ref-12\">12<\/a>], <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\alpha$<\/math-renderer> \uac00 penalty \ub97c \ub204\ub974\ub294 \uc138\uae30\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\hat{\\boldsymbol{\\beta}}_{\\mathrm{ridge}} = \\arg\\min_{\\boldsymbol{\\beta}} \\lVert \\mathbf{y} - \\mathbf{X}\\boldsymbol{\\beta} \\rVert_2^2 + \\alpha \\lVert \\boldsymbol{\\beta} \\rVert_2^2 \\hspace{15em} (28)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\hat{\\boldsymbol{\\beta}}_{\\mathrm{lasso}} = \\arg\\min_{\\boldsymbol{\\beta}} \\lVert \\mathbf{y} - \\mathbf{X}\\boldsymbol{\\beta} \\rVert_2^2 + \\alpha \\lVert \\boldsymbol{\\beta} \\rVert_1 \\hspace{15em} (29)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ucc28\uc774\ub294 penalty \uc758 \ubaa8\uc591\uc5d0\uc11c \uc628\ub2e4. \uc5f4\uc774 standardization \ub418\uc5b4 \uc788\uace0 \uc11c\ub85c \uc9c1\uad50\ud558\uba74 \ub450 \ud574\ub294 \uc2dd (30) \uc73c\ub85c \ub2eb\ud78c \uaf34\uc774 \ub41c\ub2e4. Ridge \ub294 \ubaa8\ub4e0 \uacc4\uc218\ub97c \uac19\uc740 \ube44\uc728\ub85c \ub098\ub204\uc5b4 \uc904\uc774\uace0 0 \uc5d0\ub294 \ub2ff\uc9c0 \uc54a\uc73c\uba70, lasso \ub294 \ud06c\uae30\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\alpha \/ 2$<\/math-renderer> \uc5d0 \ubabb \ubbf8\uce58\ub294 \uacc4\uc218\ub97c \uc815\ud655\ud788 0 \uc73c\ub85c \ub9cc\ub4e4\uace0 \ub098\uba38\uc9c0\ub294 \uadf8\ub9cc\ud07c 0 \ucabd\uc73c\ub85c \ub2f9\uae34\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\hat{\\beta}_j^{\\mathrm{ridge}} = \\frac{\\hat{\\beta}_j^{\\mathrm{ols}}}{1 + \\alpha}, \\qquad \\hat{\\beta}_j^{\\mathrm{lasso}} = \\mathrm{sign}(\\hat{\\beta}_j^{\\mathrm{ols}}) \\max \\left( \\lvert \\hat{\\beta}_j^{\\mathrm{ols}} \\rvert - \\frac{\\alpha}{2}, \\ 0 \\right) \\hspace{9em} (30)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc740 \uc9c1\uad50\uc640 \uac70\ub9ac\uac00 \uba40\uace0 (4.2 \uc808), \uc11c\ub85c \ub2ee\uc740 \uc5f4\uc774 \ubb34\ub9ac\ub97c \uc774\ub8ec\ub2e4. Ridge \ub294 \uadf8 \ubb34\ub9ac\uc5d0 \uacc4\uc218\ub97c \ub098\ub204\uc5b4 \uc8fc\uace0, lasso \ub294 \ud558\ub098\ub9cc \ub0a8\uae30\uace0 \ub098\uba38\uc9c0\ub97c 0 \uc73c\ub85c \ub9cc\ub4e0\ub2e4. \uc5b4\ub290 \uac83\uc774 \ub0a8\uc744\uc9c0\ub294 \ud45c\ubcf8\uc774 \uc870\uae08\ub9cc \ub2ec\ub77c\uc838\ub3c4 \ubc14\ub00c\ubbc0\ub85c, lasso \uac00 \ub3cc\ub824\uc8fc\ub294 \ud56d\uc758 \ubaa9\ub85d\uc740 \uadf8 \uc790\uccb4\ub85c \ubd88\uc548\uc815\ud558\ub2e4. \ub458\uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\rho$<\/math-renderer> \ub85c \uc11e\uc740 elastic net \uc774 \uc2dd (31) \uc774\uba70 [<a href=\"#ref-13\">13<\/a>], <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\rho$<\/math-renderer> \uac00 1 \uc774\uba74 lasso, 0 \uc774\uba74 ridge \ub2e4. \uc81c\uacf1 \ud56d\uc774 \ub2ee\uc740 \ubb34\ub9ac\ub97c \ud568\uaed8 \ub0a8\uae30\uac70\ub098 \ud568\uaed8 \uc9c0\uc6b0\ubbc0\ub85c, \ud56d\uc744 \uace0\ub974\uba74\uc11c\ub3c4 \ubaa9\ub85d\uc774 \ub35c \ud754\ub4e4\ub9b0\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$\\hat{\\boldsymbol{\\beta}}_{\\mathrm{enet}} = \\arg\\min_{\\boldsymbol{\\beta}} \\lVert \\mathbf{y} - \\mathbf{X}\\boldsymbol{\\beta} \\rVert_2^2 + \\alpha \\left( \\rho \\lVert \\boldsymbol{\\beta} \\rVert_1 + \\frac{1 - \\rho}{2} \\lVert \\boldsymbol{\\beta} \\rVert_2^2 \\right) \\hspace{9em} (31)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Table 4. Penalties on expanded columns<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Penalty<\/th>\n<th>Term added<\/th>\n<th>A group of columns that resemble one another<\/th>\n<th>Where it fits<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Ridge<\/td>\n<td>Sum of the squared coefficients<\/td>\n<td>Coefficient shared across the group<\/td>\n<td>The default on expanded columns<\/td>\n<\/tr>\n<tr>\n<td>Lasso<\/td>\n<td>Sum of the absolute coefficients<\/td>\n<td>One kept, the rest at zero<\/td>\n<td>A short term list, under a heredity constraint<\/td>\n<\/tr>\n<tr>\n<td>Elastic net<\/td>\n<td>Both, mixed by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\rho$<\/math-renderer>\n<\/td>\n<td>Kept or dropped together<\/td>\n<td>Selection wanted with a list that holds<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$\\alpha$<\/math-renderer> \ub294 held-out \uc624\ucc28\ub85c \uace0\ub974\uba70, \ud6c4\ubcf4\ub294 10 \uc758 \uac70\ub4ed\uc81c\uacf1 \uac04\uaca9\uc73c\ub85c \uc7a1\ub294\ub2e4. standardization \ud55c \uc5f4 \uc704\uc5d0\uc11c\ub9cc \ub73b\uc774 \uc788\uace0 (5.2 \uc808), \uadf8 \ud0d0\uc0c9\uc744 <code>RidgeCV<\/code>, <code>LassoCV<\/code>, <code>ElasticNetCV<\/code> \uac00 \ub300\uc2e0\ud55c\ub2e4. \uc808\ud3b8\uc740 penalty \uc5d0\uc11c \ube80\ub2e4. \uc808\ud3b8\uc5d0 penalty \ub97c \uac78\uba74 \uc801\ud569\ub41c \uc218\uc900\uc774 0 \ucabd\uc73c\ub85c \ub04c\ub824\uac00 model \uc774 \uc790\ub8cc\uc758 \uc911\uc2ec\uc5d0\uc11c \ubc97\uc5b4\ub09c\ub2e4.<\/p>\n<p dir=\"auto\">Penalty \ub97c \uac74\ub2e4\uace0 degree \ub97c 4 \ub85c \uc62c\ub9b4 \uc218 \uc788\ub294 \uac83\uc740 \uc544\ub2c8\ub2e4. Penalty \uac00 \ubc84\ub294 \uac83\uc740 \uc5f4 \uc218\uac00 \ud589 \uc218\uc5d0 \uac00\uae4c\uc6b8 \ub54c \uc801\ud569\uc774 \ubb34\ub108\uc9c0\ub290\ub0d0 \ubc84\ud2f0\ub290\ub0d0\uc758 \ucc28\uc774\uc774\uba70, \uadf8 \ucc28\uc774\uc758 \ud06c\uae30\ub294 5.1 \uc808\uc5d0 \uc788\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix F. Implementation<\/h2><a id=\"user-content-appendix-f-implementation\" class=\"anchor\" aria-label=\"Permalink: Appendix F. Implementation\" href=\"#appendix-f-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<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.1 Options<\/h3><a id=\"user-content-f1-options\" class=\"anchor\" aria-label=\"Permalink: F.1 Options\" href=\"#f1-options\"><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\">Expansion \uc790\uccb4\ub294 <code>sklearn.preprocessing.PolynomialFeatures<\/code> \ud55c \uc904\uc774\uba70, \uc815\ud560 \uac83\uc740 \ub124 \uc778\uc790\ubfd0\uc774\ub2e4 [<a href=\"#ref-7\">7<\/a>].<\/p>\n<p dir=\"auto\">Table 5. PolynomialFeatures arguments<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Argument<\/th>\n<th>Effect<\/th>\n<th>Note<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>degree<\/code><\/td>\n<td>Highest degree of the monomials<\/td>\n<td>A <code>(min, max)<\/code> tuple for the lowest degree as well, so <code>(2, 2)<\/code> for second-order terms only<\/td>\n<\/tr>\n<tr>\n<td><code>interaction_only<\/code><\/td>\n<td>Products of distinct variables only<\/td>\n<td>First-order terms kept, powers of a single variable dropped<\/td>\n<\/tr>\n<tr>\n<td><code>include_bias<\/code><\/td>\n<td>A constant column of ones<\/td>\n<td>False where the estimator carries its own intercept<\/td>\n<\/tr>\n<tr>\n<td><code>order<\/code><\/td>\n<td>Memory layout of the output array<\/td>\n<td>'C' or 'F', a choice of layout rather than of content<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom sklearn.preprocessing import PolynomialFeatures\n\n# interaction_only=True keeps X1*X2 and drops X1^2, X2^2\npoly = PolynomialFeatures(degree=2, interaction_only=True, include_bias=False)\nX_expanded = poly.fit_transform(X)\nterm_name = poly.get_feature_names_out()\"><pre><span class=\"pl-c\"># Python<\/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\"># interaction_only=True keeps X1*X2 and drops X1^2, X2^2<\/span>\n<span class=\"pl-s1\">poly<\/span> <span class=\"pl-c1\">=<\/span> <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\">interaction_only<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">True<\/span>, <span class=\"pl-s1\">include_bias<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>)\n<span class=\"pl-v\">X_expanded<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">poly<\/span>.<span class=\"pl-c1\">fit_transform<\/span>(<span class=\"pl-c1\">X<\/span>)\n<span class=\"pl-s1\">term_name<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">poly<\/span>.<span class=\"pl-c1\">get_feature_names_out<\/span>()<\/pre><\/div>\n<p dir=\"auto\"><code>get_feature_names_out()<\/code> \uc774 \ub3cc\ub824\uc8fc\ub294 \uc774\ub984\uc740 \uacc4\uc218\ub97c \ub2e4\uc2dc \uc5f4\uc5d0 \ub418\uc9da\ub294 \uc720\uc77c\ud55c \ud1b5\ub85c\ub2e4. Expansion \ub4a4\uc5d0 \uc774\ub984\uc744 \uc783\uc73c\uba74 \uacc4\uc218\ub294 \ub0a8\uc544\ub3c4 \uadf8\uac83\uc774 \uc5b4\ub290 \uacf1\uc758 \uacc4\uc218\uc778\uc9c0 \ub9d0\ud560 \uc218 \uc5c6\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.2 Pipeline<\/h3><a id=\"user-content-f2-pipeline\" class=\"anchor\" aria-label=\"Permalink: F.2 Pipeline\" href=\"#f2-pipeline\"><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\">Expansion \uc740 \ud640\ub85c \uc4f0\uc9c0 \uc54a\uace0 standardization \uacfc penalty \uc0ac\uc774\uc5d0 \ub454\ub2e4. \uc21c\uc11c\ub294 \uc6d0 \ubcc0\uc218\uc758 standardization, expansion, expansion \uc774 \ub9cc\ub4e0 \uc5f4\uc758 \ub450 \ubc88\uc9f8 standardization, \uadf8\ub9ac\uace0 penalty \ub97c \uac74 \uc801\ud569\uc774\ub2e4.<\/p>\n<p dir=\"auto\">\uc55e\uc758 standardization \uc740 4.3 \uc808\uc758 \uc870\uac74\uc218 \ubb38\uc81c\ub97c \uc5c6\uc560\uace0, \ub4a4\uc758 standardization \uc740 penalty \uac00 \uc5f4\ub9c8\ub2e4 \uacf5\ud3c9\ud558\uac8c \uac78\ub9ac\uac8c \ud55c\ub2e4. \uacf1\ud56d\uc758 \ubd84\uc0b0\uc740 \uc6d0 \ubcc0\uc218 \ubd84\uc0b0\uc758 \uacf1\uc5d0 \uac00\uae4c\uc6cc \uc5f4\ub9c8\ub2e4 \ud06c\uac8c \ubc8c\uc5b4\uc9c0\ubbc0\ub85c, \ub450 \ubc88\uc9f8 standardization \uc5c6\uc774 ridge \ub97c \uac78\uba74 penalty \uac00 \uc0ac\uc2e4\uc0c1 \ubd84\uc0b0\uc774 \ud070 \uc5f4\uc5d0\ub9cc \uac78\ub9b0\ub2e4.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom sklearn.linear_model import Ridge\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import PolynomialFeatures, StandardScaler\n\npipeline = Pipeline([\n    ('raw_scale', StandardScaler()),\n    ('expand', PolynomialFeatures(include_bias=False)),\n    ('term_scale', StandardScaler()),\n    ('fit', Ridge()),\n])\ngrid = {'expand__degree': [1, 2, 3], 'fit__alpha': [0.1, 1.0, 10.0, 100.0]}\nsearch = GridSearchCV(pipeline, grid, scoring='neg_root_mean_squared_error', cv=5)\nsearch.fit(X, y)\"><pre><span class=\"pl-c\"># Python<\/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\">model_selection<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">GridSearchCV<\/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-v\">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>, <span class=\"pl-v\">StandardScaler<\/span>\n\n<span class=\"pl-s1\">pipeline<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">Pipeline<\/span>(&#91;\n    (<span class=\"pl-s\">'raw_scale'<\/span>, <span class=\"pl-en\">StandardScaler<\/span>()),\n    (<span class=\"pl-s\">'expand'<\/span>, <span class=\"pl-en\">PolynomialFeatures<\/span>(<span class=\"pl-s1\">include_bias<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>)),\n    (<span class=\"pl-s\">'term_scale'<\/span>, <span class=\"pl-en\">StandardScaler<\/span>()),\n    (<span class=\"pl-s\">'fit'<\/span>, <span class=\"pl-en\">Ridge<\/span>()),\n&#93;)\n<span class=\"pl-s1\">grid<\/span> <span class=\"pl-c1\">=<\/span> {<span class=\"pl-s\">'expand__degree'<\/span>: &#91;<span class=\"pl-c1\">1<\/span>, <span class=\"pl-c1\">2<\/span>, <span class=\"pl-c1\">3<\/span>&#93;, <span class=\"pl-s\">'fit__alpha'<\/span>: &#91;<span class=\"pl-c1\">0.1<\/span>, <span class=\"pl-c1\">1.0<\/span>, <span class=\"pl-c1\">10.0<\/span>, <span class=\"pl-c1\">100.0<\/span>&#93;}\n<span class=\"pl-s1\">search<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">GridSearchCV<\/span>(<span class=\"pl-s1\">pipeline<\/span>, <span class=\"pl-s1\">grid<\/span>, <span class=\"pl-s1\">scoring<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s\">'neg_root_mean_squared_error'<\/span>, <span class=\"pl-s1\">cv<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>)\n<span class=\"pl-s1\">search<\/span>.<span class=\"pl-c1\">fit<\/span>(<span class=\"pl-c1\">X<\/span>, <span class=\"pl-s1\">y<\/span>)<\/pre><\/div>\n<p dir=\"auto\">Expansion \uc744 pipeline \uc548\uc5d0 \ub450\ub294 \uc774\uc720\ub294 \ud3b8\uc758\uac00 \uc544\ub2c8\ub2e4. Expansion \uc790\uccb4\ub294 \ud589\ub9c8\ub2e4 \ub3c5\ub9bd\uc774\ub77c \ub204\uc218 (leakage) \ub97c \ub9cc\ub4e4\uc9c0 \uc54a\uc9c0\ub9cc, \uc55e\ub4a4\uc758 standardization \uc740 cross-validation \uc774 \uc790\ub8cc\ub97c \ub098\ub208 \uc870\uac01 (fold) \uc758 \ud6c8\ub828 \ubd80\ubd84\uc5d0\uc11c\ub9cc \ud3c9\uade0\uacfc \ubd84\uc0b0\uc744 \uc5bb\uc5b4\uc57c \ud55c\ub2e4. degree \uc640 penalty \ub97c \ud568\uaed8 \uace0\ub974\ub294 \uc77c\ub3c4 pipeline \uc548\uc5d0\uc11c\ub9cc \ud55c \ubc88\uc758 \ud0d0\uc0c9\uc73c\ub85c \ub05d\ub09c\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.3 Cost<\/h3><a id=\"user-content-f3-cost\" class=\"anchor\" aria-label=\"Permalink: F.3 Cost\" href=\"#f3-cost\"><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\">Expansion \uc758 \ube44\uc6a9\uc740 \uc5f4 \uc218\uc5d0 \uc120\ud615\uc774\uace0, \uadf8 \uc5f4 \uc218\ub294 \uc2dd (14) \ub85c \ub298\uc5b4\ub09c\ub2e4. \ud589 100,000, \ubcc0\uc218 100, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$d = 2$<\/math-renderer> \uc774\uba74 \uc5f4\uc740 5,150 \uac1c\uc774\uace0, \uac12\uc744 \ud558\ub098\ub3c4 \ube60\ub728\ub9ac\uc9c0 \uc54a\uace0 \ub2f4\ub294 dense \ud589\ub82c\ub85c \ub450\uba74 64-bit \uc2e4\uc218 \uae30\uc900 4.1 GB \ub2e4. Expansion \uacb0\uacfc\ub97c memory \uc5d0 \ub450\uc9c0 \uc54a\ub294 \uae38\uc774 \ub458 \uc788\ub2e4.<\/p>\n<p dir=\"auto\">\uccab\uc9f8\ub294 kernel \uc774\ub2e4. \ub2e4\ud56d kernel \uc2dd (32) \ub294 expansion \ud55c \uacf5\uac04\uc758 \ub0b4\uc801\uc744 expansion \uc5c6\uc774 \uacc4\uc0b0\ud55c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"24ea9af6b335165e4656a511efe9fcfe\">$$K(\\mathbf{x}, \\mathbf{z}) = (\\gamma \\mathbf{x}^{\\top} \\mathbf{z} + c)^{d} \\hspace{19em} (32)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><code>KernelRidge(kernel='poly')<\/code> \uac00 \uadf8 \ud615\ud0dc\uc774\uba70, \ube44\uc6a9\uc774 \uc5f4\uc774 \uc544\ub2c8\ub77c \ud589\uc5d0 \uac78\ub9ac\ubbc0\ub85c \ubcc0\uc218\uac00 \ub9ce\uace0 \ud589\uc774 \uc801\uc740 \uc790\ub8cc\uc5d0 \ub9de\ub294\ub2e4. \ub300\uc2e0 \uacc4\uc218\uac00 \uac1c\ubcc4 monomial \uc5d0 \ubd99\uc9c0 \uc54a\uc544 \uc5b4\ub290 \uacf1\uc774 \uae30\uc5ec\ud588\ub294\uc9c0 \uc77d\uc744 \uc218 \uc5c6\ub2e4.<\/p>\n<p dir=\"auto\">\ub458\uc9f8\ub294 \uadfc\uc0ac\ub2e4. <code>PolynomialCountSketch<\/code> \ub294 \ub2e4\ud56d kernel \uc774 \uc4f0\ub294 \ud56d\ub4e4\uc744 \uc815\ud574\uc9c4 \uc218\uc758 \uc5f4\ub85c \uc904\uc5ec \ub2f4\uace0 (sketch), <code>Nystroem<\/code> \uc740 \ud45c\ubcf8\uc758 \ubd80\ubd84\uc9d1\ud569\uc73c\ub85c kernel \ud589\ub82c\uc744 \uadfc\uc0ac\ud55c\ub2e4. \ub458 \ub2e4 kernel \uc744 \uc720\ud55c\ud55c \uc218\uc758 \uc5f4\ub85c \uadfc\uc0ac\ud574 \uc120\ud615 model \uc758 \uc18d\ub3c4\ub97c \uc9c0\ud0a4\ub294 \uacc4\uc5f4\uc774\uba70 [<a href=\"#ref-8\">8<\/a>], \uc5f4 \uc218\ub97c \uc0ac\uc6a9\uc790\uac00 \uc815\ud55c \uac12\uc73c\ub85c \ubb36\ub294\ub2e4.<\/p>\n<p dir=\"auto\">\ud76c\uc18c \uc785\ub825\uc740 \uadf8\ub300\ub85c \ubc1b\ub294\ub2e4. 0 \uc774 \uc544\ub2cc \uac12\ub9cc \uc800\uc7a5\ud558\ub294 CSR \ud615\uc2dd\uc758 \ud589\ub82c\uc744 \ub123\uc73c\uba74 expansion \uacb0\uacfc\ub3c4 \uac19\uc740 \ud615\uc2dd\uc73c\ub85c \ub098\uc624\ubbc0\ub85c, dummy \uc5f4\uc774 \ub9ce\uc740 \uc790\ub8cc\uac00 dense \ub85c \ubd80\ud480\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">F.4 Selective Expansion<\/h3><a id=\"user-content-f4-selective-expansion\" class=\"anchor\" aria-label=\"Permalink: F.4 Selective Expansion\" href=\"#f4-selective-expansion\"><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\">\ubaa8\ub4e0 \uc9dd\uc744 \ub9cc\ub4e4 \ud544\uc694\ub294 \uc5c6\ub2e4. \uacf1\ud560 \uc5f4\uc744 \uace8\ub77c \ub118\uae30\uba74 \uc5f4 \uc218\ub294 Table 1 \uc774 \uc544\ub2c8\ub77c \uace0\ub978 \uac1c\uc218\ub85c \ub05d\ub09c\ub2e4.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.preprocessing import PolynomialFeatures\n\nexpand_column = ['temperature', 'pressure']\ntransformer = ColumnTransformer(\n    [('expand', PolynomialFeatures(degree=2, include_bias=False), expand_column)],\n    remainder='passthrough',\n)\"><pre><span class=\"pl-c\"># Python<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">sklearn<\/span>.<span class=\"pl-s1\">compose<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-v\">ColumnTransformer<\/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-s1\">expand_column<\/span> <span class=\"pl-c1\">=<\/span> &#91;<span class=\"pl-s\">'temperature'<\/span>, <span class=\"pl-s\">'pressure'<\/span>&#93;\n<span class=\"pl-s1\">transformer<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">ColumnTransformer<\/span>(\n    &#91;(<span class=\"pl-s\">'expand'<\/span>, <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-s1\">expand_column<\/span>)&#93;,\n    <span class=\"pl-s1\">remainder<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s\">'passthrough'<\/span>,\n)<\/pre><\/div>\n<p dir=\"auto\">\uace0\ub97c \uadfc\uac70\ub294 \uc14b\uc774\ub2e4. \uacf5\uc815\uc774 \uc774\ubbf8 \uc544\ub294 \uc0c1\ud638\uc791\uc6a9, \uc794\ucc28\uac00 \ub450 \ubcc0\uc218\uc758 \uc870\ud569\uc5d0\uc11c \uad6c\uc870\ub97c \ubcf4\uc774\ub294 \uacbd\uc6b0, \uadf8\ub9ac\uace0 tree \uc5ec\ub7ec \uac1c\ub97c \ud569\uce5c model (tree ensemble) \uc744 \uba3c\uc800 \ub3cc\ub824 \uc0c1\ud638\uc791\uc6a9\uc758 \uc138\uae30\ub97c \uc7ac\uace0 \uc0c1\uc704 \uc9dd\ub9cc \ub0a8\uae30\ub294 \ubc29\ubc95\uc774\ub2e4 [<a href=\"#ref-9\">9<\/a>]. \uc14b \ub2e4 \uc5c6\uc73c\uba74 \uc804\uccb4 expansion \uc5d0 penalty \ub97c \uac70\ub294 \ud3b8\uc774 \ub0ab\ub2e4. \uadfc\uac70 \uc5c6\uc774 \uc9dd\uc744 \uace0\ub974\uba74 \uc5b4\ub290 \uc0c1\ud638\uc791\uc6a9\uc774 model \uc5d0 \ub4e4\uc5b4\uac08\uc9c0\ub97c \uc790\ub8cc\uac00 \uc544\ub2c8\ub77c \ubd84\uc11d\uc790\uac00 \uc815\ud558\uac8c \ub41c\ub2e4.<\/p>\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  Three defaults make polynomial expansion cheap and safe: degree two, centring the variables before expanding, and a ridge or lasso penalty on the new columns. Skipping the last two shows up as coefficients flipping sign, not as poor fit. Beyond a few dozen variables, or for repeated bends, splines and kernels replace it.<\/p>\n","protected":false},"author":4,"featured_media":7053,"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":27,"footnotes":""},"categories":[56,373],"tags":[386,424],"class_list":["post-7052","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science-slug","category-feature-engineering-slug","tag-github-hosted","tag-polynomial"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":1,"sum_votes":4},"jetpack_featured_media_url":"https:\/\/ykim.synology.me\/wordpress\/wp-content\/uploads\/2026\/09\/harper-park-swing-bench.jpg","_links":{"self":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7052","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=7052"}],"version-history":[{"count":6,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7052\/revisions"}],"predecessor-version":[{"id":7432,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/7052\/revisions\/7432"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media\/7053"}],"wp:attachment":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media?parent=7052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/categories?post=7052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/tags?post=7052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}