Fits a classifier that maps the per-field similarity vector to a match
probability — the model consumed by np_score() method = "model". The
built-in engine is logistic regression; any engine returning an object with a
predict(obj, newdata, type = "response") method can be supplied.
Usage
np_train(pairs, engine = "logit", features = attr(pairs, "cmp_cols"))Arguments
- pairs
A labelled
np_pairsframe (seenp_label()); rows withNAlabel are ignored.- engine
"logit"(default) or a function(x, y)returning a fitted model, wherexis the similarity data frame andyis 0/1.- features
Similarity columns to use. Defaults to the compared fields.