I am trying to use PermutationFeatureImportance (PFI) with F# but the F# type system is not resolving ITransformer to ISingleFeaturePredictionTransformer - which is required by PFI.
I believe it is due to IPredictorProducing (and related interfaces) being marked as "internal".
F# supports explicit interfaces and maybe that is the reason for this issue.
Here is a snippet of code that shows what I am trying to do
(I am using the latest bits - v 1.2.0 at the time of this post)
let mutableschema=nullletmdl= ctx.Model.Load(@"F:\fwaris\data\t\analysis\model_cv_LightGbmBinary.bin",&schema)letmdlt= mdl :?> TransformerChain<ITransformer>letm1= mdlt.LastTransformer //debugger shows it is Microsoft.ML.Data.BinaryPredictionTransformer<Microsoft.ML.IPredictorProducing<float>>letscored= mdl.Transform(trainView)
scored.Preview()
ctx.BinaryClassification.PermutationFeatureImportance(m1 :?>_,scored)
@dsyme
I am trying to use PermutationFeatureImportance (PFI) with F# but the F# type system is not resolving ITransformer to ISingleFeaturePredictionTransformer - which is required by PFI.
I believe it is due to IPredictorProducing (and related interfaces) being marked as "internal".
F# supports explicit interfaces and maybe that is the reason for this issue.
Here is a snippet of code that shows what I am trying to do
(I am using the latest bits - v 1.2.0 at the time of this post)
@dsyme