r"""Update parameters

        This method updates the values of the algorthm parameters with the
        methods provided
328320
def _update_param(self):
        

        """

        # Update the gamma parameter.
        if not isinstance(self._beta_update, type(None)):
            self._beta = self._beta_update(self._beta)

        # Update lambda parameter.
        if not isinstance(self._lambda_update, type(None)):
            self._lambda = self._lambda_update(self._lambda)
72752
def update(self):
        """"""
        parensemble = self.analysis_evensen()
        obsensemble  = self.forecast(parensemble=parensemble)
        # todo: check for phi improvement
        if True:
            self.obsensemble = obsensemble
            self.parensemble = parensemble

        self.iter_num += 1
158470
def update(self, **kwargs):
        '''
        '''

        # Backends expect numpy arrays, so make sure all numeric values are
        # represented as such.
        kwargs = {k: (np.array(v) if isinstance(v, (int, float)) else v)
                  for k, v in kwargs.items()}
        self.args.update(kwargs)
721988
def update(self, **params):
        
        self._current_params = self._transform_params(**params)
        self._current_stats = ModelStats()
439545
def update_values(self):
        """"""
        self.method = self.idx_method.currentText()
        sw_det = DetectSlowWave(method=self.method)

        self.index['f1'].set_value(sw_det.det_filt['freq'][0])
        self.index['f2'].set_value(sw_det.det_filt['freq'][1])
        self.index['min_trough_dur'].set_value(sw_det.trough_duration[0])
        self.index['max_trough_dur'].set_value(sw_det.trough_duration[1])
        self.index['max_trough_amp'].set_value(sw_det.max_trough_amp)
        self.index['min_ptp'].set_value(sw_det.min_ptp)
        self.index['min_dur'].set_value(sw_det.min_dur)
        self.index['max_dur'].set_value(sw_det.max_dur)
601740
def update(self, callback=int):
        """"""
        # print(self._pending_modifications)
        add_var = self._pending_modifications.add_var
        if len(add_var) > 0:
            self._add_variables(add_var)
            self._pending_modifications.add_var = []
        callback()

        add_constr = self._pending_modifications.add_constr
        if len(add_constr) > 0:
            self._add_constraints(add_constr)
            self._pending_modifications.add_constr = []

        add_constr_sloppy = self._pending_modifications.add_constr_sloppy
        if len(add_constr_sloppy) > 0:
            self._add_constraints(add_constr_sloppy, sloppy=True)
            self._pending_modifications.add_constr_sloppy = []

        var_lb = self._pending_modifications.var_lb
        var_ub = self._pending_modifications.var_ub
        if len(var_lb) > 0 or len(var_ub) > 0:
            self._set_variable_bounds_on_problem(var_lb, var_ub)
            self._pending_modifications.var_lb = []
            self._pending_modifications.var_ub = []

        rm_var = self._pending_modifications.rm_var
        if len(rm_var) > 0:
            self._remove_variables(rm_var)
            self._pending_modifications.rm_var = []
        callback()

        rm_constr = self._pending_modifications.rm_constr
        if len(rm_constr) > 0:
            self._remove_constraints(rm_constr)
            self._pending_modifications.rm_constr = []
790787
def update(self):
        
        assert self.binded and self.params_initialized and self.optimizer_initialized

        for module in self._modules:
            module.update()
1297397
def Update(self, data):
        
        for hypo in self.Values():
            like = self.Likelihood(data, hypo)
            self.Mult(hypo, like)
        self.Normalize()
844054
static Map<String, List<Integer>> updateParameterNamesToIndexes(Map<String, List<Integer>> parametersNameToIndex,
                                                                    List<ArrayParameter> arrayParametersSortedAsc) {
        for(Map.Entry<String, List<Integer>> parameterNameToIndexes : parametersNameToIndex.entrySet()) {
            List<Integer> newParameterIndex = new ArrayList<>(parameterNameToIndexes.getValue().size());
            for(Integer parameterIndex : parameterNameToIndexes.getValue()) {
                newParameterIndex.add(computeNewIndex(parameterIndex, arrayParametersSortedAsc));
            }
            parameterNameToIndexes.setValue(newParameterIndex);
        }

        return parametersNameToIndex;
    }
506667
private function updateParametersInfo(): void
  {
    if (!empty($this->extendedParameters))
    {
      foreach ($this->extendedParameters as $spec_param_name => $spec_param_info)
      {
        $param_not_exist = true;
        foreach ($this->parameters as $key => $param_info)
        {
          if ($param_info['parameter_name']==$spec_param_name)
          {
            $this->parameters[$key] = array_merge($this->parameters[$key], $spec_param_info);
            $param_not_exist        = false;
            break;
          }
        }
        if ($param_not_exist)
        {
          throw new RoutineLoaderException("Specific parameter '%s' does not exist", $spec_param_name);
        }
      }
    }
  }
