Posted on Categories:CS代写, Machine Learning, 机器学习, 计算机代写

# 计算机代写|机器学习代写Machine Learning代考|ENGG3300 A simple problem

avatest™

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 计算机代写|机器学习代写Machine Learning代考|A simple problem

Figure 1 shows a $1 \mathrm{D}$ regression problem. The goal is to fit a $1 \mathrm{D}$ curve to a few points. Which curve is best to fit these points? There are infinitely many curves that fit the data, and, because the data might be noisy, we might not even want to fit the data precisely. Hence, machine learning requires that we make certain choices:

How do we parameterize the model we fit? For the example in Figure 1, how do we parameterize the curve; should we try to explain the data with a linear function, a quadratic, or a sinusoidal curve?

What criteria (e.g., objective function) do we use to judge the quality of the fit? For example, when fitting a curve to noisy data, it is common to measure the quality of the fit in terms of the squared error between the data we are given and the fitted curve. When minimizing the squared error, the resulting fit is usually called a least-squares estimate.

Some types of models and some model parameters can be very expensive to optimize well. How long are we willing to wait for a solution, or can we use approximations (or handtuning) instead?

Ideally we want to find a model that will provide useful predictions in future situations. That is, although we might learn a model from training data, we ultimately care about how well it works on future test data. When a model fits training data well, but performs poorly on test data, we say that the model has overfit the training data; i.e., the model has fit properties of the input that are not particularly relevant to the task at hand (e.g., Figures 1 (top row and bottom left)). Such properties are refered to as noise. When this happens we say that the model does not generalize well to the test data. Rather it produces predictions on the test data that are much less accurate than you might have hoped for given the fit to the training data.

Machine learning provides a wide selection of options by which to answer these questions, along with the vast experience of the community as to which methods tend to be successful on a particular class of data-set. Some more advanced methods provide ways of automating some of these choices, such as automatically selecting between alternative models, and there is some beautiful theory that assists in gaining a deeper understanding of learning. In practice, there is no single “silver bullet” for all learning. Using machine learning in practice requires that you make use of your own prior knowledge and experimentation to solve problems. But with the tools of machine learning, you can do amazing things!

## 计算机代写|机器学习代写Machine Learning代考|Linear Regression

We will start by considering linear regression in just 1 dimension. Here, our goal is to learn a mapping $y=f(x)$, where $x$ and $y$ are both real-valued scalars (i.e., $x \in \mathbb{R}, y \in \mathbb{R}$ ). We will take $f$ to be an linear function of the form:
$$y=w x+b$$
where $w$ is a weight and $b$ is a bias. These two scalars are the parameters of the model, which we would like to learn from training data. n particular, we wish to estimate $w$ and $b$ from the $N$ training pairs $\left{\left(x_i, y_i\right)\right}_{i=1}^N$. Then, once we have values for $w$ and $b$, we can compute the $y$ for a new $x$.

Given 2 data points (i.e., $\mathrm{N}=2$ ), we can exactly solve for the unknown slope $w$ and offset $b$. (How would you formulate this solution?) Unfortunately, this approach is extremely sensitive to noise in the training data measurements, so you cannot usually trust the resulting model. Instead, we can find much better models when the two parameters are estimated from larger data sets. When $N>2$ we will not be able to find unique parameter values for which $y_i=w x_i+b$ for all $i$, since we have many more constraints than parameters. The best we can hope for is to find the parameters that minimize the residual errors, i.e., $y_i-\left(w x_i+b\right)$.

The most commonly-used way to estimate the parameters is by least-squares regression. We define an energy function (a.k.a. objective function):
$$E(w, b)=\sum_{i=1}^N\left(y_i-\left(w x_i+b\right)\right)^2$$
To estimate $w$ and $b$, we solve for the $w$ and $b$ that minimize this objective function. This can be done by setting the derivatives to zero and solving.
$$\frac{d E}{d b}=-2 \sum_i\left(y_i-\left(w x_i+b\right)\right)=0$$
Solving for $b$ gives us the estimate:
\begin{aligned} b^* & =\frac{\sum_i y_i}{N}-w \frac{\sum_i x_i}{N} \ & =\bar{y}-w \bar{x} \end{aligned}

## 计算机代写|机器学习代写Machine Learning代考|Linear Regression

$$y=w x+b$$

$$E(w, b)=\sum_{i=1}^N\left(y_i-\left(w x_i+b\right)\right)^2$$

$$\frac{d E}{d b}=-2 \sum_i\left(y_i-\left(w x_i+b\right)\right)=0$$

$$b^*=\frac{\sum_i y_i}{N}-w \frac{\sum_i x_i}{N} \quad=\bar{y}-w \bar{x}$$

## MATLAB代写

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