Commands\CrossValidationCommand.cs (12)
123using (var ch = Host.Start(LoadName))
145private void RunCore(IChannel ch, string cmd)
255private RoleMappedData ApplyAllTransformsToData(IHostEnvironment env, IChannel ch, IDataView dstData,
265private RoleMappedData CreateRoleMappedData(IHostEnvironment env, IChannel ch, IDataView data, ITrainer trainer)
285private string GetSplitColumn(IChannel ch, IDataView input, ref IDataView output)
363private readonly Func<IHostEnvironment, IChannel, IDataView, ITrainer, RoleMappedData> _createExamples;
364private readonly Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> _applyTransformsToTestData;
366private readonly Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> _applyTransformsToValidationData;
390Func<IHostEnvironment, IChannel, IDataView, ITrainer, RoleMappedData> createExamples,
391Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> applyTransformsToTestData,
395Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> applyTransformsToValidationData = null,
480using (var ch = host.Start($"Fold {fold}"))
Commands\TrainCommand.cs (11)
114using (var ch = Host.Start(command))
136private void RunCore(IChannel ch, string cmd)
246public static IPredictor Train(IHostEnvironment env, IChannel ch, RoleMappedData data, ITrainer trainer,
252public static IPredictor Train(IHostEnvironment env, IChannel ch, RoleMappedData data, ITrainer trainer, RoleMappedData validData,
258private static IPredictor TrainCore(IHostEnvironment env, IChannel ch, RoleMappedData data, ITrainer trainer, RoleMappedData validData,
285public static bool TryLoadPredictor(IChannel ch, IHostEnvironment env, string inputModelFile, out IPredictor inputPredictor)
317public static void SaveModel(IHostEnvironment env, IChannel ch, IFileHandle output,
342public static void SaveModel(IHostEnvironment env, IChannel ch, Stream outputStream, IPredictor predictor, RoleMappedData data, string command = null)
351using (var ch2 = env.Start("SaveModel"))
442public static bool AddNormalizerIfNeeded(IHostEnvironment env, IChannel ch, ITrainer trainer, ref IDataView view, string featureColumn, NormalizeOption autoNorm)
491private static bool AddCacheIfWanted(IHostEnvironment env, IChannel ch, ITrainer trainer, ref RoleMappedData data, bool? cacheData)
Dirty\PredictorUtils.cs (5)
18public static void SaveSummary(IChannel ch, IPredictor predictor, RoleMappedSchema schema, TextWriter writer)
38public static void SaveText(IChannel ch, IPredictor predictor, RoleMappedSchema schema, TextWriter writer)
70public static void SaveBinary(IChannel ch, IPredictor predictor, BinaryWriter writer)
85public static void SaveIni(IChannel ch, IPredictor predictor, RoleMappedSchema schema, TextWriter writer)
117public static void SaveCode(IChannel ch, IPredictor predictor, RoleMappedSchema schema, TextWriter writer)
Evaluators\EvaluatorUtils.cs (5)
991private static List<string> GetMetricNames(IChannel ch, DataViewSchema schema, DataViewRow row, Func<int, bool> ignoreCol,
1124using (var ch = env.Register("GetMetricsAsString").Start("Get Metric Names"))
1694public static void PrintOverallMetrics(IHostEnvironment env, IChannel ch, string filename, IDataView overall, int numFolds)
1731public static void PrintWarnings(IChannel ch, Dictionary<string, IDataView> metrics)
1756public static void SavePerInstance(IHostEnvironment env, IChannel ch, string filename, IDataView data,
Evaluators\MamlEvaluator.cs (6)
27void PrintFoldResults(IChannel ch, Dictionary<string, IDataView> metrics);
41void PrintAdditionalMetrics(IChannel ch, params Dictionary<string, IDataView>[] metrics);
155void IMamlEvaluator.PrintFoldResults(IChannel ch, Dictionary<string, IDataView> metrics)
167private protected virtual void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics)
202void IMamlEvaluator.PrintAdditionalMetrics(IChannel ch, params Dictionary<string, IDataView>[] metrics)
214private protected virtual void PrintAdditionalMetricsCore(IChannel ch, Dictionary<string, IDataView>[] metrics)
Prediction\Calibrator.cs (14)
118ICalibrator FinishTraining(IChannel ch);
138IPredictor Calibrate(IChannel ch, IDataView data, ICalibratorTrainer caliTrainer, int maxRows);
844private static bool NeedCalibration(IHostEnvironment env, IChannel ch, ICalibratorTrainer calibrator,
907public static IPredictor TrainCalibratorIfNeeded(IHostEnvironment env, IChannel ch, ICalibratorTrainer calibrator,
933public static IPredictor GetCalibratedPredictor(IHostEnvironment env, IChannel ch, ICalibratorTrainer caliTrainer,
940public static ICalibrator TrainCalibrator(IHostEnvironment env, IChannel ch, ICalibratorTrainer caliTrainer, IDataView scored, string labelColumn, string scoreColumn, string weightColumn = null, int maxRows = _maxCalibrationExamples)
1013public static ICalibrator TrainCalibrator(IHostEnvironment env, IChannel ch, ICalibratorTrainer caliTrainer, IPredictor predictor, RoleMappedData data, int maxRows = _maxCalibrationExamples)
1119ICalibrator ICalibratorTrainer.FinishTraining(IChannel ch)
1450ICalibrator ICalibratorTrainer.FinishTraining(IChannel ch)
1458public abstract ICalibrator CreateCalibrator(IChannel ch);
1484public override ICalibrator CreateCalibrator(IChannel ch)
1669ICalibrator ICalibratorTrainer.FinishTraining(IChannel ch) => new PlattCalibrator(_host, _slope, _offset);
1880public override ICalibrator CreateCalibrator(IChannel ch)
2216using (var ch = host.Start("Calibrating"))