// h = train(dummy, X,Y, var_cat_mask, T,J,v, node_size); void train(int nlhs,mxArray *plhs[], int nrhs,const mxArray *prhs[]) { /* Input */ MLData tr; // training tr X set_X(prhs[1], tr.X); // response Y set_Y(prhs[2], tr.Y); // var_cat_mask set_mask(prhs[3], tr.var_type); // T int T = (int)mxGetScalar(prhs[4]); // J int J = (int)mxGetScalar(prhs[5]); // v double v = (double)mxGetScalar(prhs[6]); // node_size int node_size = (int)mxGetScalar(prhs[7]); /* train */ tr.problem_type = PROBLEM_CLS; tr.preprocess(); booster_t* pbooster = new booster_t; pbooster->param_.T = T; pbooster->param_.v = v; pbooster->param_.J = J; pbooster->param_.ns = node_size; pbooster->train(&tr); /*Output*/ plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL); double* pp = mxGetPr(plhs[0]); *pp = (long long) pbooster; }
/*! Initialize the 3D point coordinates. \param X,Y,Z : \f$(X,Y,Z)\f$ coordinates in the camera frame of the 3D point visual feature. \sa set_X(), set_Y(), set_Z() */ void vpFeaturePoint3D::set_XYZ(const double X, const double Y, const double Z) { set_X(X) ; set_Y(Y) ; set_Z(Z) ; for(unsigned int i = 0; i < nbParameters; i++) flags[i] = true; }