我正在尝试使用随机森林在Python中执行聚类.在随机森林的R实现中,您可以设置一个标记来获取邻近矩阵.我似乎无法在随机森林的python scikit版本中找到类似的东西.有谁知道python版本是否有相同的计算?
所以这是代码:
#pragma omp parallel private (myId)
{
set_affinity();
myId = omp_get_thread_num();
if (myId<myConstant)
{
#pragma omp for schedule(static,1)
for(count = 0; count < AnotherConstant; count++)
{
//Do stuff, everything runs as it should
}
}
#pragma omp barrier //all threads wait as they should
#pragma omp single
{
//everything in here is executed by one thread as it should be
}
#pragma omp barrier //this is the barrier in which threads run ahead
par_time(cc_time_tot, phi_time_tot, psi_time_tot);
#pragma omp barrier
} …Run Code Online (Sandbox Code Playgroud)