统计代写|机器学习作业代写machine learning代考| Continuous Attributes: Probability Density Functions

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 数据科学基础

统计代写|机器学习作业代写machine learning代考|Discretizing Continuous Attributes

Discretizing Continuous Attributes One possibility is to resort to the so-called discretization. The simplest “trick” is to split the attribute’s original domain into two. For instance, we can replace the continuous-valued attribute age with the Boolean attribute old whose value is true for age $>60$ and false otherwise. Unfortunately, this means that at least part of the available information is lost: a person may be old, but we no longer know how old; nor do we know whether one old person is older than another old person.

The loss is mitigated if we divide the original domain into not two, but several intervals, say, $(0,10], \ldots(90,100] .^{1}$ Suppose we provide a separate bin for each of these, and place a little black ball into the $i$-th bin for each training example whose value of age falls into the $i$-th interval.

In this way, we may reach a situation similar to the one depicted in Fig. 2.2. The upper part shows the bins, and the bottom part shows a step function created in the following manner: if $N$ is the size of the training set, and $N_{i}$ is the number of balls in the $i$-th bin, then the function’s value in the $i$-th interval is $N_{i} / N$, the relative frequency of the $i$-the interval balls in the whole set. Since the area under the function is $\frac{\Sigma N_{i}}{N}=1$, we have a mechanism to estimate the probability not of a concrete value of age, but rather of this value falling into the given interval.

Probability Density Function If the step function thus constructed seems too crude, we may fine-tune it by dividing the original domain into shorter-and thus more numerous – intervals, provided that the number of balls in each bin is sufficient for reliable probability estimates. If the training set is infinitely large, we can, theoretically speaking, keep reducing the lengths of the intervals until these intervals become infinitesimally short. The result of the bin-filling exercise will then no longer be a step function, but rather a continuous function, $p(x)$, such as the one

in Fig. 2.3. Its interpretation is obvious: a high value of $p(x)$ indicates that there are many examples with age close to $x$; conversely, a low value of $p(x)$ tells us that age values in the vicinity of $x$ are rare.

Put another way, $p(x)$ is the density of values around $x$. This is why $p(x)$ is usually referred to as a probability density function. Engineers often prefer the acronym $p d f$.

Let us be disciplined about the notation. The probability of a discrete-valued $x$ will be indicated by an upper-case letter, $P(x)$. By contrast, the value of a $p d f$ at $x$ will be denoted by a lower-case letter, $p(x)$. When we want to point out that the $p d f$ has been created exclusively from examples belonging to class $c_{i}$, we do so by using a subscript, $p_{c_{i}}(x)$.

统计代写|机器学习作业代写machine learning代考|Gaussian “Bell” Function: A Standard pdf

One way to approximate a $p d f$ is by the discretization technique from the previous section. Alternatively, we may choose to rely on standardized models known to work well in many realistic situations. Perhaps the most popular among these is the Gaussian function, named after the great German mathematician.

The Shape and the Formula Describing It The shape of the curve in Fig. $2.3$ explains why it is nicknamed “bell function.” The maximum is reached at the mean, $x=\mu$, and the curve slopes down gracefully with the growing distance of $x$ from $\mu$. It is reasonable to expect that this is a good model of the pdf of such variables as the body temperature where the density peaks at $x=99.7$ degrees Fahrenheit.

Mathematically speaking, the Gaussian function is defined by the following formula where $e$ is the base of natural logarithm:
$$p(x)=k \cdot e^{-\frac{(x-\mu)^{2}}{2 \sigma^{2}}}$$

Parameters Note that the greater the difference between $x$ and $\mu$, the greater the exponent’s numerator, and thus the smaller the value of $p(x)$ because the exponent is negative. The numerator is squared, $(x-\mu)^{2}$, to make sure that the function slopes down symmetrically on both sides of the mean, $\mu$. How steep the slope is depends on $\sigma^{2}$, a parameter called variance. Greater variance means smaller sensitivity to the difference between $x$ and $\mu$, and thus a “flatter” bell curve; conversely, smaller variance implies a narrower bell curve.

The task for coefficient $k$ is to make the area under the bell function equal to 1 as required by the theory of probability. It would be relatively easy to prove that this happens when $k$ is determined as follows:
$$k=\frac{1}{\sqrt{2 \pi \sigma^{2}}}$$

统计代写|机器学习作业代写machine learning代考|Approximating PDFs with Sets of Gaussian Functions

While the bell function offers a good mechanism to approximate the $p d f$ in many realistic domains, it is not a panacea. Some variables simply do not behave that way. Just consider the distribution of body-weight in a group that mixes grade-school children with their parents. If we create the $p d f$ using the discretization method, we will observe two peaks: one for the kids, and the other for the grown-ups. There may be three peaks if it turns out that body-weight of fathers is distributed around a higher mean than that of the mothers. And the number of peaks can be higher still if the families come from diverse ethnic groups.

Combining Gaussian Functions In domains of this kind, a single bell function does not fit the data. But what if we combine two or more of them? If we know the diverse data subsets (e.g., children, fathers, mothers), we may simply create a separate Gaussian for each group and then superimpose the bell functions on each other. Will this solve our problem?

The honest answer is, “yes, in this specific case.” In reality, prior knowledge about diverse subgroups is rarely available. A better solution will divide the body-weight values into many random groups; in the extreme, we may go as far as to make each example a single-member “group” of its own and then identify a Gaussian center with this example’s body-weight. For $m$ examples, this results in $m$ bell function.

The Formula to Combine Them Suppose we want to approximate the $p d f$ of a continuous attribute, $x$. If we denote by $\mu_{i}$ the value of $x$ in the $i$-th example, then the $p d f$ is approximated by the following sum of $m$ Gaussian functions:
$$p(x)=k \cdot \Sigma_{i=1}^{m} e^{-\frac{\left(x-\mu_{i}\right)^{2}}{2 \sigma^{2}}}$$
As before, the normalization constant, $k$, is to make sure that the area under the curve is 1 . This is achieved when $k$ is calculated as follows:
$$k=\frac{1}{m \sigma \sqrt{2 \pi}}$$
If $m$ is sufficiently high, Eq. $2.14$ will approximate the $p d f$ with almost arbitrary accuracy.

统计代写|机器学习作业代写machine learning代考|Gaussian “Bell” Function: A Standard pdf

p(X)=ķ⋅和−(X−μ)22σ2

ķ=12圆周率σ2

统计代写|机器学习作业代写machine learning代考|Approximating PDFs with Sets of Gaussian Functions

p(X)=ķ⋅Σ一世=1米和−(X−μ一世)22σ2

ķ=1米σ2圆周率

广义线性模型代考

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