# 统计代写|统计与机器学习作业代写Statistical and Machine Learning代考|ECE414

## 统计代写|统计与机器学习作业代写Statistical and Machine Learning代考|General Suggestions for Removing or Adding Inputs

The following is a general guide to removing inputs:
(a) Remove an independent variable (input) if it has zero variance, which implies that the input has a single unique value (Kuhn and Johnson 2013).

(b) Remove an independent variable (input) if it has near-zero variance, which implies that the input has very few values.
(c) Remove an independent variable (input) if it is highly correlated with another input variable (nearly perfect correlation), since they are measuring the same underlying information (Kuhn and Johnson 2013). Known as collinearity in statistical machine learning science, this phenomenon is important because in its presence the parameter estimates of some machine learning algorithms (for example, those based on gradient descent) are inflated (not accurately estimated).
These three issues are very common in genomic prediction, since part of the independent variables is marker information and many of them have zero or nearzero variance and other pairs have very high correlations. One of the advantages of removing input information prior to the modeling process is that this reduces the computational resources needed to implement the statistical machine learning algorithm. Also, it is possible to end up with a more parsimonious and interpretable model. Another advantage is that models with less correlated inputs are less prone to unstable parameter estimates, numerical errors, and degraded prediction performance (Kuhn and Johnson 2013).
The following are general rules for the addition of input variables:
(a) Create dummy variables from nominal or categorical inputs.
(b) Manually create a categorical variable from a continuous variable.
(c) Transform the original input variable using a specific transformation.
First, we describe the process of creating dummy variables from categorical (nominal or ordinal) inputs. Transforming categorical inputs into dummy variables is required in most supervised statistical machine learning methods, since providing the original independent variable (not transformed into dummy variables) is incorrect and should be avoided by practitioners of statistical machine learning methods. However, it is important to point out that when the dependent variable is categorical, most statistical machine learning methods do not require it to be transformed into dummy variables. For example, assume that we are studying three genotypes (G1, G2, and G3) in two environments (E1 and E2) and we collected the following grain yield data.

Using the information in Table $2.10$, we created the dummy variables for each categorical variable. First, we provide the dummy variables for the environments (Table 2.11).

## 统计代写|统计与机器学习作业代写Statistical and Machine Learning代考|Principal Component Analysis as a Compression Method

Principal component analysis (PCA) is a method often used to compress the input data without losing as much information. The PCA works on a rectangular matrix in which the rows represent the observations $(n)$ and the columns, the independent variables $(p)$. The PCA creates linear combinations of the columns of matrix information, $\boldsymbol{X}$, and generates, at most, $p$ linear combinations, called principal components. These linear combinations, or principal components, can be obtained as follows:
$$\begin{array}{r} \mathrm{PC}1=\boldsymbol{w}_1 \boldsymbol{X}=w{11} X_1+w_{12} X_2+\cdots+w_{1 p} X_p \ \cdots \ \mathrm{PC}p=\boldsymbol{w}_p \boldsymbol{X}=w{p 1} X_1+w_{p 2} X_2+\cdots+w_{p p} X_p \end{array}$$
These linear combinations are constructed in such a way that the first principal component, $\mathrm{PC}_1$, captures the largest variance, the second principal component, $\mathrm{PC}_2$, captures the second largest variance, and so on. For this reason, it is expected that few principal components $(k<p)$ can explain the largest variability contained in the original rectangular matrix $(\boldsymbol{X})$, which means that with a compressed matrix, $\boldsymbol{X}^*$, we contain most of the variability of the original matrix, but with a significant reduction in the number of columns. In matrix notation, the full principal components are obtained with the following expression:
$$\mathbf{P C}=X W$$

where $W$ is a $p$-by-p matrix of weights whose columns are the eigenvectors of $\boldsymbol{Q}=\boldsymbol{X}^{\mathrm{T}} \boldsymbol{X}$, that is, we first need to calculate the eigenvalue decomposition of $\boldsymbol{Q}$, which is equal to $\boldsymbol{Q}=\boldsymbol{W} \boldsymbol{\Lambda} \boldsymbol{W}^{\mathrm{T}}$, where $\boldsymbol{W}$ represents the matrix of eigenvectors and $\boldsymbol{\Lambda}$ is a diagonal matrix of order $p$-by- $p$ containing the eigenvalues. For this reason, if we use $k<p$ principal components, the reduced (compressed) matrix is of order $n \times k$ and is calculated as
$$X^=X W^,$$
where $\boldsymbol{W}^*$ contains the same rows of $\boldsymbol{W}$, but only the first $k$ columns instead of the original $p$ columns. The selection of the number of principal components to maintain is critical, and we therefore provide some classical rules for this process:
(a) Select the required principal components to cover a certain amount of variances, such as $80 \%$ or $90 \%$.
(b) Order the eigenvalues from highest to lowest, then make a plot of each of the ordered eigenvalues against its position and select as the number of principal components that number from which little variance is gained by retaining additional eigenvalues. This plot is called a scree plot.
(c) Discard those components associated with eigenvalues below a certain level, which is usually set as the average variance. In particular, when working with a correlation matrix built with the input matrix, $\boldsymbol{X}$, the average value of the components is 1 , and this rule leads to selecting eigenvalues greater than the unit.

