### cs代写|机器学习代写machine learning代考|Bagging and data augmentation

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

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## cs代写|机器学习代写machine learning代考|Bagging and data augmentation

Having enough training data is often a struggle for machine learning practitioners. The problems of not having enough training data are endless. For one, this might reinforce the problem with overfitting or even prevent using a model of sufficient complexity at the start. Support vector machines are fairly simple (shallow) models that have the advantage of needing less data than deep learning methods. Nevertheless, even for these methods we might only have a limited amount of data to train the model.

A popular workaround has been a method called bagging, which stands for “bootstrap aggregating.” The idea is therefore to use the original dataset to create several more training datasets by sampling from the original dataset with replacement. Sampling with replacement, which is also called boostrapping, means that we could have several copies of the same training data in the dataset. The question then is what good they can do. The answer is that if we are training several models on these different datasets we can propose a final model as the model with the averaged parameters. Such a regularized model can help with overfitting or challenges of shallow minima in the learning algorithm. We will discuss this point further when discussing the learning algorithms in more detail later.

While bagging is an interesting method with some practical benefits, the field of data augmentation now often uses more general ideas. For example, we could just add some noise in the duplicate data of the bootstrapped training sets which will give the training algorithms some more information on possible variations of the data. We will later see that other transformation of data, such as rotations or some other form of systematic distortions for image data is now a common way to train deep neural networks for computer vision. Even using some form of other models to transfom the data can be helpful, such as generating training data synthetically from physics-based simulations. There are a lot of possibilities that we can not all discuss in this book, but we want to make sure that such techniques are kept in mind for practical applications.

## cs代写|机器学习代写machine learning代考|Balancing data

We have already mentioned balancing data, but it is worthwhile pausing again to look at this briefly. A common problem for many machine learning algorithms is a situation in which we have much more data for one class than another. For example, say we have data from 100 people with a decease and data from 100,000 healthy controls. Such ratios of positive and negative class are not uncommon in many applications. A trivial classifier that always predicts the majority class would then get $99.9$ per cent correct. In mathematical terms, this is just the prior probability of finding the class, which sets the baseline somewhat for better classifications. The problem is that many learning methods that are guided by simple loss measures such as this accuracy will mostly find this trivial solution. There have been many methods proposed to prevent such trivial solutions of which we will only mention a few here.

One of the simplest methods to counter imbalance of data is simply to use as many data from the positive class as the negative class in the training set. This systematic under-sampling of the majority class is a valid procedure as long as the sub-sampled data still represent sufficiently the important features of this class. However, it also means that we lose some information that is available to us and the machine. In the example above this means that we would only utilize 100 of the healthy controls in the training data. Another way is then to somehow enlarge the minority class by repeating some examples. This seems to be a bad idea as repeating examples does not seem to add any information. Indeed, it has been shown that this technique does not usually improve the performance of the classifier or prevent the majority overfitting problem. The only reason that this might sometimes work is that it can at least make sure the learning algorithms is incremented the same number of times for the majority and the minority class.

Another method is to apply different weights or learning rates to learn examples with different sizes to the training set. One problem with this is to find the right scaling of increase or decrease in the training weight, but this technique has been applied successfully in many case, including deep learning.

In practice it has been shown that a combination of both strategies under-sampling the majority class and over-sampling the minority class can be most beneficial, in particular when augmenting the over-sampling with some form of augmentation of the data. This is formalized in a method called SMOTE: synthetic minority over-sampling technique. The idea is therefore to change some characteristics of the over-sampled data such as adding noise. In this way there is at least a benefit of showing the learner variations that can guide the learning process. This is very similar to the bagging and data augmentation idea discussed earlier.

## cs代写|机器学习代写machine learning代考|Validation for hyperparameter learning

Thus far we have mainly assumed that we have one training set, which we use to learn the parameters of the parameterized hypothesis function (model), and a test set, to evaluate the performance of the resulting model. In practice, there is an important step in applying machine learning methods which have to do with tuning hyperparameters. Hyperparameters are algorithmic parameters beyond the parameters of the hypothesis functions. Such parameters include, for example, the number of neurons in a neural network, or which split criteria to use in decision trees, discussed later. SVMs also have several parameters such as one to tune the softness of the classifier, usually called $C$, or the width of the Gaussian kernel $\gamma$. We can even specify the number of iterations of some training algorithms. We will later shed more light on these parameters, but for now it is important only to know that there are many parameters of the algorithms itself beyond the parameters of the parameterized hypothesis function (model), which can be tunes. To some extent we could think of all these parameters as those of the final model, but it is common to make the distinction between the main model parameters and the hyperparaemeters of the algorithms.

The question is then how we tune the hyperparameters. This in itself is a learning problem for which we need a special learning set that we will call a validation set. The name indicates that it is used for some form of validation, although it is most often used to test a specific hyperparameters setting that can be used to compare different settings and to choose the better one. Choosing the hyperparameters itself is therefore a type of learning problem, and some form of learning algorithms have been proposed. A simple learning algorithm for hyperparameters would be a grid search where we vary the parameters in constant increments over some ranges of values. Other algorithms, like simulated annealing or genetic algorithms, have also been used. A dominant mode that is itself often effective when used by experienced machine learners is the handtuning of parameters. Whatever method we choose, we need a way to evaluate our choice with some of our data.

Therefore, we have to split our training data again into a set for training the main model parameters and a set for training the hyperparameters. The former we still call the training set, but the second is commonly called the validation set. Thus, the question arises again how to split the original training data into a training set for model parameters and the validation set for the hyperparameter tuning. Now, we can of course use the cross-validation procedure as explained earlier for this. Indeed, it is very common to use cross-validation for hyperparameter tuning, and somehow the name of the cross-validation coincides with the name of the validation step. But notice that the cross-validation procedure is a method to split data and that this can be used for both hyperparameter tuning and evaluating the predicted performance of our final model.

## 有限元方法代写

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 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。