java.lang.ArrayIndexOutOfBoundsException: 6

JIRA | Jaroslaw Nowosad | 5 months ago
  1. 0

    Im doing naivebayes model ( test using flow) on small data set - if needed can attache all stuff. Every time I got error: DistributedException from localhost/127.0.0.1:54321, caused by java.lang.ArrayIndexOutOfBoundsException: 6 on server side I got : Caused by: java.lang.ArrayIndexOutOfBoundsException: 6 ERRR: at hex.genmodel.GenModel.getPrediction(GenModel.java:208) ERRR: at hex.ModelMetricsMultinomial.updateHits(ModelMetricsMultinomial.java:64) I checked code and it looks like in the method getPrediction, is expecting that priorClassDist has the same number of arguments as ties for (Integer i : ties) { //ties = [0, 2] sum += priorClassDist[i]; //0.7 + 0.2 <<<<--- } // that's where I finish at the moment, I didn't dig much more - just suspecting that cause is somewhere else Full stack trace: 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: Confusion Matrix (vertical: actual; across: predicted): 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: 1 2 3 4 8 9 Error Rate 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: 1 0 67 0 23 0 0 1.0000 = 90 / 90 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: 2 0 1111 0 131 6 0 0.1098 = 137 / 1,248 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: 3 0 380 0 29 0 0 1.0000 = 409 / 409 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: 4 0 496 0 227 11 0 0.6907 = 507 / 734 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: 8 0 136 0 30 6 0 0.9651 = 166 / 172 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: 9 0 17 0 0 0 0 1.0000 = 17 / 17 07-06 20:16:11.671 127.0.0.1:54321 20701 FJ-1-7 INFO: Totals 0 2207 0 440 23 0 0.4966 = 1,326 / 2,670 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: Top-6 Hit Ratios: 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: K Hit Ratio 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: 1 0.503371 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: 2 0.753933 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: 3 0.950936 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: 4 0.989888 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: 5 1.000000 07-06 20:16:11.672 127.0.0.1:54321 20701 FJ-1-7 INFO: 6 1.000000 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: DistributedException from localhost/127.0.0.1:54321, caused by java.lang.ArrayIndexOutOfBoundsException: 6 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.MRTask.getResult(MRTask.java:477) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.MRTask.getResult(MRTask.java:485) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.MRTask.doAll(MRTask.java:389) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.MRTask.doAll(MRTask.java:395) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.Model.predictScoreImpl(Model.java:886) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.Model.score(Model.java:813) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.Model.score(Model.java:806) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.Model.score(Model.java:789) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.naivebayes.NaiveBayes$NaiveBayesDriver.computeStatsFillModel(NaiveBayes.java:164) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.naivebayes.NaiveBayes$NaiveBayesDriver.compute2(NaiveBayes.java:190) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.H2O$H2OCountedCompleter.compute(H2O.java:1194) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at jsr166y.CountedCompleter.exec(CountedCompleter.java:468) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: Caused by: java.lang.ArrayIndexOutOfBoundsException: 6 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.genmodel.GenModel.getPrediction(GenModel.java:208) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.ModelMetricsMultinomial.updateHits(ModelMetricsMultinomial.java:64) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.ModelMetricsMultinomial$MetricBuilderMultinomial.perRow(ModelMetricsMultinomial.java:131) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.Model$BigScore.map(Model.java:960) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.MRTask.compute2(MRTask.java:645) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.H2O$H2OCountedCompleter.compute1(H2O.java:1197) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at hex.Model$BigScore$Icer.compute1(Model$BigScore$Icer.java) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: at water.H2O$H2OCountedCompleter.compute(H2O.java:1193) 07-06 20:16:11.698 127.0.0.1:54321 20701 FJ-1-7 ERRR: ... 5 more

    JIRA | 5 months ago | Jaroslaw Nowosad
    java.lang.ArrayIndexOutOfBoundsException: 6
  2. 0

    Importing CSV file into 2D String array

    Stack Overflow | 4 years ago | user2427023
    java.lang.ArrayIndexOutOfBoundsException: 6
  3. 0

    IndexOutOfBounds while looping through 2D array

    Stack Overflow | 3 years ago | Adam Miszczak
    java.lang.ArrayIndexOutOfBoundsException: 6
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Out of bounds error on current ignore

    GitHub | 3 years ago | btipling
    java.lang.ArrayIndexOutOfBoundsException: 6
  6. 0

    runtime error

    GitHub | 2 years ago | cooperstandard
    java.lang.ArrayIndexOutOfBoundsException: 6

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      6

      at hex.genmodel.GenModel.getPrediction()
    2. hex.genmodel
      GenModel.getPrediction
      1. hex.genmodel.GenModel.getPrediction(GenModel.java:208)
      1 frame
    3. hex
      Model$BigScore.map
      1. hex.ModelMetricsMultinomial.updateHits(ModelMetricsMultinomial.java:64)
      2. hex.ModelMetricsMultinomial$MetricBuilderMultinomial.perRow(ModelMetricsMultinomial.java:131)
      3. hex.Model$BigScore.map(Model.java:960)
      3 frames
    4. water
      H2O$H2OCountedCompleter.compute1
      1. water.MRTask.compute2(MRTask.java:645)
      2. water.H2O$H2OCountedCompleter.compute1(H2O.java:1197)
      2 frames
    5. hex
      Model$BigScore$Icer.compute1
      1. hex.Model$BigScore$Icer.compute1(Model$BigScore$Icer.java)
      1 frame
    6. water
      H2O$H2OCountedCompleter.compute
      1. water.H2O$H2OCountedCompleter.compute(H2O.java:1193)
      1 frame
    7. jsr166y
      ForkJoinWorkerThread.run
      1. jsr166y.CountedCompleter.exec(CountedCompleter.java:468)
      2. jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:263)
      3. jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:974)
      4. jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1477)
      5. jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
      5 frames