예제 #1
0
파일: Model.java 프로젝트: WeiWenda/YuQing
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   long temp;
   temp = Double.doubleToLongBits(bias);
   result = prime * result + (int) (temp ^ (temp >>> 32));
   result = prime * result + Arrays.hashCode(label);
   result = prime * result + nr_class;
   result = prime * result + nr_feature;
   result = prime * result + ((solverType == null) ? 0 : solverType.hashCode());
   result = prime * result + Arrays.hashCode(w);
   return result;
 }
예제 #2
0
파일: Model.java 프로젝트: WeiWenda/YuQing
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Model other = (Model) obj;
   if (Double.doubleToLongBits(bias) != Double.doubleToLongBits(other.bias)) return false;
   if (!Arrays.equals(label, other.label)) return false;
   if (nr_class != other.nr_class) return false;
   if (nr_feature != other.nr_feature) return false;
   if (solverType == null) {
     if (other.solverType != null) return false;
   } else if (!solverType.equals(other.solverType)) return false;
   if (!equals(w, other.w)) return false;
   return true;
 }
예제 #3
0
파일: Model.java 프로젝트: WeiWenda/YuQing
 /** @return true for logistic regression solvers */
 public boolean isProbabilityModel() {
   return solverType.isLogisticRegressionSolver();
 }