/* Estimate and return the model parameters.
515429
private void findParameters(int iterations, double correctionConstant) {
        LOG.info("Performing max " + iterations + " iterations.");

        double prevLL = 0.0;
        for (int i = 1; i <= iterations; i++) {
            LOG.debug("Iteration " + i);
            double currLL = nextIteration(correctionConstant); // Core

            if (i > 1) {
                if (prevLL > currLL) {
                    LOG.error("Model Diverging: log likelihood decreased");
                    break;
                }
                if (currLL - prevLL < LLThreshold) {
                    break;
                }
            }
            prevLL = currLL;
        }

        // kill a bunch of these big objects now that we don't need them
        observedExpects = null;
        modelExpects = null;
        numTimesEventsSeen = null;
        trainingDataFeatNameIndices = null;
    }
718788
def get_model(PARAMS):
    ''''''
    model = SVC()
    model.C = PARAMS.get('C')
    model.keral = PARAMS.get('keral')
    model.degree = PARAMS.get('degree')
    model.gamma = PARAMS.get('gamma')
    model.coef0 = PARAMS.get('coef0')
    
    return model
1041787
def get_model(method):
    """"""

    @wraps(method)
    def wrapper(migrator, model, *args, **kwargs):
        if isinstance(model, str):
            return method(migrator, migrator.orm[model], *args, **kwargs)
        return method(migrator, model, *args, **kwargs)
    return wrapper
831081
def get_model(PARAMS):
    ''''''
    model_dict = {
        'LinearRegression': LinearRegression(),
        'SVR': SVR(),
        'KNeighborsRegressor': KNeighborsRegressor(),
        'DecisionTreeRegressor': DecisionTreeRegressor()
    }
    if not model_dict.get(PARAMS['model_name']):
        LOG.exception('Not supported model!')
        exit(1)
    
    model = model_dict[PARAMS['model_name']]
    
    try:
        if PARAMS['model_name'] == 'SVR':
            model.kernel = PARAMS['svr_kernel']
        elif PARAMS['model_name'] == 'KNeighborsRegressor':
            model.weights = PARAMS['knr_weights']
    except Exception as exception:
        LOG.exception(exception)
        raise
    return model
845577
def get_parameters(self):
        """"""
        parenthesis = self.tokens[-1]
        for token in parenthesis.tokens:
            if isinstance(token, IdentifierList):
                return token.get_identifiers()
            elif imt(token, i=(Function, Identifier), t=T.Literal):
                return [token, ]
        return []
954726
def _getModelData(self, modelData, parentItem=None):
        """"""
        if parentItem is None:
            parentItem = self.rootItem

        for item in parentItem.getChildren():
            key = item.getItemData(0)
            if item.childCount():
                modelData[key] = odict()
                self._getModelData(modelData[key], item)
            else:
                if isinstance(item.getItemData(2), float):
                    modelData[key] = [item.getItemData(1), item.getItemData(2)]
                else:
                    modelData[key] = item.getItemData(1)
60484
def estimate_params(self,burn=None,clip=10.0,alpha=0.32):
        
        mle = self.get_mle()
        out = odict()
        for param in mle.keys():
            out[param] = self.estimate(param,burn=burn,clip=clip,alpha=alpha)
        return out
494126
def params(self):
        
        params = odict([])
        for key,model in self.models.items():
            params.update(model.params)
        return params
475319
def initial_guesses(self):
        
        return np.array([param.value for param in self.model.params])
759041
def parameters(self):
        """"""
        length_a = np.linalg.norm(self.matrix[:, 0])
        length_b = np.linalg.norm(self.matrix[:, 1])
        length_c = np.linalg.norm(self.matrix[:, 2])
        alpha = np.arccos(np.dot(self.matrix[:, 1], self.matrix[:, 2]) / (length_b * length_c))
        beta = np.arccos(np.dot(self.matrix[:, 2], self.matrix[:, 0]) / (length_c * length_a))
        gamma = np.arccos(np.dot(self.matrix[:, 0], self.matrix[:, 1]) / (length_a * length_b))
        return (
            np.array([length_a, length_b, length_c], float),
            np.array([alpha, beta, gamma], float)
        )
534382
public function getParameters()
    {
        if ($this->parameters === null) {
            // lazy load function parameters list
            $this->parameters = array();
            foreach ($this->node->params as $pos => $param) {
                if ($param instanceof Node\Param) {
                    $this->parameters[] = new ParameterModel($param, $pos);
                }
            }
        }
        return $this->parameters;
    }
905912
@Override
  public DiscreteFactor getModelFromParameters(SufficientStatistics parameters) {
    TensorSufficientStatistics tensorStats = (TensorSufficientStatistics) parameters;
    Tensor allTensor = tensorStats.get();
    Tensor parentTensor = allTensor.sumOutDimensions(childVars.getVariableNumsArray());
    
    return new TableFactor(getVars(), allTensor.elementwiseProduct(parentTensor.elementwiseInverse()));
  }
414738
def get_model(model, ctx, opt):
    """"""
    kwargs = {'ctx': ctx, 'pretrained': opt.use_pretrained, 'classes': classes}
    if model.startswith('resnet'):
        kwargs['thumbnail'] = opt.use_thumbnail
    elif model.startswith('vgg'):
        kwargs['batch_norm'] = opt.batch_norm

    net = models.get_model(model, **kwargs)
    if opt.resume:
        net.load_parameters(opt.resume)
    elif not opt.use_pretrained:
        if model in ['alexnet']:
            net.initialize(mx.init.Normal())
        else:
            net.initialize(mx.init.Xavier(magnitude=2))
    net.cast(opt.dtype)
    return net
751647
def _get_param_iterator(self):
        """"""
        return model_selection.ParameterSampler(
            self.param_distributions, self.n_iter, random_state=self.random_state
        )
1058766
def parameters(self, value):
        
    
        if len(value) != self.n_parameters:
            raise ValueError("Incorrect length of parameter vector. "
                             "Model has %d parameters, but got %d" %
                             (self.n_parameters, len(value)))

        i = 0
        for hl in self.hidden_layers:
            hl.parameters = value[i:i + hl.n_parameters]
            i += hl.n_parameters

        self.top_layer.parameters = value[-self.top_layer.n_parameters:]
41991
def _getParameters(self):
        """"""
        param = self.query._getParameters()                   
        param[self.__key] =  self.__value
        return param
1021343
def params(self):
        """"""

        result = {}

        for content in list(self.values()):

            if isinstance(content, CompositeModelElement):
                cparams = content.params

                for cpname in cparams:
                    cparam = cparams[cpname]

                    if cpname in result:
                        result[cpname].update(cparam)

                    else:
                        result[cpname] = cparam.copy()

            elif content.name in result:
                result[content.name].update(content)

            else:
                result[content.name] = content.copy()

        return result