707875
def _update(self):
        

        """

        # Step 1 from alg.10.7.
        self._grad.get_grad(self._z_old)
        y_old = self._z_old - self._beta * self._grad.grad

        # Step 2 from alg.10.7.
        self._x_new = self._prox.op(y_old, extra_factor=self._beta)

        # Step 5 from alg.10.7.
        self._z_new = self._x_old + self._lambda * (self._x_new - self._x_old)

        # Restarting step from alg.4-5 in [L2018]
        if self._is_restart(self._z_old, self._x_new, self._x_old):
            self._z_new = self._x_new

        # Update old values for next iteration.
        np.copyto(self._x_old, self._x_new)
        np.copyto(self._z_old, self._z_new)

        # Update parameter values for next iteration.
        self._update_param()

        # Test cost function for convergence.
        if self._cost_func:
            self.converge = self.any_convergence_flag() or \
                            self._cost_func.get_cost(self._x_new)
1263571
private void update() {
        if (!predefinedPriori) {
            for (int c = 0; c < k; c++) {
                priori[c] = (nc[c] + EPSILON) / (n + k * EPSILON);
            }
        }

        if (model == Model.MULTINOMIAL || model == Model.POLYAURN) {
            for (int c = 0; c < k; c++) {
                for (int t = 0; t < p; t++) {
                    condprob[c][t] = (ntc[c][t] + sigma) / (nt[c] + sigma * p);
                }
            }
        } else {
            for (int c = 0; c < k; c++) {
                for (int t = 0; t < p; t++) {
                    condprob[c][t] = (ntc[c][t] + sigma) / (nc[c] + sigma * 2);
                }
            }
        }
    }
1027584
def _update_rho(self, k, r, s):
    

    if self.opt['AutoRho', 'Enabled']:
        tau = self.rho_tau
        mu = self.rho_mu
        xi = self.rho_xi
        if k != 0 and cp.mod(k + 1, self.opt['AutoRho', 'Period']) == 0:
            if self.opt['AutoRho', 'AutoScaling']:
                if s == 0.0 or r == 0.0:
                    rhomlt = tau
                else:
                    rhomlt = cp.sqrt(r / (s * xi) if r > s * xi
                                     else (s * xi) / r)
                    if rhomlt > tau:
                        rhomlt = tau
            else:
                rhomlt = tau
            rsf = 1.0
            if r > xi * mu * s:
                rsf = rhomlt
            elif s > (mu / xi) * r:
                rsf = 1.0 / rhomlt
            self.rho *= float(rsf)
            self.U /= rsf
            if rsf != 1.0:
                self.rhochange()
1352724
def _update_params_on_kvstore(param_arrays, grad_arrays, kvstore, param_names):
    """"""
    for index, pair in enumerate(zip(param_arrays, grad_arrays)):
        arg_list, grad_list = pair
        if grad_list[0] is None:
            continue
        name = param_names[index]
        # push gradient, priority is negative index
        kvstore.push(name, grad_list, priority=-index)
        # pull back the weights
        kvstore.pull(name, arg_list, priority=-index)
565687
def update_rho(self, k, r, s):
        """"""

        if self.opt['AutoRho', 'Enabled']:
            tau = self.rho_tau
            mu = self.rho_mu
            xi = self.rho_xi
            if k != 0 and np.mod(k + 1, self.opt['AutoRho', 'Period']) == 0:
                if self.opt['AutoRho', 'AutoScaling']:
                    if s == 0.0 or r == 0.0:
                        rhomlt = tau
                    else:
                        rhomlt = np.sqrt(r / (s * xi) if r > s * xi else
                                         (s * xi) / r)
                        if rhomlt > tau:
                            rhomlt = tau
                else:
                    rhomlt = tau
                rsf = 1.0
                if r > xi * mu * s:
                    rsf = rhomlt
                elif s > (mu / xi) * r:
                    rsf = 1.0 / rhomlt
                self.rho *= self.dtype.type(rsf)
                self.U /= rsf
                if rsf != 1.0:
                    self.rhochange()
238493
def fix_parameters(self):
        """"""
        for W, b in zip(self.W_list, self.b_list):
            W.fix()
            b.fix()
685693
def _update(self):
        """"""

        if self.strains.size and self.strains.size == self.values.size:
            x = np.log(self.strains)
            y = self.values

            if x.size < 4:
                self._interpolater = interp1d(
                    x,
                    y,
                    'linear',
                    bounds_error=False,
                    fill_value=(y[0], y[-1]))
            else:
                self._interpolater = interp1d(
                    x,
                    y,
                    'cubic',
                    bounds_error=False,
                    fill_value=(y[0], y[-1]))