MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / setWeight

Method setWeight

JSAT/src/jsat/classifiers/DataPoint.java:93–98  ·  view source on GitHub ↗

Set the weight that this data point should carry. The norm is 1.0 @param weight the new weight value @throws ArithmeticException if the weight value is not a number > 0

(double weight)

Source from the content-addressed store, hash-verified

91 * @throws ArithmeticException if the weight value is not a number > 0
92 */
93 public void setWeight(double weight)
94 {
95 if(Double.isNaN(weight) || Double.isInfinite(weight) || weight <= 0)
96 throw new ArithmeticException("Invalid weight assignment of " + weight);
97 this.weight = weight;
98 }
99
100 /**
101 * Returns true if this data point contains any categorical variables, false otherwise.

Callers 7

trainCMethod · 0.95
trainCMethod · 0.95
trainCMethod · 0.95
trainCMethod · 0.95
trainCMethod · 0.95
runMethod · 0.45
trainCMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected