Skip to content

Commit

Permalink
add augmented_transform interface
Browse files Browse the repository at this point in the history
  • Loading branch information
davnn committed Oct 15, 2021
1 parent 57b2141 commit 1d8f2db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ function MMI.transform(detector::Detector, model::DetectorModel, X)
return scores
end

function augmented_transform(detector::Detector, fitresult::Fit, X)
model, scores_train = fitresult
scores_test = MMI.transform(detector, model, X)
return scores_train, scores_test
end

# specify scitypes
MMI.input_scitype(::Type{<:Detector}) = Union{AbstractMatrix{<:MMI.Continuous}, MMI.Table(MMI.Continuous)}
MMI.target_scitype(::Type{<:Detector}) = AbstractVector{<:Union{Missing,OrderedFactor{2}}}
Expand Down

0 comments on commit 1d8f2db

Please sign in to comment.