title: Custom learner function for Adaboost
body: <p>I am using Adaboost to fit a classification problem. We can do the following:</p>
  
  <pre><code>ens = fitensemble(X, Y, 'AdaBoostM1', 100, 'Tree')
  </code></pre>
  
  <p>Now 'Tree' is the learner and we can change this to 'Discriminant' or 'KNN'. Each learner uses a certain <code>Template Object Creation Function</code>. More info <a href="https://nl.mathworks.com/help/stats/fitensemble.html#inputarg_Learners" rel="noreferrer">here</a>. </p>
  
  <p>Is it possible to create your own function and use it as a learner? And how?</p>