本文整理匯總了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);
}
}