コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public static MLTypesGenerator CreateTypesGenarator(ClassGenerator classGenerator, ClassGenerator labelClassGenerator)
        {
            MLTypesGenerator typesGenerator = new MLTypesGenerator($"{classGenerator.className}TypesGnerator", $"{classGenerator.className}TypesGneratorNamespace", classGenerator, labelClassGenerator);

            return(typesGenerator);
        }