### 机器学习代写|监督学习代考Supervised and Unsupervised learning代写|Linear Maximal Margin Classifier for Linearly Separable Data

statistics-lab™ 为您的留学生涯保驾护航 在代写监督学习Supervised and Unsupervised learning方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写监督学习Supervised and Unsupervised learning代写方面经验极为丰富，各种代写监督学习Supervised and Unsupervised learning相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• Advanced Probability Theory 高等概率论
• Advanced Mathematical Statistics 高等数理统计学
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 机器学习代写|监督学习代考Supervised and Unsupervised learning代写|Linear Maximal Margin Classifier for Linearly Separable Data

Consider the problem of binary classification or dichotomization. Training data are given as
$$\left(\mathbf{x}{1}, y\right),\left(\mathbf{x}{2}, y\right), \ldots,\left(\mathbf{x}{n}, y{n}\right), \mathbf{x} \in \Re^{m}, \quad y \in{+1,-1}$$
For reasons of visualization only, we will consider the case of a two-dimensional input space, i.e., $\left(\mathbf{x} \in \Re^{2}\right)$. Data are linearly separable and there are many

different hyperplanes that can perform separation (Fig. 2.5). (Actually, for $\mathbf{x} \in \Re^{2}$, the separation is performed by ‘planes’ $w_{1} x_{1}+w_{2} x_{2}+b=d$. In other words, the decision boundary, i.e., the separation line in input space is defined by the equation $w_{1} x_{1}+w_{2} x_{2}+b=0$.). How to find ‘the best’ one? The difficult part is that all we have at our disposal are sparse training data. Thus, we want to find the optimal separating function without knowing the underlying probability distribution $P(\mathbf{x}, y)$. There are many functions that can solve given pattern recognition (or functional approximation) tasks. In such a problem setting, the SLT (developed in the early 1960 s by Vapnik and Chervonenkis [145]) shows that it is crucial to restrict the class of functions implemented by a learning machine to one with a complexity that is suitable for the amount of available training data.

In the case of a classification of linearly separable data, this idea is transformed into the following approach – among all the hyperplanes that minimize the training error (i.e., empirical risk) find the one with the largest margin. This is an intuitively acceptable approach. Just by looking at Fig $2.5$ we will find that the dashed separation line shown in the right graph seems to promise probably good classification while facing previously unseen data (meaning, in the generalization, i.e. test, phase). Or, at least, it seems to probably be better in generalization than the dashed decision boundary having smaller margin shown in the left graph. This can also be expressed as that a classifier with smaller margin will have higher expected risk. By using given training examples, during the learning stage, our machine finds parameters $\mathbf{w}=\left[\begin{array}{llll}w_{1} & w_{2} & \ldots & w_{m}\end{array}\right]^{T}$ and $b$ of a discriminant or decision function $d(\mathbf{x}, \mathbf{w}, b)$ given as

$$d(\mathbf{x}, \mathbf{w}, b)=\mathbf{w}^{T} \mathbf{x}+b=\sum_{i=1}^{m} w_{i} x_{i}+b$$
where $\mathbf{x}, \mathbf{w} \in \Re^{m}$, and the scalar $b$ is called a bias.(Note that the dashed separation lines in Fig. $2.5$ represent the line that follows from $d(\mathbf{x}, \mathbf{w}, b)=0)$. After the successful training stage, by using the weights obtained, the learning machine, given previously unseen pattern $\mathbf{x}{p}$, produces output $o$ according to an indicator function given as $$i{F}=o=\operatorname{sign}\left(d\left(\mathbf{x}_{p}, \mathbf{w}, b\right)\right) .$$

## 机器学习代写|监督学习代考Supervised and Unsupervised learning代写|Linear Soft Margin Classifier for Overlapping Classe

The learning procedure presented above is valid for linearly separable data, meaning for training data sets without overlapping. Such problems are rare in practice. At the same time, there are many instances when linear separating hyperplanes can be good solutions even when data are overlapped (e.g., normally distributed classes having the same covariance matrices have a linear separation boundary). However, quadratic programming solutions as given above cannot be used in the case of overlapping because the constraints $y_{i}\left[\mathbf{w}^{T} \mathbf{x}{i}+b\right] \geq 1, i=1, n$ given by (2.10b) cannot be satisfied. In the case of an overlapping (see Fig. 2.10), the overlapped data points cannot be correctly classified and for any misclassified training data point $\mathbf{x}{i}$, the corresponding $\alpha_{i}$ will tend to infinity. This particular data point (by increasing the corresponding $\alpha_{i}$ value) attempts to exert a stronger influence on the decision boundary in order to be classified correctly. When the $\alpha_{i}$ value reaches the maximal bound, it can no longer increase its effect, and the corresponding point will stay misclassified. In such a situation, the algorithm introduced above chooses all training data points as support vectors. To find a classifier with a maximal margin, the algorithm presented in the Sect. 2.2.1, must be changed allowing some data to be unclassified. Better to say, we must leave some data on the ‘wrong’ side of a decision boundary. In practice, we allow a soft margin and all data inside this margin (whether on the correct side of the separating line or on the wrong one) are neglected. The width of a soft margin can be controlled by a corresponding penalty parameter $C$ (introduced below) that determines the trade-off between the training error and VC dimension of the model.
The question now is how to measure the degree of misclassification and how to incorporate such a measure into the hard margin learning algorithm given by (2.10). The simplest method would be to form the following learning problem
$$\min \frac{1}{2} \mathbf{w}^{T} \mathbf{w}+C \text { (number of misclassified data) }$$
where $C$ is a penalty parameter, trading off the margin size (defined by $|\mathbf{w}|$, i.e., by $\mathbf{w}^{T} \mathbf{w}$ ) for the number of misclassified data points. Large $C$ leads to small number of misclassifications, bigger $\mathbf{w}^{T} \mathbf{w}$ and consequently to the smaller margin and vice versa. Obviously taking $C=\infty$ requires that the number of misclassified data is zero and, in the case of an overlapping this is not possible. Hence, the problem may be feasible only for some value $C<\infty$.

## 机器学习代写|监督学习代考Supervised and Unsupervised learning代写|The Nonlinear SVMs Classifier

The linear classifiers presented in two previous sections are very limited. Mostly, classes are not only overlapped but the genuine separation functions are nonlinear hypersurfaces. A nice and strong characteristic of the approach presented above is that it can be easily (and in a relatively straightforward manner) extended to create nonlinear decision boundaries. The motivation for such an extension is that an SV machine that can create a nonlinear decision hypersurface will be able to classify nonlinearly separable data. This will be achieved by considering a linear classifier in the so-called feature space that will be introduced shortly. A very simple example of a need for designing nonlinear models is given in Fig. $2.11$ where the true separation boundary is quadratic. It is obvious that no errorless linear separating hyperplane can be found now. The best linear separation function shown as a dashed straight line would make six misclassifications (textured data points; 4 in the negative class and 2 in the positive one). Yet, if we use the nonlinear separation boundary we are able to separate two classes without any error. Generally, for $n$-dimensional input patterns, instead of a nonlinear curve, an SV machine will create a nonlinear separating hypersurface.

## 机器学习代写|监督学习代考Supervised and Unsupervised learning代写|Linear Maximal Margin Classifier for Linearly Separable Data

(X1,是),(X2,是),…,(Xn,是n),X∈ℜ米,是∈+1,−1

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。