AdaBoost, javascript implement