public static object GetPredictionEngine(MLTypesGenerator typesGenerator, TransformerChain <Microsoft.ML.Transforms.KeyToValueMappingTransformer> model) { var methodInfo = typesGenerator.GeneratorType.GetMethod("GetPredictionEngine"); var predictionEngine = methodInfo.Invoke(null, new object[] { model }); return(predictionEngine); }
public static IDataView GetDataView(MLTypesGenerator typesGenerator, List <object> generatedDataSet) { var type = typesGenerator.GeneratorType; var methodInfo = type.GetMethod("GetDataView"); var dataView = methodInfo.Invoke(null, new object[] { generatedDataSet.ToList() }); return((IDataView)dataView); }
public static MLTypesGenerator CreateTypesGenarator(ClassGenerator classGenerator, ClassGenerator labelClassGenerator) { MLTypesGenerator typesGenerator = new MLTypesGenerator($"{classGenerator.className}TypesGnerator", $"{classGenerator.className}TypesGneratorNamespace", classGenerator, labelClassGenerator); return(typesGenerator); }