#include "components/assist_ranker/binary_classifier_predictor.h"
#include <memory>
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "components/assist_ranker/generic_logistic_regression_inference.h"
#include "components/assist_ranker/proto/ranker_model.pb.h"
#include "components/assist_ranker/ranker_model.h"
#include "components/assist_ranker/ranker_model_loader_impl.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
namespace assist_ranker {
BinaryClassifierPredictor::BinaryClassifierPredictor(
const PredictorConfig& config)
: … { … }
BinaryClassifierPredictor::~BinaryClassifierPredictor() { … }
std::unique_ptr<BinaryClassifierPredictor> BinaryClassifierPredictor::Create(
const PredictorConfig& config,
const base::FilePath& model_path,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { … }
bool BinaryClassifierPredictor::Predict(const RankerExample& example,
bool* prediction) { … }
bool BinaryClassifierPredictor::PredictScore(const RankerExample& example,
float* prediction) { … }
RankerModelStatus BinaryClassifierPredictor::ValidateModel(
const RankerModel& model) { … }
bool BinaryClassifierPredictor::Initialize() { … }
}