# ML.NET 中的机器学习任务Machine learning tasks in ML.NET

## 二元分类Binary classification

• 诊断患者是否患有某种疾病。Diagnosing whether a patient has a certain disease or not.
• 决定是否要将电子邮件标记为“垃圾邮件”。Making a decision to mark an email as "spam" or not.
• 确定照片是否包含特定项，例如狗或水果。Determining if a photo contains a particular item or not, such as a dog or fruit.

### 二元分类输入和输出Binary classification inputs and outputs

Score Single 由模型计算得出的原始分数The raw score that was calculated by the model
PredictedLabel Boolean 预测的标签，基于分数符号。The predicted label, based on the sign of the score. 负分数映射到 false，正分数映射到 trueA negative score maps to false and a positive score maps to true.

## 多类分类Multiclass classification

• 确定狗的品种是“西伯利亚哈士奇”、“金毛寻回犬”、“贵宾犬”等。Determining the breed of a dog as a "Siberian Husky", "Golden Retriever", "Poodle", etc.
• 了解电影评论是“正面”、“中立”还是“负面”。Understanding movie reviews as "positive", "neutral", or "negative".
• 将酒店评语分类为“位置”、“价格”、“整洁度”等。Categorizing hotel reviews as "location", "price", "cleanliness", etc.

### 多类分类输入和输出Multiclass classification inputs and outputs

Score Single 的向量Vector of Single 所有类的分数。The scores of all classes. 值越高意味着落入相关类的概率越高。Higher value means higher probability to fall into the associated class. 如果第 i 个元素具有最大值，则预测的标签索引为 i。If the i-th element has the largest value, the predicted label index would be i. 请注意，i 是从零开始的索引。Note that i is zero-based index.
PredictedLabel key 类型key type 预测标签的索引。The predicted label's index. 如果其值为 i，则实际标签为键值输入标签类型中的第 i 个类别。If its value is i, the actual label would be the i-th category in the key-valued input label type.

## 回归测试Regression

• 基于房子特性（如卧室数量、位置或大小）来预测房价。Predicting house prices based on house attributes such as number of bedrooms, location, or size.
• 基于历史数据和当前市场趋势预测将来的股票价格。Predicting future stock prices based on historical data and current market trends.
• 基于广告预算预测产品销售。Predicting sales of a product based on advertising budgets.

### 回归输入和输出Regression inputs and outputs

Score Single 模型预测的原始分数The raw score that was predicted by the model

## 聚类分析Clustering

• 基于酒店选择的习惯和特征来了解酒店来宾群。Understanding segments of hotel guests based on habits and characteristics of hotel choices.
• 确定客户群和人口统计信息来帮助生成目标广告活动。Identifying customer segments and demographics to help build targeted advertising campaigns.
• 基于生产指标对清单进行分类。Categorizing inventory based on manufacturing metrics.

### 聚类分析输入和输出Clustering inputs and outputs

Score Single 的向量vector of Single 给定数据点到所有群集的质心的距离The distances of the given data point to all clusters' centriods
PredictedLabel key 类型key type 模型预测的最接近的群集的索引。The closest cluster's index predicted by the model.

## 异常情况检测Anomaly detection

PCA 是机器学习中已建立的一种技术，由于它揭示了数据的内部结构，并解释了数据中的差异，因此经常被用于探索性数据分析。An established technique in machine learning, PCA is frequently used in exploratory data analysis because it reveals the inner structure of the data and explains the variance in the data. PCA 的工作方式是通过分析包含多个变量的数据。PCA works by analyzing data that contains multiple variables. 它查找变量之间的关联性，并确定最能捕捉结果差异的值的组合。It looks for correlations among the variables and determines the combination of values that best captures differences in outcomes. 这些组合的特性值用于创建一个更紧凑的特性空间，称为主体组件。These combined feature values are used to create a more compact feature space called the principal components.

• 识别潜在的欺诈交易。Identifying transactions that are potentially fraudulent.
• 指示发生了网络入侵的学习模式。Learning patterns that indicate that a network intrusion has occurred.
• 发现异常的患者群集。Finding abnormal clusters of patients.
• 检查输入系统的值。Checking values entered into a system.

### 异常情况检测输入和输出Anomaly detection inputs and outputs

Score Single 由异常情况检测模型计算得出的非负无界分数The non-negative, unbounded score that was calculated by the anomaly detection model
PredictedLabel Boolean true/false 值表示输入是否异常 (PredictedLabel=true) 或 (PredictedLabel=false)A true/false value representing whether the input is an anomaly (PredictedLabel=true) or not (PredictedLabel=false)

## 排名Ranking

### 排名输入和输出Ranking input and outputs

Score Single 由模型计算以确定预测的无界分数The unbounded score that was calculated by the model to determine the prediction

ForecastBySsa