## 计算机代写|机器学习代写machine learning代考|COMP30027

2022年12月24日

couryes-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 数据科学基础
couryes™为您提供可以保分的包课服务

## 计算机代写|机器学习代写machine learning代考|Vector Space Representation and Normalization

This section will describe the vector space representation, which is the sparse, multidimensional representation of text used in most applications. Once the terms have been extracted we have a dictionary or lexicon as the base set of dimensions. For most mining applications, a sparse, multidimensional representation is preferred. This representation contains one dimension (feature) for each word and the value of the dimension is strictly positive only when the word is present in the document. Otherwise the value is set to 0 . The positive value could either be a normalized term frequency or a binary indicator value of 1 . Since a given document contains a tiny subset of the lexicon, this representation is extremely sparse. It is not uncommon for document collections of have lexicons significantly greater than a hundred-thousand words, and the average number of words in each document may only be a few hundred. Note that the entire proeess of conversion into this representation

loses all the ordering information among words. Therefore, this model is also referred to as the bag-of-words model. There are two commonly used multidimensional representations of text data, corresponding to the binary model and the $t f-i d f$ model.

In some applications, it is sufficient to use a $0-1$ representation corresponding to whether or not a word is present in the document. Certain types of machine learning applications such as the Bernoulli variant of the Bayes classifier only need the binary representation. However, the binary representation does lose a lot of information because it does not contain the frequencies of the individual terms, and it is also not normalized for the relative importance of words. However, the main advantages of the binary representation are that it is compact and it enables the use of many applications that would otherwise be hard to use on a representation containing the frequencies of words. For example, consider a setting in which we wish to find frequently co-occurring groups of $k$ words, irrespective of their placement in the document. In such a case, one can leverage the binary representation and apply an off-the-shelf frequent pattern mining algorithm on the multidimensional representation. Another interesting aspect of text data is that the presence or absence of a particular word in a document is more informative than its precise frequency. Therefore, reasonable results can be achieved with the binary representation in some cases. It is certainly worthwhile to use the binary representation in cases where the application at hand allows only binary input data. The binary model is also sometimes referred to as the Bernoulli or the boolean model.

Most representations of text do not work with the boolean model. Rather, they use normalized frequencies of the terms. This model is referred to as the tf-idf, where $t f$ stands for the term frequency and idf stands for the inverse document frequency. During the term extraction phase, the additional task of keeping track of the consolidated and stemmed terms is also accomplished.

Consider a document collection containing $n$ documents in $d$ dimensions. Let $\bar{X}=$ $\left(x_1 \ldots x_d\right)$ be the $d$-dimensional representation of a document after the term extraction phase. Note that $x_i$ represents the unnormalized frequency of a document. Therefore, all the values of $x_i$ are nonnegative and most are zero. Since word frequencies in a long document can sometimes vary significantly, it makes sense to use damping functions on these frequencies. The square-root or the logarithm function may be applied to the frequencies to reduce the effect of spam. In other words, one might replace each $x_i$ with either $\sqrt{x_i}$ or $\log \left(1+x_i\right)$. Although the use of such damping functions is not universal, there is significant evidence to suggest that the wide variation in word frequencies makes damping extremely important in at some applications. Damping also reduces the effect of (repeated) spam words.

## 计算机代写|机器学习代写machine learning代考|Similarity Computation in Text

Many multidimensional data mining applications use the Euclidean distance to measure the distances between pairs of points. The Euclidean distance between $\bar{X}=\left(x_1 \ldots x_d\right)$ and $\bar{Y}=\left(y_1 \ldots y_d\right)$ is defined as follows:
$$\text { Distance }(\bar{X}, \bar{Y})=\sqrt{\sum_{i=1}^d\left(x_i-y_i\right)^2}$$
It would seem at first sight that one should simply use the Euclidean distances to compute distances between pairs of points, since text is a special case of the multidimensional representation. However, the Euclidean distance is not good in computing distances in multidimensional representations that are very sparse and the number of zero values vary significantly over different points. This occurs freequently in the case of text because of the varying lengths of different documents.
In order to understand this point, consider the following four sentences:

1. She sat down.
2. She drank coffee.
3. She spent much time in learning text mining.
4. She invested significant efforts in learning text mining.
For simplicity in discussion, assume that stop words are not removed, and the text is represented in boolean form without normalization. Note that the first pair of sentences is virtually unrelated, but the two sentences are very short. Therefore, only five distinct words in the sentence have nonzero frequencies. The Euclidean distance is only $\sqrt{4}=2$. In the case of the third and fourth sentences, there are many words in common. However, these sentences are also longer, and therefore they also have many words that are present in only one of the two sentences. As a result, the Euclidean distance between the second pair is $\sqrt{6}$, which is laryer than thé first case. This clearly does not seem to be correct because the seecond pair of sentencees is obviously reelatéd in a semantic way, and they even share a larger fraction of their sentences in common.

This problem was caused by the varying lengths of the documents. The Euclidean distance will consistently report higher values for distances between longer pairs of documents even if large fractions of those documents are in common. For example, if exactly half of the terms in a pair of documents containing more than a thousand distinct words each are exactly identical, the Euclidean distance will still be more than $\sqrt{1000}$ when the documents are represented in boolean form. This distance will always be more than that between any pair of documents with less than 500 distinct words each, even if they do not share a single word in common. This type of distance function can lead to poor mining results in which longer and shorter documents are not treated with an even hand.

# 机器学习代考

## 计算机代写|机器学习代写machine learning代考|Similarity Computation in Text

Distance $(\bar{X}, \bar{Y})=\sqrt{\sum_{i=1}^d\left(x_i-y_i\right)^2}$

1. 她坐了下来。
2. 她喝了咖啡。
3. 她花了很多时间学习文本挖掘。
4. 她在学习文本挖掘方面投入了大量精力。
为了讨论简单起见，假设末删除停用词，并且文本以末经规范 化的布尔形式表示。请注意，第一对句子实际上是不相关的， 但这两个句子很短。因此，句子中只有五个不同的词具有非零 频率。欧氏距离只有 $\sqrt{4}=2$. 第三句和第四句的话，有很多共 同的词。然而，这些句子也更长，因此它们也有许多单词只出 现在两个句子中的一个中。结果，第二对之间的欧几里得距离 是 $\sqrt{6}$ ，这比第一种情况更有趣。这显然似平是不正确的，因 为第二对句子显然以语义方式相关，它们甚至共享了更大一部 分的共同句子。
这个问题是由文档的不同长度引起的。欧几里德距离将一致地报告较 长文档对之间的距离的较高值，即使这些文档的大部分是共同的。例 如，如果一对包含超过一千个不同单词的文档中恰好有一半的术语完 全相同，则欧几里得距离仍将大于 $\sqrt{1000}$ 当文档以布尔形式表示时。 这个距离总是大于任何两份文档之间的距离，每对文档的不同单词少 于 500 个，即使它们没有共享一个单词。这种类型的距离函数会导致 较差的挖掘结果，其中较长和较短的文档不会得到公平对待。

## 有限元方法代写

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