# 统计与机器学习代考

## 统计代写|统计与机器学习作业代写统计和机器学习代考|删除或添加输入的一般建议

.

(a)如果一个自变量(输入)方差为零，则删除该变量(输入)，这意味着输入只有一个唯一值(Kuhn and Johnson 2013)。

(c)如果一个自变量(输入)与另一个输入变量高度相关(几乎完全相关)，则删除该自变量(输入)，因为它们测量的是相同的底层信息(Kuhn and Johnson 2013)。这种现象在统计机器学习科学中被称为共线性，因为在它的存在下，一些机器学习算法(例如，基于梯度下降的算法)的参数估计是夸大的(不是准确估计的)。这三个问题在基因组预测中非常常见，因为自变量的一部分是标记信息，其中许多具有零或接近零的方差，而其他对具有非常高的相关性。在建模过程之前删除输入信息的优点之一是，这减少了实现统计机器学习算法所需的计算资源。另外，最终可能会得到一个更简洁、更可解释的模型。另一个优点是输入相关性较低的模型不容易出现不稳定的参数估计、数值误差和预测性能下降(Kuhn and Johnson 2013)。

(a)从名义或类别输入中创建虚拟变量
(b)从连续变量手动创建类别变量
(c)使用特定的转换对原始输入变量进行转换。首先，我们描述了从分类(名义或顺序)输入创建虚拟变量的过程。大多数监督统计机器学习方法都需要将分类输入转换为虚拟变量，因为提供原始自变量(不转换为虚拟变量)是不正确的，应该避免统计机器学习方法的实践者。然而，需要指出的是，当因变量是类别时，大多数统计机器学习方法不需要将其转换为虚拟变量。例如，假设我们在两个环境(E1和E2)中研究三种基因型(G1、G2和G3)，我们收集了以下粮食产量数据

## 统计代写|统计与机器学习作业代写统计和机器学习代考|主成分分析作为压缩方法

$$\begin{array}{r} \mathrm{PC}1=\boldsymbol{w}1 \boldsymbol{X}=w{11} X_1+w{12} X_2+\cdots+w_{1 p} X_p \ \cdots \ \mathrm{PC}p=\boldsymbol{w}p \boldsymbol{X}=w{p 1} X_1+w{p 2} X_2+\cdots+w_{p p} X_p \end{array}$$

$$\mathbf{P C}=X W$$

where $W$ 是 $p$的-by-p权重矩阵，其列是的特征向量 $\boldsymbol{Q}=\boldsymbol{X}^{\mathrm{T}} \boldsymbol{X}$，即我们首先需要计算的特征值分解 $\boldsymbol{Q}$等于 $\boldsymbol{Q}=\boldsymbol{W} \boldsymbol{\Lambda} \boldsymbol{W}^{\mathrm{T}}$，其中 $\boldsymbol{W}$ 表示特征向量和的矩阵 $\boldsymbol{\Lambda}$ 对角矩阵是有序的吗 $p$-by- $p$ 包含特征值。由于这个原因，如果我们使用 $k<p$ 主成分，简化(压缩)矩阵是有序的 $n \times k$ 计算结果为
$$X^=X W^,$$
where $\boldsymbol{W}^*$ 的相同行 $\boldsymbol{W}$但这只是第一次 $k$ 而不是原来的 $p$ 列。要维护的主成分数量的选择是至关重要的，因此我们为这个过程提供了一些经典规则:
(a)选择所需的主成分来覆盖一定数量的方差，例如 $80 \%$ 或 $90 \%$
(b)将特征值从高到低排序，然后将每个排序后的特征值按其位置作图，并选择保留额外的特征值获得方差最小的主成分个数。
(c)丢弃与特征值低于某一水平相关的分量，该水平通常被设置为平均方差。特别是，当处理由输入矩阵构建的相关矩阵时， $\boldsymbol{X}$时，各分量的平均值为1，此规则导致选择大于单位的特征值

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: