我知道如何初始化这样的1d矢量
int myints[] = {16,2,77,29};
std::vector<int> fifth(myints, myints + sizeof(myints) / sizeof(int));
Run Code Online (Sandbox Code Playgroud)
假设我有2d数据.
float yy[][2] = {{20.0, 20.0}, {80.0, 80.0}, {20.0, 80.0}, {80.0, 20.0}};
Run Code Online (Sandbox Code Playgroud)
如何初始化2d向量?
我是AdaBoost算法的新手.在sklearn中, SAMME算法的_boost_discrete()将分类器权重返回为" estimator_weight "
def _boost_discrete(self, iboost, X, y, sample_weight):
.......
return sample_weight, estimator_weight, estimator_error
Run Code Online (Sandbox Code Playgroud)
但是,对于SAMME.R算法,"_ boost_real()" 返回 "1"而不是返回估计量权重.
def _boost_real(self, iboost, X, y, sample_weight):
.......
return sample_weight, 1., estimator_error
Run Code Online (Sandbox Code Playgroud)
我的问题是为什么SAMME.R算法将estimator_weight返回为'1'.我正在关注ref [1].请帮我理解算法.提前致谢.
参考:[1] J. Zhu,H.Zou,S.Rosset,T.Hastie,"Multi-class AdaBoost",2009.