logger->debug('loading latest model'); $estimator = $this->modelStore->loadLatest($strategy); } else { $this->logger->debug("loading model $modelId"); $estimator = $this->modelStore->load($modelId); } } catch (RuntimeException $e) { throw new ServiceException("Could not load model $modelId to classify UID $uid and IP $ip: " . $e->getMessage(), $e->getCode(), $e); } $data = new Unlabeled([ $strategy->newVector($uid, $ip), ]); $predictions = $estimator->predict($data); return $predictions[0] === 'y'; } }