Sets the mass (masses) for the test (datasets).
506676
def set_mass(self, masses, dataset_number=None, validated=None):
        
        self._set_run_attribute("mass", masses, dataset_number=dataset_number,
                                validated=validated)
481934
def initialize_weights(self):
        """"""
        n = self._outputSize
        m = self._inputSize
        self._Q = self._random.sample((n,m))

        # Normalize the weights of each units
        for i in range(n):
            self._Q[i] /=  np.sqrt( np.dot(self._Q[i], self._Q[i]) )
1214234
def set(self, value):
    """"""
    if self.is_value_set:
      # While we want to *allow* re-setting previously set measurements, we'd
      # rather promote the use of multidimensional measurements instead of
      # discarding data, so we make this somewhat chatty.
      _LOG.warning(
          'Overriding previous measurement %s value of %s with %s, the old '
          'value will be lost.  Use a dimensioned measurement if you need to '
          'save multiple values.', self.name, self.stored_value, value)
    if value is None:
      _LOG.warning('Measurement %s is set to None', self.name)
    self.stored_value = value
    self._cached_value = data.convert_to_base_types(value)
    self.is_value_set = True
423436
def set_values(self, values):
        """"""
        self.values = values
        self.height = len(self.values) * 14
        self._max = max(rec[1] for rec in values) if values else dt.timedelta(0)
90677
public static <K> void updateWeights(double l2, double learningRate, Map<K, Double> weights, Map<K, Double> newWeights) {
        if(l2 > 0.0) {
            for(Map.Entry<K, Double> e : weights.entrySet()) {
                K column = e.getKey();
                newWeights.put(column, newWeights.get(column) + l2*e.getValue()*(-learningRate));
            }
        }
    }
144806
public void setEntries(java.util.Collection<DatasetEntry> entries) {
        if (entries == null) {
            this.entries = null;
            return;
        }

        this.entries = new java.util.ArrayList<DatasetEntry>(entries);
    }
649906
def set(self, stats, value):
        
        self.update_stats(stats, value, self.SC_SET)
521517
public function train(Dataset $dataset) : void
    {
        if (!$dataset instanceof Labeled) {
            throw new InvalidArgumentException('This Estimator requires a'
                . ' Labeled training set.');
        }

        DatasetIsCompatibleWithEstimator::check($dataset, $this);

        $classes = $dataset->possibleOutcomes();

        $this->classes = $classes;
        $this->weights = array_fill_keys($classes, 0);

        $this->means = $this->variances = array_fill_keys($classes, []);

        foreach ($dataset->stratify() as $class => $stratum) {
            $means = $variances = [];

            foreach ($stratum->columns() as $values) {
                [$mean, $variance] = Stats::meanVar($values);

                $means[] = $mean;
                $variances[] = $variance ?: EPSILON;
            }

            $this->means[$class] = $means;
            $this->variances[$class] = $variances;

            $this->weights[$class] += $stratum->numRows();
        }

        if ($this->fitPriors) {
            $this->priors = [];

            $total = array_sum($this->weights) ?: EPSILON;

            foreach ($this->weights as $class => $weight) {
                $this->priors[$class] = log($weight / $total);
            }
        }
    }
1148337
protected void setMeasures(boolean[] measures)
    {
    	this.generalEvalOption.setValue(measures[0]);
    	this.f1Option.setValue(measures[1]);
    	this.entropyOption.setValue(measures[2]);
    	this.cmmOption.setValue(measures[3]);
    	this.ssqOption.setValue(measures[4]);
    	this.separationOption.setValue(measures[5]);
    	this.silhouetteOption.setValue(measures[6]);
    	this.statisticalOption.setValue(measures[7]);
    }
676226
def __set_values(self, values):
        
        array = tuple((self._clean_value(v),) for v in values)
        self._get_target().setDataArray(array)
58212
def reset( self ):
        
        dataSet = self.dataSet()
        if ( not dataSet ):
            dataSet = XScheme()
        
        dataSet.reset()
1332230
public void setDatasets(java.util.Collection<Dataset> datasets) {
        if (datasets == null) {
            this.datasets = null;
            return;
        }

        this.datasets = new com.amazonaws.internal.SdkInternalList<Dataset>(datasets);
    }
944524
public void scaleWeights(double scale) {
    for (int i = 0; i < weights.length; i++) {
      for (int j = 0; j < weights[i].length; j++) {
        weights[i][j] *= scale;
      }
    }
  }
338874
function SetWeights ( $weights )
    {
        assert ( is_array($weights) );
        foreach ( $weights as $weight )
            assert ( is_int($weight) );

        $this->_weights = $weights;
    }
1094449
public void setDatapoints(Map<Long, Double> datapoints) {
		_datapoints.clear();
		if (datapoints != null) {
			_datapoints.putAll(datapoints);
		}
	}
1302397
def _init(self):
        
        if self.num_samples:
            assert len(self.realizations) == self.num_samples, (
                len(self.realizations), self.num_samples)
            for rlz in self.realizations:
                for k in rlz.weight.dic:
                    rlz.weight.dic[k] = 1. / self.num_samples
        else:
            tot_weight = sum(rlz.weight for rlz in self.realizations)
            if not tot_weight.is_one():
                # this may happen for rounding errors or because of the
                # logic tree reduction; we ensure the sum of the weights is 1
                for rlz in self.realizations:
                    rlz.weight = rlz.weight / tot_weight
529926
void setWeight(Token tok, double d) {
		Double oldWeight = (Double)weightMap.get(tok);
		totalWeight += oldWeight==null ? d : (d - oldWeight.doubleValue());
		weightMap.put(tok,new Double(d));
	}