ml.dmlc.xgboost4j.java.XGBoostError: [14:43:22] src/metric/elementwise_metric.cc:28: Check failed: (preds.size()) == (info.labels.size()) label and prediction size not match, hint: use merror or mlogloss for multi-class classification

GitHub | geoHeil | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    xgboost 4j spark test failure version v0.6.0

    GitHub | 8 months ago | geoHeil
    ml.dmlc.xgboost4j.java.XGBoostError: [14:43:22] src/metric/elementwise_metric.cc:28: Check failed: (preds.size()) == (info.labels.size()) label and prediction size not match, hint: use merror or mlogloss for multi-class classification

    Root Cause Analysis

    1. ml.dmlc.xgboost4j.java.XGBoostError

      [14:43:22] src/metric/elementwise_metric.cc:28: Check failed: (preds.size()) == (info.labels.size()) label and prediction size not match, hint: use merror or mlogloss for multi-class classification

      at ml.dmlc.xgboost4j.java.JNIErrorHandle.checkCall()
    2. ml.dmlc.xgboost4j
      XGBoostModel$$anonfun$1.apply
      1. ml.dmlc.xgboost4j.java.JNIErrorHandle.checkCall(JNIErrorHandle.java:48)
      2. ml.dmlc.xgboost4j.java.Booster.evalSet(Booster.java:178)
      3. ml.dmlc.xgboost4j.scala.Booster.evalSet(Booster.scala:97)
      4. ml.dmlc.xgboost4j.scala.spark.XGBoostModel$$anonfun$1.apply(XGBoostModel.scala:80)
      5. ml.dmlc.xgboost4j.scala.spark.XGBoostModel$$anonfun$1.apply(XGBoostModel.scala:62)
      5 frames
    3. Spark
      RDD.iterator
      1. org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$23.apply(RDD.scala:766)
      2. org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$23.apply(RDD.scala:766)
      3. org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
      4. org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:319)
      5. org.apache.spark.rdd.RDD.iterator(RDD.scala:283)
      5 frames