我很高兴Accord.net 3.8版本终于发布了,当然AdaBoost类有干净的决策和学习方法。 请给我一个关于新AdaBoost类的示例,或者告诉我们有关数据类型ISupervisedLearning的更多信息 我写了一些像这样的样本但是不能清楚地理解那种类型或它是如何工作的?
public void Learn_Internal(double[][] aadMlInpFv, int[] anMlOutGt)
{
if (aadMlInpFv == null || aadMlInpFv.Length == 0) return;
try
{
if (m_teacher == null)
{
m_oModel_Adaboost = new Boost<DecisionStump>();
m_teacher = new AdaBoost<DecisionStump>()
{
MaxIterations = 100,
Tolerance = 1e-10
};
}
m_teacher.Learner = U_LearnerFunc;
m_oModel_Adaboost = m_teacher.Learn(aadMlInpFv, anMlOutGt); // error should be zero.
}
catch (Exception ex)
{
}
}
private ISupervisedLearning<DecisionStump, double[], int> U_LearnerFunc(AdaBoostParameters arg)
{
throw new NotImplementedException();
}
答案 0 :(得分:0)
已使用以下方法解决:
m_teacher = new AdaBoost<DecisionStump>()
{
Learner = (p) => new ThresholdLearning(),
MaxIterations = 100,
Tolerance = 1e-10
};