Skip to content

Commit 09cc4fd

Browse files
committed
Fixing multimodel batch predictions
1 parent 9b95329 commit 09cc4fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bigml/multivote.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,10 @@ function combine_categorical($weight_label=null, $with_confidence=false, $add_co
733733
if (!in_array($weight_label, array_values($this->COMBINATION_WEIGHTS))) {
734734
throw new \Exception("Wrong weight_label value.");
735735
}
736-
736+
if (is_array($prediction)) {
737+
// batch predictions return predictions as arrays
738+
$prediction = (object) $prediction;
739+
}
737740
if (!property_exists($prediction, $weight_label)) {
738741
throw new \Exception("Not enough data to use the selected prediction method. Try creating your model anew");
739742
} else {

0 commit comments

Comments
 (0)