本文整理汇总了C#中weka.core.Instances.sort方法的典型用法代码示例。如果您正苦于以下问题:C# Instances.sort方法的具体用法?C# Instances.sort怎么用?C# Instances.sort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类weka.core.Instances
的用法示例。
在下文中一共展示了Instances.sort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buildClassifier
/// <summary> Creates a C4.5-type split on the given data. Assumes that none of
/// the class values is missing.
///
/// </summary>
/// <exception cref="Exception">if something goes wrong
/// </exception>
public override void buildClassifier(Instances trainInstances)
{
// Initialize the remaining instance variables.
m_numSubsets = 0;
//UPGRADE_TODO: The equivalent in .NET for field 'java.lang.Double.MAX_VALUE' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
m_splitPoint = System.Double.MaxValue;
m_infoGain = 0;
m_gainRatio = 0;
// Different treatment for enumerated and numeric
// attributes.
if (trainInstances.attribute(m_attIndex).Nominal)
{
m_complexityIndex = trainInstances.attribute(m_attIndex).numValues();
m_index = m_complexityIndex;
handleEnumeratedAttribute(trainInstances);
}
else
{
m_complexityIndex = 2;
m_index = 0;
trainInstances.sort(trainInstances.attribute(m_attIndex));
handleNumericAttribute(trainInstances);
}
}