【问题标题】:Accord.net 3.8 AdaBoost Learner delegateAccord.net 3.8 AdaBoost 学习者代表
【发布时间】:2018-04-12 06:23:56
【问题描述】:

我很高兴 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();
    }
  • 如果我使用旧方法 DecisionStump OnCrate(double[] weights),给我 编译时和运行时的警告给了我一个例外!
  • 我当然喜欢新的方式。

【问题讨论】:

    标签: c# machine-learning accord.net adaboost


    【解决方案1】:

    已经解决了:

    m_teacher = new AdaBoost<DecisionStump>()
                        {
                            Learner = (p) => new ThresholdLearning(),
                            MaxIterations = 100,
                            Tolerance = 1e-10
                        };
    

    【讨论】:

      猜你喜欢
      • 2013-05-21
      • 2012-04-27
      • 2015-07-19
      • 2013-08-05
      • 2017-03-27
      • 2018-02-06
      • 1970-01-01
      • 2015-09-16
      • 2018-09-17
      相关资源
      最近更新 更多