5.15 机器学习
DataCleaner提供了一组用于训练或测试机器学习模型的分析器。其思想是,可以使用记录来构建 (“train”) 一个数学模型,该模型基于记录的其他属性来描述任何给定属性/列的值。例如,您可以根据给定价格的历史数据和价格的相关因素(如大小、位置、条件和时间)对房价进行分类或预测。
支持两种用例:
- 分类,即确定一类记录的行为。例如,您可能希望根据客户的属性对最适合特定客户的产品进行分类。
- 回归,它决定了一个数字尺度上的连续值。例如,你可能想根据房子的特点来预测房子的价格。
DataCleaner内置了对以下类型机器学习模型的支持:
- Random Forests
- Support Vector Machines
- Neural Networks
在训练模型时,您提供了表示真实观察的数据。这些记录必须包含您将尝试使用回归进行分类或预测的属性的值。
影响预测或分类的属性称为特征。特征必须是数字,以便为模型提供有意义的数学输入。因此,有时必须从原始值中提取特征,而不是按原样应用。例如,在文本分析中,当您试图确定一段文本的语言或性质时,通常需要从文本中提取n-grams。
DataCleaner提供以下特征提取策略(将列作为输入添加到training组件时选择):
- Direct (0.0 to 1.0), Takes numerical values as-is.(按原样取数值。)
- Scaled (Min-Max), Scales numerical values from the minimum to the maximum value observed.(缩放(最小-最大),将观察到的数值从最小值缩放到最大值。)
- Vector (One-Hot Encoding), Generates a feature for every distinct value encountered. The values of the feature will be either 0 or 1 to indicate whether or not the record has that particular value.(向量(一个热编码),为遇到的每个不同值生成一个特征。特性的值将是0或1,以指示记录是否具有该特定值。)
- Vector (2-gram), Generates a feature for every 2-gram observed in the text.(向量(2-gram),为文本中观察到的每2-gram生成一个特征。)
- Vector (3-gram), Generates a feature for every 3-gram observed in the text.(向量(3-gram),为文本中观察到的每3-gram生成一个特征。)
- Vector (4-gram), Generates a feature for every 4-gram observed in the text.(向量(4-gram),为文本中观察到的每4-gram生成一个特征。)
- Vector (5-gram), Generates a feature for every 5-gram observed in the text.(向量(5-gram),为文本中观察到的每5-gram生成一个特征。)