3 interfaces inheriting from IDataView
Microsoft.ML.Data (3)
Data\ILegacyDataLoader.cs (2)
57internal interface ILegacyDataLoader : IDataView, ICanSaveModel 99internal interface IDataTransform : IDataView, ICanSaveModel
Data\ITransposeDataView.cs (1)
26internal interface ITransposeDataView : IDataView
17 implementations of IDataView
Microsoft.Data.Analysis (1)
DataFrame.IDataView.cs (1)
13public partial class DataFrame : IDataView
Microsoft.ML.Data (12)
Data\RowCursorUtils.cs (1)
507private sealed class OneRowDataView : IDataView
DataLoadSave\Database\DatabaseLoader.cs (1)
700private sealed class BoundLoader : IDataView
DataView\AppendRowsDataView.cs (1)
31internal sealed class AppendRowsDataView : IDataView
DataView\ArrayDataViewBuilder.cs (1)
195private sealed class DataView : IDataView
DataView\BatchDataViewMapperBase.cs (1)
12internal abstract class BatchDataViewMapperBase<TInput, TBatch> : IDataView
DataView\CacheDataView.cs (1)
27internal sealed class CacheDataView : IDataView, IRowSeekable
DataView\DataViewConstructionUtils.cs (1)
447public abstract class DataViewBase<TRow> : IDataView
DataView\EmptyDataView.cs (1)
16internal sealed class EmptyDataView : IDataView
DataView\OpaqueDataView.cs (1)
15internal sealed class OpaqueDataView : IDataView
DataView\Transposer.cs (2)
715private sealed class DataViewSlicer : IDataView 1410public sealed class SlotDataView : IDataView
DataView\ZipDataView.cs (1)
18internal sealed class ZipDataView : IDataView
Microsoft.ML.Samples (1)
Dynamic\SimpleDataViewImplementation.cs (1)
146private sealed class InputObjectDataView : IDataView
Microsoft.ML.Transforms (3)
CustomMappingFilter.cs (1)
14internal abstract class CustomMappingFilterBase<TSrc> : IDataView
StatefulFilterTransform.cs (1)
25internal sealed class StatefulFilterTransform<TSrc, TDst, TState> : IDataView
SvmLight\SvmLightLoader.cs (1)
395private sealed class TextDataView : IDataView
3987 references to IDataView
Microsoft.Data.Analysis (11)
DataFrame.IDataView.cs (5)
16bool IDataView.CanShuffle => false; 39DataViewSchema IDataView.Schema => DataViewSchema; 41long? IDataView.GetRowCount() => Rows.Count; 57DataViewRowCursor IDataView.GetRowCursor(IEnumerable<DataViewSchema.Column> columnsNeeded, Random rand) 62DataViewRowCursor[] IDataView.GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNeeded, int n, Random rand)
IDataView.Extension.cs (6)
19/// <param name="dataView">The current <see cref="IDataView"/>.</param> 22public static DataFrame ToDataFrame(this IDataView dataView, long maxRows = defaultMaxRows) 30/// <param name="dataView">The current <see cref="IDataView"/>.</param> 33public static DataFrame ToDataFrame(this IDataView dataView, params string[] selectColumns) 41/// <param name="dataView">The current <see cref="IDataView"/>.</param> 45public static DataFrame ToDataFrame(this IDataView dataView, long maxRows, params string[] selectColumns)
Microsoft.Data.Analysis.Tests (24)
DataFrameIDataViewTests.cs (15)
21IDataView dataView = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, withNulls: false); 101IDataView dataView = df; 127IDataView dataView = DataFrameTests.MakeDataFrameWithAllColumnTypes(length, withNulls: true); 255IDataView dfAsIDataView = df; 269IDataView dfAsIDataView = df; 286IDataView dfAsIDataView = df; 322IDataView dfAsIDataView = df; 344private IDataView GetASampleIDataView() 359IDataView data = mlContext.Data.LoadFromEnumerable(enumerableOfData); 363private void VerifyDataFrameColumnAndDataViewColumnValues<T>(string columnName, IDataView data, DataFrame df, int maxRows = -1) 380IDataView data = GetASampleIDataView(); 397IDataView data = GetASampleIDataView(); 415IDataView data = GetASampleIDataView(); 432IDataView data = GetASampleIDataView(); 482var data = mlContext.Data.LoadFromEnumerable(inputData);
DataFrameTests.cs (9)
602IEnumerable<DataViewSchema.Column> dfColumns = ((IDataView)df).Schema; 607IEnumerable<DataViewSchema.Column> clampedColumns = ((IDataView)clampedColumn).Schema; 660IEnumerable<DataViewSchema.Column> columnNames = ((IDataView)df).Schema; 663IEnumerable<DataViewSchema.Column> prefixNames = ((IDataView)prefix).Schema; 664foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in columnNames.Zip(((IDataView)df).Schema, (e1, e2) => (e1, e2))) 675prefixNames = ((IDataView)df).Schema; 682IEnumerable<DataViewSchema.Column> suffixNames = ((IDataView)suffix).Schema; 683foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in ((IDataView)df).Schema.Zip(columnNames, (e1, e2) => (e1, e2))) 694suffixNames = ((IDataView)df).Schema;
Microsoft.ML.AutoML (176)
API\AutoCatalog.cs (8)
220/// obtain an <see cref="IDataView"/> that can be fed into an AutoML experiment, 221/// or used elsewhere in the ML.NET ecosystem (ie in <see cref="IEstimator{TTransformer}.Fit(IDataView)"/>. 248/// obtain an <see cref="IDataView"/> that can be fed into an AutoML experiment, 249/// or used elsewhere in the ML.NET ecosystem (ie in <see cref="IEstimator{TTransformer}.Fit(IDataView)"/>. 278/// obtain an <see cref="IDataView"/> that can be fed into an AutoML experiment, 279/// or used elsewhere in the ML.NET ecosystem (ie in <see cref="IEstimator{TTransformer}.Fit(IDataView)"/>. 747public SweepablePipeline Featurizer(IDataView data, string outputColumnName = "Features", string[] catelogicalColumns = null, string[] numericColumns = null, string[] textColumns = null, string[] imagePathColumns = null, string[] excludeColumns = null) 815public SweepablePipeline Featurizer(IDataView data, ColumnInformation columnInformation, string outputColumnName = "Features")
API\AutoMLExperimentExtension.cs (3)
30public static AutoMLExperiment SetDataset(this AutoMLExperiment experiment, IDataView train, IDataView validation, bool subSamplingTrainDataset = false) 68public static AutoMLExperiment SetDataset(this AutoMLExperiment experiment, IDataView dataset, int fold = 10, string samplingKeyColumnName = null)
API\BinaryClassificationExperiment.cs (10)
164public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null) 214public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null) 247public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null) 257public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null) 268public override CrossValidationExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, ColumnInformation columnInformation = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<BinaryClassificationMetrics>> progressHandler = null) 303public override CrossValidationExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<BinaryClassificationMetrics>> progressHandler = null) 324private SweepablePipeline CreateBinaryClassificationPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null) 424var eval = model.Transform(trainTestDatasetManager.LoadValidateDataset(_context, settings));
API\ColumnInference.cs (3)
22/// data into an <see cref="IDataView" />. 33/// See <typeref cref="ExperimentBase{TMetrics, TExperimentSettings}.Execute(IDataView, ColumnInformation, IEstimator{ITransformer}, System.IProgress{RunDetail{TMetrics}})" /> 48/// See <typeref cref="ExperimentBase{TMetrics, TExperimentSettings}.Execute(IDataView, ColumnInformation, IEstimator{ITransformer}, System.IProgress{RunDetail{TMetrics}})" />
API\ExperimentBase.cs (18)
67public virtual ExperimentResult<TMetrics> Execute(IDataView trainData, string labelColumnName = DefaultColumnNames.Label, 109public virtual ExperimentResult<TMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, 159public virtual ExperimentResult<TMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = DefaultColumnNames.Label, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<TMetrics>> progressHandler = null) 187public virtual ExperimentResult<TMetrics> Execute(IDataView trainData, IDataView validationData, 217public virtual CrossValidationExperimentResult<TMetrics> Execute(IDataView trainData, uint numberOfCVFolds, 247public virtual CrossValidationExperimentResult<TMetrics> Execute(IDataView trainData, 272private ExperimentResult<TMetrics> ExecuteTrainValidate(IDataView trainData, 274IDataView validationData, 296private CrossValidationExperimentResult<TMetrics> ExecuteCrossVal(IDataView[] trainDatasets, 298IDataView[] validationDatasets, 323private ExperimentResult<TMetrics> ExecuteCrossValSummary(IDataView[] trainDatasets, 325IDataView[] validationDatasets, 358private static (IDataView[] trainDatasets, IDataView[] validDatasets, ITransformer[] preprocessorTransforms) 359ApplyPreFeaturizerCrossVal(IDataView[] trainDatasets, IDataView[] validDatasets, IEstimator<ITransformer> preFeaturizer)
API\MulticlassClassificationExperiment.cs (10)
148public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 199public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 235public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 245public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 256public override CrossValidationExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, ColumnInformation columnInformation = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<MulticlassClassificationMetrics>> progressHandler = null) 293public override CrossValidationExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<MulticlassClassificationMetrics>> progressHandler = null) 314private SweepablePipeline CreateMulticlassClassificationPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null) 402var eval = model.Transform(trainTestDatasetManager.LoadValidateDataset(_context, settings));
API\RegressionExperiment.cs (10)
145public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null) 194public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null) 229public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null) 239public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null) 250public override CrossValidationExperimentResult<RegressionMetrics> Execute(IDataView trainData, uint numberOfCVFolds, ColumnInformation columnInformation = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<RegressionMetrics>> progressHandler = null) 286public override CrossValidationExperimentResult<RegressionMetrics> Execute(IDataView trainData, uint numberOfCVFolds, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<RegressionMetrics>> progressHandler = null) 297private SweepablePipeline CreateRegressionPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null) 429var eval = model.Transform(trainTestDatasetManager.LoadValidateDataset(_context, settings));
API\RunDetails\RunDetail.cs (1)
92/// You can call <see cref="IEstimator{TTransformer}.Fit(IDataView)" /> on
AutoMLExperiment\IDatasetManager.cs (12)
31IDataView Dataset { get; set; } 41IDataView LoadTrainDataset(MLContext context, TrialSettings? settings); 43IDataView LoadValidateDataset(MLContext context, TrialSettings? settings); 49private readonly IDataView _trainDataset; 50private readonly IDataView _validateDataset; 53public TrainValidateDatasetManager(IDataView trainDataset, IDataView validateDataset, string? subSamplingKey = null) 68public IDataView LoadTrainDataset(MLContext context, TrialSettings? settings) 89var subSampledTrainDataset = context.Data.TakeRows(_trainDataset, count); 97public IDataView LoadValidateDataset(MLContext context, TrialSettings? settings) 110public CrossValidateDatasetManager(IDataView dataset, int fold, string? samplingKeyColumnName = null) 117public IDataView Dataset { get; set; }
AutoMLExperiment\IMetricManager.cs (4)
21double Evaluate(MLContext context, IDataView eval); 54public double Evaluate(MLContext context, IDataView eval) 93public double Evaluate(MLContext context, IDataView eval) 128public double Evaluate(MLContext context, IDataView eval)
AutoMLExperiment\ITrialResultManager.cs (1)
148var dataView = context.Data.LoadFromTextFile(filePath, textLoaderColumns, separatorChar: ',', hasHeader: true, allowQuoting: true);
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (2)
53var eval = model.Transform(split.TestSet); 76var eval = model.Transform(trainTestDatasetManager.LoadValidateDataset(_mLContext!, settings));
ColumnInference\ColumnInferenceApi.cs (1)
63var dataView = textLoader.Load(path);
ColumnInference\ColumnInferenceValidationUtil.cs (1)
15IDataView dataView)
ColumnInference\ColumnTypeInference.cs (1)
269var idv = textLoader.Load(fileSource);
ColumnInference\PurposeInference.cs (3)
46private readonly IDataView _data; 69public IntermediateColumn(IDataView data, int columnId, ColumnPurpose suggestedPurpose = ColumnPurpose.Ignore) 241public static PurposeInference.Column[] InferPurposes(MLContext context, IDataView data,
ColumnInference\TextFileContents.cs (1)
94var idv = context.Data.TakeRows(textLoader.Load(source), 1000);
DatasetDimensions\DatasetDimensionsApi.cs (1)
13public static ColumnDimensions[] CalcColumnDimensions(MLContext context, IDataView data, PurposeInference.Column[] purposes)
DatasetDimensions\DatasetDimensionsUtil.cs (5)
14public static int GetTextColumnCardinality(IDataView data, DataViewSchema.Column column) 31public static bool HasMissingNumericSingleValue(IDataView data, DataViewSchema.Column column) 49public static bool HasMissingNumericVector(IDataView data, DataViewSchema.Column column) 67public static ulong CountRows(IDataView data, ulong maxRows) 83public static bool IsDataViewEmpty(IDataView data)
Experiment\MetricsAgents\BinaryMetricsAgent.cs (1)
81public BinaryClassificationMetrics EvaluateMetrics(IDataView data, string labelColumn, string groupIdColumn)
Experiment\MetricsAgents\IMetricsAgent.cs (1)
14T EvaluateMetrics(IDataView data, string labelColumn, string groupId);
Experiment\MetricsAgents\MultiMetricsAgent.cs (1)
69public MulticlassClassificationMetrics EvaluateMetrics(IDataView data, string labelColumn, string groupIdColumn)
Experiment\MetricsAgents\RankingMetricsAgent.cs (1)
69public RankingMetrics EvaluateMetrics(IDataView data, string labelColumn, string groupIdColumn)
Experiment\MetricsAgents\RegressionMetricsAgent.cs (1)
64public RegressionMetrics EvaluateMetrics(IDataView data, string labelColumn, string groupIdColumn)
Experiment\Runners\CrossValRunner.cs (4)
16private readonly IDataView[] _trainDatasets; 17private readonly IDataView[] _validDatasets; 27IDataView[] trainDatasets, 28IDataView[] validDatasets,
Experiment\Runners\CrossValSummaryRunner.cs (4)
18private readonly IDataView[] _trainDatasets; 19private readonly IDataView[] _validDatasets; 30IDataView[] trainDatasets, 31IDataView[] validDatasets,
Experiment\Runners\RunnerUtil.cs (3)
16IDataView trainData, 17IDataView validData, 31var scoredData = model.Transform(validData);
Experiment\Runners\TrainValidateRunner.cs (4)
14private readonly IDataView _trainData; 15private readonly IDataView _validData; 25IDataView trainData, 26IDataView validData,
Experiment\SuggestedPipeline.cs (2)
113public IEstimator<ITransformer> ToEstimator(IDataView trainset = null, 114IDataView validationSet = null)
Experiment\SuggestedTrainer.cs (1)
44public ITrainerEstimator<IPredictionTransformer<object>, object> BuildTrainer(IDataView validationSet = null)
Sweepers\SmacSweeper.cs (1)
124IDataView data = dvBuilder.GetDataView();
TrainerExtensions\BinaryTrainerExtensions.cs (9)
27ColumnInformation columnInfo, IDataView validationSet) 72ColumnInformation columnInfo, IDataView validationSet) 94ColumnInformation columnInfo, IDataView validationSet) 116ColumnInformation columnInfo, IDataView validationSet) 137ColumnInformation columnInfo, IDataView validationSet) 158ColumnInformation columnInfo, IDataView validationSet) 179ColumnInformation columnInfo, IDataView validationSet) 201ColumnInformation columnInfo, IDataView validationSet) 223ColumnInformation columnInfo, IDataView validationSet)
TrainerExtensions\ITrainerExtension.cs (1)
17IEnumerable<SweepableParam> sweepParams, ColumnInformation columnInfo, IDataView validationSet = null);
TrainerExtensions\MultiTrainerExtensions.cs (11)
26ColumnInformation columnInfo, IDataView validationSet) 48ColumnInformation columnInfo, IDataView validationSet) 68ColumnInformation columnInfo, IDataView validationSet) 91ColumnInformation columnInfo, IDataView validationSet) 111ColumnInformation columnInfo, IDataView validationSet) 134ColumnInformation columnInfo, IDataView validationSet) 156ColumnInformation columnInfo, IDataView validationSet) 178ColumnInformation columnInfo, IDataView validationSet) 200ColumnInformation columnInfo, IDataView validationSet) 220ColumnInformation columnInfo, IDataView validationSet) 239ColumnInformation columnInfo, IDataView validationSet)
TrainerExtensions\RankingTrainerExtensions.cs (2)
22ColumnInformation columnInfo, IDataView validationSet) 45ColumnInformation columnInfo, IDataView validationSet)
TrainerExtensions\RecommendationTrainerExtensions.cs (1)
15ColumnInformation columnInfo, IDataView validationSet)
TrainerExtensions\RegressionTrainerExtensions.cs (8)
23ColumnInformation columnInfo, IDataView validationSet) 45ColumnInformation columnInfo, IDataView validationSet) 67ColumnInformation columnInfo, IDataView validationSet) 89ColumnInformation columnInfo, IDataView validationSet) 110ColumnInformation columnInfo, IDataView validationSet) 131ColumnInformation columnInfo, IDataView validationSet) 153ColumnInformation columnInfo, IDataView validationSet) 175ColumnInformation columnInfo, IDataView validationSet)
Tuner\SmacTuner.cs (2)
138IDataView data = dvBuilder.GetDataView(); 150var test = model.Transform(trainTestSplit.TestSet);
Utils\DatasetColumnInfo.cs (1)
27public static DatasetColumnInfo[] GetDatasetColumnInfo(MLContext context, IDataView data, ColumnInformation columnInfo)
Utils\SplitUtil.cs (13)
13public static (IDataView[] trainDatasets, IDataView[] validationDatasets) CrossValSplit(MLContext context, 14IDataView trainData, uint numFolds, string samplingKeyColumn) 18var trainDatasets = new List<IDataView>(); 19var validationDatasets = new List<IDataView>(); 29var trainDataset = DropAllColumnsExcept(context, split.TrainSet, originalColumnNames); 30var validationDataset = DropAllColumnsExcept(context, split.TestSet, originalColumnNames); 49public static (IDataView trainData, IDataView validationData) TrainValidateSplit(MLContext context, IDataView trainData, 55var validationData = DropAllColumnsExcept(context, splitData.TestSet, originalColumnNames); 59public static IDataView DropAllColumnsExcept(MLContext context, IDataView data, IEnumerable<string> columnsToKeep)
Utils\UserInputValidationUtil.cs (9)
28public static void ValidateExperimentExecuteArgs(IDataView trainData, ColumnInformation columnInformation, 29IDataView validationData, TaskKind task) 69private static void ValidateTrainData(IDataView trainData, ColumnInformation columnInformation) 105private static void ValidateColumnInformation(IDataView trainData, ColumnInformation columnInformation, TaskKind task) 184private static void ValidateValidationData(IDataView trainData, IDataView validationData) 228private static void ValidateTrainDataColumns(IDataView trainData, IEnumerable<string> columnNames, string columnPurpose, 242private static void ValidateTrainDataColumn(IDataView trainData, string columnName, string columnPurpose, IEnumerable<DataViewType> allowedTypes = null) 284private static string ClosestNamed(IDataView trainData, string columnName, int maxAllowableEditDistance = int.MaxValue)
Microsoft.ML.AutoML.Samples (21)
AutoFit\BinaryClassificationExperiment.cs (3)
21IDataView trainDataView = mlContext.Data.LoadFromTextFile<SentimentIssue>(TrainDataPath, hasHeader: true); 22IDataView testDataView = mlContext.Data.LoadFromTextFile<SentimentIssue>(TestDataPath, hasHeader: true); 38IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView);
AutoFit\MulticlassClassificationExperiment.cs (3)
22IDataView trainDataView = mlContext.Data.LoadFromTextFile<PixelData>(TrainDataPath, separatorChar: ','); 23IDataView testDataView = mlContext.Data.LoadFromTextFile<PixelData>(TestDataPath, separatorChar: ','); 39IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView);
AutoFit\RankingExperiment.cs (3)
25IDataView trainDataView = mlContext.Data.LoadFromTextFile<SearchData>(TrainDataPath, hasHeader: true, separatorChar: ','); 26IDataView testDataView = mlContext.Data.LoadFromTextFile<SearchData>(TestDataPath, hasHeader: true, separatorChar: ','); 47IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView);
AutoFit\RecommendationExperiment.cs (3)
28IDataView trainDataView = mlContext.Data.LoadFromTextFile<Movie>(TrainDataPath, hasHeader: true, separatorChar: ','); 29IDataView testDataView = mlContext.Data.LoadFromTextFile<Movie>(TestDataPath, hasHeader: true, separatorChar: ','); 51IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView);
AutoFit\RegressionExperiment.cs (3)
22IDataView trainDataView = mlContext.Data.LoadFromTextFile<TaxiTrip>(TrainDataPath, hasHeader: true, separatorChar: ','); 23IDataView testDataView = mlContext.Data.LoadFromTextFile<TaxiTrip>(TestDataPath, hasHeader: true, separatorChar: ','); 39IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView);
AutoMLExperiment.cs (2)
24var dataView = context.Data.LoadFromEnumerable(data); 60var eval = bestModel.Transform(trainTestSplit.TestSet);
Cifar10.cs (2)
35var trainDataset = context.Data.LoadFromEnumerable(trainImages); 36var testDataset = context.Data.LoadFromEnumerable(testImages);
Sweepable\SweepableLightGBMBinaryExperiment.cs (2)
36var dataView = context.Data.LoadFromEnumerable(data); 87var eval = bestModel.Transform(trainTestSplit.TestSet);
Microsoft.ML.AutoML.Tests (94)
AutoFeaturizerTests.cs (5)
47var dataset = DatasetUtil.GetUciAdultDataView(); 59var dataset = DatasetUtil.GetIrisDataView(); 71var dataset = DatasetUtil.GetNewspaperChurnDataView(); 84var dataset = DatasetUtil.GetCreditApprovalDataView(); 110var trainData = textLoader.Load(datasetPath);
AutoFitTests.cs (30)
48var trainData = textLoader.Load(dataPath); 74var trainData = textLoader.Load(dataPath); 101var trainData = textLoader.Load(dataPath); 128var trainData = textLoader.Load(dataPath); 160var dataset = DatasetUtil.GetTaxiFareTrainDataView(); 191var dataset = DatasetUtil.GetTaxiFareTrainDataView(); 221var dataset = DatasetUtil.GetTaxiFareTrainDataView(); 262var trainData = textLoader.Load(DatasetUtil.TrivialMulticlassDatasetPath); 289var scoredData = result.BestRun.Results.First().Model.Transform(trainData); 321var scoredData = result.BestRun.Model.Transform(trainData); 336var trainData = context.Data.ShuffleRows(textLoader.Load(datasetPath), seed: 1); 339IDataView trainDataset = SplitUtil.DropAllColumnsExcept(context, trainTestData.TrainSet, originalColumnNames); 340IDataView testDataset = SplitUtil.DropAllColumnsExcept(context, trainTestData.TestSet, originalColumnNames); 352var scoredData = result.BestRun.Model.Transform(trainData); 363var trainData = context.Data.ShuffleRows(textLoader.Load(datasetPath), seed: 1); 375var scoredData = result.BestRun.Results.First().Model.Transform(trainData); 393var trainData = textLoader.Load(datasetPath); 403var scoredData = result.BestRun.Model.Transform(trainData); 419var trainDataView = reader.Load(new MultiFileSource(DatasetUtil.GetMLSRDataset())); 420var testDataView = mlContext.Data.TakeRows(trainDataView, 500); 481var trainDataView = reader.Load(DatasetUtil.GetMLSRDataset()); 524var trainDataView = reader.Load(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.trainFilename))); 525var testDataView = reader.Load(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.testFilename))); 550IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView); 588var dataFull = textLoader.Load(dataPath); 625var resFull = model.Transform(dataFull); 626var resTrainTest = model.Transform(dataTrainTest.TrainSet); 627var resCV = model.Transform(dataCV.First().TrainSet); 652var trainData = textLoader.Load(dataPath); 687IDataView predictions = experiment.BestRun.Model.Transform(trainData);
AutoMLExperimentTests.cs (10)
103var data = DatasetUtil.GetUciAdultDataView(); 220var data = DatasetUtil.GetUciAdultDataView(); 245var data = DatasetUtil.GetUciAdultDataView(); 270var data = DatasetUtil.GetUciAdultDataView(); 295var data = DatasetUtil.GetIrisDataView(); 322var data = DatasetUtil.GetIrisDataView(); 349var train = DatasetUtil.GetTaxiFareTrainDataView(); 350var test = DatasetUtil.GetTaxiFareTestDataView(); 380var train = DatasetUtil.GetTaxiFareTrainDataView(); 399var train = DatasetUtil.GetTaxiFareTrainDataView();
ColumnInferenceValidationUtilTests.cs (1)
27var dataView = DataViewTestFixture.BuildDummyDataView(schema);
DatasetDimensionsTests.cs (3)
28var data = dataBuilder.GetDataView(); 48var data = dataBuilder.GetDataView(); 79var data = dataBuilder.GetDataView();
DatasetUtil.cs (11)
29private static IDataView _uciAdultDataView; 31private static IDataView _taxiFareTrainDataView; 33private static IDataView _taxiFareTestDataView; 35private static IDataView _irisDataView; 37private static IDataView _newspaperChurnDataView; 52public static IDataView GetUciAdultDataView() 65public static IDataView GetIrisDataView() 78public static IDataView GetTaxiFareTrainDataView() 91public static IDataView GetNewspaperChurnDataView() 105public static IDataView GetCreditApprovalDataView() 114public static IDataView GetTaxiFareTestDataView()
GetNextPipelineTests.cs (3)
27var uciAdult = DatasetUtil.GetUciAdultDataView(); 41var scoredData = estimator.Fit(uciAdult).Transform(uciAdult); 52var uciAdult = DatasetUtil.GetUciAdultDataView();
PurposeInferenceTests.cs (1)
29IDataView data = DataViewTestFixture.BuildDummyDataView(schema);
SplitUtilTests.cs (3)
33var dataView = dataViewBuilder.GetDataView(); 49var dataView = dataViewBuilder.GetDataView(); 68var dataView = dataViewBuilder.GetDataView();
TrainValidaionDatasetManagerTest.cs (2)
32var trainData = textLoader.Load(dataPath); 47var subSampleTrainData = trainValidationDatasetManager.LoadTrainDataset(context, setting);
TransformInferenceTests.cs (1)
775var data = DataViewTestFixture.BuildDummyDataView(columns);
UserInputValidationTests.cs (17)
20private static readonly IDataView _data = DatasetUtil.GetUciAdultDataView(); 110var trainData = trainDataBuilder.GetDataView(); 114var validData = validDataBuilder.GetDataView(); 132var trainData = trainDataBuilder.GetDataView(); 137var validData = validDataBuilder.GetDataView(); 155var trainData = trainDataBuilder.GetDataView(); 160var validData = validDataBuilder.GetDataView(); 206var dataView = DataViewTestFixture.BuildDummyDataView(schema); 221var dataView = DataViewTestFixture.BuildDummyDataView(schema); 284var dataView = dataViewBuilder.GetDataView(); 300var dataView = DataViewTestFixture.BuildDummyDataView(schema); 314var dataView = DataViewTestFixture.BuildDummyDataView(schema, createDummyRow: false); 327var trainingData = dataViewBuilder.GetDataView(); 334var validationData = DataViewTestFixture.BuildDummyDataView(schema, createDummyRow: false); 354var trainingData = trainDataBuilder.GetDataView(); 366var validationData = validationDataBuilder.GetDataView(); 384var dataView = dataViewBuilder.GetDataView();
Utils\MLNetUtils\DataViewTestFixture.cs (3)
13public static IDataView BuildDummyDataView(IEnumerable<DatasetColumnInfo> columns, bool createDummyRow = true) 18public static IDataView BuildDummyDataView(DataViewSchema schema, bool createDummyRow = true) 23public static IDataView BuildDummyDataView(IEnumerable<(string name, DataViewType type)> columns, bool createDummyRow = true)
Utils\TaskAgnosticAutoFit.cs (4)
39IDataView trainData, 43IDataView validationData = null, 125public IDataView ScoredTestData; 131IDataView testData,
Microsoft.ML.CodeAnalyzer.Tests (1)
Helpers\AdditionalMetadataReferences.cs (1)
25internal static readonly MetadataReference MSDataDataViewReference = RefFromType<IDataView>();
Microsoft.ML.CodeGenerator (2)
Utils.cs (2)
43var trainData = textLoader.Load(inputFile); 52internal static IDictionary<string, string> GenerateSampleData(IDataView dataView, ColumnInferenceResults columnInference)
Microsoft.ML.CodeGenerator.Tests (2)
UtilTest.cs (2)
131var dataView = context.Data.LoadFromTextFile<TestClass>(filePath, separatorChar: ',', hasHeader: true); 166var dataView = context.Data.LoadFromTextFile<TestClassContainsDuplicates>(filePath, separatorChar: ',', hasHeader: true);
Microsoft.ML.Core (23)
Data\IEstimator.cs (9)
224/// The 'data loader' takes a certain kind of input and turns it into an <see cref="IDataView"/>. 231/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 233IDataView Load(TSource input); 277/// Note that <see cref="IDataView"/>'s are lazy, so no actual transformations happen here, just schema validation. 279IDataView Transform(IDataView input); 300IDataView TransformForTrainingPipeline(IDataView input); 314TTransformer Fit(IDataView input);
Data\RoleMappedSchema.cs (8)
404/// Encapsulates an <see cref="IDataView"/> plus a corresponding <see cref="RoleMappedSchema"/>. 406/// guaranteed to equal the the <see cref="IDataView.Schema"/> of <see cref="Data"/>. 414public IDataView Data { get; } 418/// guaranteed to be the same as <see cref="Data"/>'s <see cref="IDataView.Schema"/>. 422private RoleMappedData(IDataView data, RoleMappedSchema schema) 441public RoleMappedData(IDataView data, bool opt = false, params KeyValuePair<RoleMappedSchema.ColumnRole, string>[] roles) 456public RoleMappedData(IDataView data, IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> roles, bool opt = false) 475public RoleMappedData(IDataView data, string label, string feature,
EntryPoints\ModuleArgs.cs (2)
564/// A dataset, represented by an <see cref="IDataView"/>. 621if (typeof(IDataView).IsAssignableFrom(type))
EntryPoints\PredictorModel.cs (1)
51internal abstract void PrepareData(IHostEnvironment env, IDataView input, out RoleMappedData roleMappedData, out IPredictor predictor);
EntryPoints\TransformModel.cs (3)
25/// If an <see cref="IDataView"/> exists with this schema, then applying this transform model to it 47internal abstract IDataView Apply(IHostEnvironment env, IDataView input);
Microsoft.ML.Core.Tests (98)
UnitTests\CoreBaseTestClass.cs (3)
195protected bool CheckSameValues(IDataView view1, IDataView view2, bool exactTypes = true, bool exactDoubles = true, bool checkId = true) 324protected bool CheckSameValues(DataViewRowCursor curs1, IDataView view2, bool exactTypes = true, bool exactDoubles = true, bool checkId = true)
UnitTests\TestCustomTypeRegister.cs (3)
112/// It usually shows up as <see cref="DataViewSchema.Column.Type"/> among <see cref="IDataView.Schema"/>. 184var tribeDataView = ML.Data.LoadFromEnumerable(tribe); 187var tribeTransformed = model.Transform(tribeDataView);
UnitTests\TestEntryPoints.cs (91)
43private IDataView GetBreastCancerDataView() 63private IDataView GetBreastCancerDataviewWithTextColumns() 89var dataView = GetBreastCancerDataView(); 100private static int CountRows(IDataView dataView) 115var dataView = GetBreastCancerDataviewWithTextColumns(); 118var result = FeatureCombiner.PrepareFeatures(Env, new FeatureCombiner.FeatureCombinerInput() { Data = dataView, Features = new[] { "F1", "F2", "Rest" } }).OutputData; 134var dataView = GetBreastCancerDataviewWithTextColumns(); 140var scored1 = ScoreModel.Score(Env, new ScoreModel.Input() { Data = dataView, PredictorModel = model }).ScoredData; 143var scored2 = ScoreModel.Score(Env, new ScoreModel.Input() { Data = dataView, PredictorModel = lrModel.Apply(Env, trainData.Model) }).ScoredData; 154var dataView = GetBreastCancerDataviewWithTextColumns(); 417var dataView = GetBreastCancerDataView(); 421var individualScores = new IDataView[nModels]; 424var data = splitOutput.TrainData[i]; 447var avgScored = 453var medScored = 459var regScored = 463var zippedScores = ZipDataView.Create(Env, individualScores); 745var loadedData = mlContext.Data.LoadFromBinary(outputDataPath); 893var loadedData = mlContext.Data.LoadFromBinary(outputDataPath); 1054var loadedData = mlContext.Data.LoadFromBinary(outputDataPath); 1197var loadedData = mlContext.Data.LoadFromBinary(outputDataPath); 1344var loadedData = mlContext.Data.LoadFromBinary(outputDataPath); 1361var data = new TextLoader(mlContext, 1440var loadedData = mlContext.Data.LoadFromBinary(outputDataPath); 1506var dataView = GetBreastCancerDataView(); 1514var scored1 = ScoreModel.Score(Env, new ScoreModel.Input() { Data = splitOutput.TestData[2], PredictorModel = lrModel }).ScoredData; 1517var scored2 = ScoreModel.Score(Env, new ScoreModel.Input() { Data = splitOutput.TestData[2], PredictorModel = calibratedLrModel }).ScoredData; 1536var scoredFf = ScoreModel.Score(Env, new ScoreModel.Input() { Data = splitOutput.TestData[2], PredictorModel = twiceCalibratedFfModel }).ScoredData; 1543var dataView = GetBreastCancerDataView(); 1547var individualScores = new IDataView[nModels]; 1550var data = splitOutput.TrainData[i]; 1591var binaryScored = ScoreModel.Score(Env, 1597var binaryScoredCalibrated = ScoreModel.Score(Env, 1610var regressionScored = ScoreModel.Score(Env, 1623var anomalyScored = ScoreModel.Score(Env, 1666var scoredFromSaved = ScoreModel.Score(Env, 1799var individualScores = new IDataView[nModels]; 1802var data = splitOutput.TrainData[i]; 1857var binaryScored = ScoreModel.Score(Env, 1863var binaryScoredCalibrated = ScoreModel.Score(Env, 1876var regressionScored = ScoreModel.Score(Env, 1893var scoredFromSaved = ScoreModel.Score(Env, 2004var individualScores = new IDataView[nModels]; 2007var data = splitOutput.TrainData[i]; 2036var mcScored = ScoreModel.Score(Env, 2053var scoredFromSaved = ScoreModel.Score(Env, 2153var data = splitOutput.TrainData[i]; 3613var metrics = runner.GetOutput<IDataView>("OverallMetrics"); 3718var metrics = runner.GetOutput<IDataView>("OverallMetrics"); 3882var metrics = runner.GetOutput<IDataView>("OverallMetrics"); 3884Action<IDataView> validateAuc = (metricsIdv) => 3900metrics = runner.GetOutput<IDataView>("OverallMetrics2"); 4073var metrics = runner.GetOutput<IDataView>("OverallMetrics"); 4075Action<IDataView> aucValidate = (metricsIdv) => 4092metrics = runner.GetOutput<IDataView>("OverallMetrics2"); 4479var view = treeLeaf.OutputData; 4719var data = ML.Data.LoadFromTextFile(dataPath, new[] 4761var data = ML.Data.LoadFromTextFile(dataPath, new[] 4844var data = runner.GetOutput<IDataView>("outputData"); 4996var data = runner.GetOutput<IDataView>("Var_2130b277d4e0485f9cc5162c176767fa"); 5170var data = runner.GetOutput<IDataView>("overallMetrics"); 5354var data = runner.GetOutput<IDataView>("overallMetrics"); 5400var confusion = runner.GetOutput<IDataView>("confusionMatrix"); 5438var warnings = runner.GetOutput<IDataView>("warnings"); 5582var warnings = runner.GetOutput<IDataView>("warning"); 5762var data = runner.GetOutput<IDataView>("overallmetrics"); 6062var data = runner.GetOutput<IDataView>("overallMetrics"); 6119data = runner.GetOutput<IDataView>("perInstanceMetric"); 6282var data = runner.GetOutput<IDataView>("overallMetrics"); 6454var data = runner.GetOutput<IDataView>("overallMetrics"); 6571var data = runner.GetOutput<IDataView>("outputData"); 6661var data = runner.GetOutput<IDataView>("output_data"); 6878var data = runner.GetOutput<IDataView>("overall_metrics");
UnitTests\TestModelLoad.cs (1)
48var result = ModelFileUtils.LoadPipeline(env, rep, new MultiFileSource(null), true);
Microsoft.ML.Data (944)
Commands\CrossValidationCommand.cs (41)
34public IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> Scorer; 78public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] PreTransforms; 166new KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>( 167"", ComponentFactoryUtils.CreateFromFunction<IDataView, IDataTransform>( 182IDataView pipe = loader; 187Func<IDataView> validDataCreator = null; 219var overall = eval.GetOverallResults(overallList.ToArray()); 222Dictionary<string, IDataView>[] metricValues = tasks.Select(t => t.Result.Metrics).ToArray(); 243foreach (var idv in perInstance) 255private RoleMappedData ApplyAllTransformsToData(IHostEnvironment env, IChannel ch, IDataView dstData, 256RoleMappedData srcData, IDataView marker) 258var pipe = ApplyTransformUtils.ApplyAllTransformsToData(env, srcData.Data, dstData, marker); 265private RoleMappedData CreateRoleMappedData(IHostEnvironment env, IChannel ch, IDataView data, ITrainer trainer) 285private string GetSplitColumn(IChannel ch, IDataView input, ref IDataView output) 312private bool TryGetOverallMetrics(Dictionary<string, IDataView>[] metrics, out List<IDataView> overallList) 316overallList = new List<IDataView>(); 320IDataView idv; 332public readonly Dictionary<string, IDataView> Metrics; 337public FoldResult(Dictionary<string, IDataView> metrics, DataViewSchema scoreSchema, RoleMappedData perInstance, RoleMappedSchema trainSchema) 348private readonly IDataView _inputDataView; 352private readonly IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> _scorer; 363private readonly Func<IHostEnvironment, IChannel, IDataView, ITrainer, RoleMappedData> _createExamples; 364private readonly Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> _applyTransformsToTestData; 365private readonly Func<IDataView> _getValidationDataView; 366private readonly Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> _applyTransformsToValidationData; 387IDataView inputDataView, 390Func<IHostEnvironment, IChannel, IDataView, ITrainer, RoleMappedData> createExamples, 391Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> applyTransformsToTestData, 392IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> scorer, 394Func<IDataView> getValidationDataView = null, 395Func<IHostEnvironment, IChannel, IDataView, RoleMappedData, IDataView, RoleMappedData> applyTransformsToValidationData = null, 491IDataView trainPipe = new RangeFilter(host, trainFilter, _inputDataView); 501IDataView testPipe = new RangeFilter(host, testFilter, _inputDataView); 515IDataView validLoader = _getValidationDataView(); 516var validPipe = ApplyTransformUtils.ApplyAllTransformsToData(host, _inputDataView, validLoader);
Commands\DataCommand.cs (4)
59public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] Transforms; 153protected void SendTelemetryMetric(Dictionary<string, IDataView>[] metricValues) 156foreach (Dictionary<string, IDataView> mValue in metricValues) 158var data = mValue.First().Value;
Commands\EvaluateCommand.cs (5)
101Dictionary<string, IDataView> Evaluate(RoleMappedData data); 146private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) 225IDataView view = CreateAndSaveLoader( 248if (!metrics.TryGetValue(MetricKinds.OverallMetrics, out var overall)) 257var idv = evaluator.GetPerInstanceDataViewToSave(perInstData);
Commands\SaveDataCommand.cs (3)
130IDataView data = CreateAndSaveLoader(); 188public static void SaveDataView(IChannel ch, IDataSaver saver, IDataView view, IFileHandle file, bool keepHidden = false) 200public static void SaveDataView(IChannel ch, IDataSaver saver, IDataView view, Stream stream, bool keepHidden = false)
Commands\SavePredictorCommand.cs (1)
222var emptyView = ModelFileUtils.LoadPipeline(env, rep, new MultiFileSource(null));
Commands\ScoreCommand.cs (5)
21using TScorerFactory = IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform>; 37internal delegate void SignatureDataScorer(IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema); 70public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] PostTransform; 250IDataView input, 321Func<IHostEnvironment, IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> factoryFunc;
Commands\ShowSchemaCommand.cs (6)
83internal static void RunOnData(TextWriter writer, Arguments args, IDataView data) 91IEnumerable<IDataView> viewChainReversed = GetViewChainReversed(data); 92foreach (var view in viewChainReversed.Reverse()) 105private static IEnumerable<IDataView> GetViewChainReversed(IDataView data) 108IDataView view = (data as LegacyCompositeDataLoader)?.View ?? data;
Commands\TestCommand.cs (4)
48public IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> Scorer; 125if (!metrics.TryGetValue(MetricKinds.OverallMetrics, out var overall)) 130Dictionary<string, IDataView>[] metricValues = { metrics }; 136var idv = evaluator.GetPerInstanceDataViewToSave(perInstData);
Commands\TrainCommand.cs (12)
149IDataView view = CreateLoader(); 176IDataView validPipe = CreateRawLoader(dataFile: ImplOptions.ValidationFile); 194IDataView testPipeUsedInTrainer = CreateRawLoader(dataFile: ImplOptions.TestFile); 363var dataPipe = data.Data; 388public static void SaveDataPipe(IHostEnvironment env, RepositoryWriter repositoryWriter, IDataView dataPipe, bool blankLoader = false) 394IDataView pipeStart; 416/// Returns all the transforms of <see cref="IDataView"/> and the first data view (a non-transform). 421private static List<IDataTransform> BacktrackPipe(IDataView dataPipe, out IDataView pipeStart) 442public static bool AddNormalizerIfNeeded(IHostEnvironment env, IChannel ch, ITrainer trainer, ref IDataView view, string featureColumn, NormalizeOption autoNorm) 479IDataView ApplyNormalizer(IHostEnvironment innerEnv, IDataView input)
Commands\TrainTestCommand.cs (7)
32public IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> Scorer; 132IDataView trainPipe = CreateLoader(); 162IDataView validPipe = CreateRawLoader(dataFile: ImplOptions.ValidationFile); 180IDataView testPipeUsedInTrainer = CreateRawLoader(dataFile: ImplOptions.TestFile); 215if (!metrics.TryGetValue(MetricKinds.OverallMetrics, out var overall)) 220Dictionary<string, IDataView>[] metricValues = { metrics }; 226var idv = evaluator.GetPerInstanceDataViewToSave(perInstData);
Data\DataViewTypeManager.cs (1)
16/// To support custom column type in <see cref="IDataView"/>, the column's underlying type (e.g., a C# class's type)
Data\DataViewUtils.cs (3)
79/// and counting if <see cref="IDataView.GetRowCount"/> insists on returning <c>null</c>. 81public static long ComputeRowCount(IDataView view) 114IDataView view, IEnumerable<DataViewSchema.Column> columnsNeeded, IHost host, Random rand)
Data\ILegacyDataLoader.cs (6)
79void SaveData(Stream stream, IDataView data, params int[] cols); 86internal delegate void SignatureDataTransform(IDataView input); 92internal delegate void SignatureLoadDataTransform(ModelLoadContext ctx, IDataView input); 96/// and is instantiatable from arguments and an input <see cref="IDataView"/>. 101IDataView Source { get; } 113IDataTransform ApplyToData(IHostEnvironment env, IDataView newSource);
Data\ITransposeDataView.cs (3)
20/// way of accessing the data stored in a <see cref="IDataView"/>. 36/// <see cref="IDataView"/>. For example, if <see cref="IDataView.Schema"/>[i] is a scalar float column, then
Data\RowCursorUtils.cs (1)
473public static IDataView RowAsDataView(IHostEnvironment env, DataViewRow row)
Data\SchemaDefinition.cs (2)
100/// Allows a member to specify <see cref="IDataView"/> column name directly, as opposed to the default 122/// Mark this member as not being exposed as a <see cref="IDataView"/> column in the <see cref="DataViewSchema"/>.
Data\SlotCursor.cs (1)
12/// what <see cref="DataViewRowCursor"/> is to <see cref="IDataView"/>.
DataDebuggerPreview.cs (2)
15/// This class represents an eager 'preview' of a <see cref="IDataView"/>. 31internal DataDebuggerPreview(IDataView data, int maxRows = Defaults.MaxRows)
DataLoadSave\Binary\BinaryLoaderSaverCatalog.cs (9)
14/// components to save and read <see cref="IDataView"/> objects to and from a high-performance binary format. 19/// Load a <see cref="IDataView"/> from an <see cref="IMultiStreamSource"/> on a binary file. 20/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 24public static IDataView LoadFromBinary(this DataOperationsCatalog catalog, IMultiStreamSource fileSource) 35/// Load a <see cref="IDataView"/> from a binary file. 36/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 47public static IDataView LoadFromBinary(this DataOperationsCatalog catalog, string path) 62/// Save the <see cref="IDataView"/> into a binary stream. 75public static void SaveAsBinary(this DataOperationsCatalog catalog, IDataView data, Stream stream,
DataLoadSave\Binary\BinarySaver.cs (3)
570private void FetchWorker(BlockingCollection<Block> toCompress, IDataView data, 643public void SaveData(Stream stream, IDataView data, params int[] colIndices) 728private int RowsPerBlockHeuristic(IDataView data, ColumnCodec[] actives)
DataLoadSave\CompositeDataLoader.cs (3)
64/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 66public IDataView Load(TSource input) 68var idv = Loader.Load(input);
DataLoadSave\CompositeLoaderEstimator.cs (1)
34var idv = start.Load(input);
DataLoadSave\Database\DatabaseLoader.cs (4)
97/// Loads data from <paramref name="source"/> into an <see cref="IDataView"/>. 100public IDataView Load(DatabaseSource source) => new BoundLoader(this, source); 177/// Describes how an input column should be mapped to an <see cref="IDataView"/> column. 349/// Specifies the input columns that should be mapped to <see cref="IDataView"/> columns.
DataLoadSave\Database\LoadColumnNameAttribute.cs (1)
12/// To override name of <see cref="IDataView"/> column use <see cref="ColumnNameAttribute"/>.
DataLoadSave\DataLoaderExtensions.cs (3)
15/// Loads data from one or more file <paramref name="path"/> into an <see cref="IDataView"/>. 16/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 27public static IDataView Load(this IDataLoader<IMultiStreamSource> loader, params string[] path)
DataLoadSave\DataOperationsCatalog.cs (47)
30public readonly IDataView TrainSet; 34public readonly IDataView TestSet; 40internal TrainTestData(IDataView trainSet, IDataView testSet) 54/// Create a new <see cref="IDataView"/> over an enumerable of the items of user-defined type. 57/// Since <see cref="IDataView"/> is assumed to be immutable, the user is expected to support 66/// <param name="data">The enumerable data containing type <typeparamref name="TRow"/> to convert to a <see cref="IDataView"/>.</param> 69/// <returns>The constructed <see cref="IDataView"/>.</returns> 77public IDataView LoadFromEnumerable<TRow>(IEnumerable<TRow> data, SchemaDefinition schemaDefinition = null) 86/// Create a new <see cref="IDataView"/> over an enumerable of the items of user-defined type using the provided <see cref="DataViewSchema"/>, 92/// Since <see cref="IDataView"/> is assumed to be immutable, the user is expected to support 101/// <param name="data">The enumerable data containing type <typeparamref name="TRow"/> to convert to an <see cref="IDataView"/>.</param> 102/// <param name="schema">The schema of the returned <see cref="IDataView"/>.</param> 103/// <returns>An <see cref="IDataView"/> with the given <paramref name="schema"/>.</returns> 104public IDataView LoadFromEnumerable<TRow>(IEnumerable<TRow> data, DataViewSchema schema) 113/// Convert an <see cref="IDataView"/> into a strongly-typed <see cref="IEnumerable{TRow}"/>. 128public IEnumerable<TRow> CreateEnumerable<TRow>(IDataView data, bool reuseRowObject, 160public IDataView BootstrapSample(IDataView input, 192public IDataView Cache(IDataView input, params string[] columnsToPrefetch) 224public IDataView FilterRowsByColumn(IDataView input, string columnName, double lowerBound = double.NegativeInfinity, double upperBound = double.PositiveInfinity) 256public IDataView FilterRowsByKeyColumnFraction(IDataView input, string columnName, double lowerBound = 0, double upperBound = 1) 283public IDataView FilterRowsByMissingValues(IDataView input, params string[] columns) 295/// <see cref="ShuffleRows"/> will shuffle the rows of any input <see cref="IDataView"/> using a streaming approach. 299/// until all the rows have been yielded, resulting in a new <see cref="IDataView"/> of the same size as <paramref name="input"/> 301/// If the <see cref="IDataView.CanShuffle"/> property of <paramref name="input"/> is true, then it will also be read into the 309/// pooling to shuffle. This parameter has no effect if the <see cref="IDataView.CanShuffle"/> property of <paramref name="input"/> is <see langword="false"/>. 318public IDataView ShuffleRows(IDataView input, 341/// Skips the first <paramref name="count"/> rows from <paramref name="input"/> and returns an <see cref="IDataView"/> with all other rows. 352public IDataView SkipRows(IDataView input, long count) 369/// Returns returns an <see cref="IDataView"/> with the first <paramref name="count"/> rows from <paramref name="input"/>. 380public IDataView TakeRows(IDataView input, long count) 411public TrainTestData TrainTestSplit(IDataView data, double testFraction = 0.1, string samplingKeyColumnName = null, int? seed = null) 434var trainDV = ColumnSelectingTransformer.CreateDrop(_env, trainFilter, splitColumn); 435var testDV = ColumnSelectingTransformer.CreateDrop(_env, testFilter, splitColumn); 458public IReadOnlyList<TrainTestData> CrossValidationSplit(IDataView data, int numberOfFolds = 5, string samplingKeyColumnName = null, int? seed = null) 474internal static IEnumerable<TrainTestData> CrossValidationSplit(IHostEnvironment env, IDataView data, string splitColumn, int numberOfFolds = 5) 500var trainDV = ColumnSelectingTransformer.CreateDrop(env, trainFilter, splitColumn); 501var testDV = ColumnSelectingTransformer.CreateDrop(env, testFilter, splitColumn); 523internal static string CreateSplitColumn(IHostEnvironment env, ref IDataView data, string samplingKeyColumn, int? seed = null, bool fallbackInEnvSeed = false)
DataLoadSave\EstimatorChain.cs (2)
58public TransformerChain<TLastTransformer> Fit(IDataView input) 63IDataView current = input;
DataLoadSave\EstimatorExtensions.cs (5)
112public TTransformer Fit(IDataView input) 124/// Given an estimator, return a wrapping object that will call a delegate once <see cref="IEstimator{TTransformer}.Fit(IDataView)"/> 126/// <see cref="IEstimator{TTransformer}.Fit(IDataView)"/> method returns a specifically typed object, rather than just a general 135/// <see cref="IEstimator{TTransformer}.Fit(IDataView)"/> is called. Because <see cref="IEstimator{TTransformer}.Fit(IDataView)"/>
DataLoadSave\LegacyCompositeDataLoader.cs (21)
39public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] Transforms; 87public IDataView View { get; } 113params KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] transformArgs) 124KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] transformArgs) 133static string GetTagData(IComponentFactory<IDataView, IDataTransform> factory) 174/// It should return the <see cref="IDataView"/> that should share the same loader as the source data view.</param> 177KeyValuePair<string, string>[] tagData, Func<IHostEnvironment, int, IDataView, IDataView> createTransform) 191KeyValuePair<string, string>[] tagData, Func<IHostEnvironment, int, IDataView, IDataView> createTransform) 201IDataView srcView; 212IDataView view = srcView; 225var newDataView = createTransform(host, i, view); 231IDataView curDataView = newDataView; 273/// <see cref="IDataView"/> that shares the same loader as the provided source. 276string tag, string creationArgs, Func<IHostEnvironment, IDataView, IDataView> createTransform) 341/// - it accepts <see cref="IDataView"/> as input, not necessarily a loader. 347public static IDataView LoadSelectedTransforms(ModelLoadContext ctx, IDataView srcView, IHostEnvironment env, Func<string, bool> isTransformTagAccepted) 382var curView = srcView;
DataLoadSave\Text\LoadColumnAttribute.cs (1)
12/// To override name of <see cref="IDataView"/> column use <see cref="ColumnNameAttribute"/>.
DataLoadSave\Text\TextLoader.cs (12)
28/// Loads a text file into an IDataView. Supports basic mapping from input columns to <see cref="IDataView"/> columns. 33/// Describes how an input column should be mapped to an <see cref="IDataView"/> column. 46/// Describes how an input column should be mapped to an <see cref="IDataView"/> column. 51/// Describes how an input column should be mapped to an <see cref="IDataView"/> column. 62/// Describes how an input column should be mapped to an <see cref="IDataView"/> column. 74/// Describes how an input column should be mapped to an <see cref="IDataView"/> column. 86/// Describes how an input column should be mapped to an <see cref="IDataView"/> column. 483/// Specifies the input columns that should be mapped to <see cref="IDataView"/> columns. 1143/// Loads a text file into an <see cref="IDataView"/>. Supports basic mapping from input columns to IDataView columns. 1497internal static IDataView LoadFile(IHostEnvironment env, Options options, IMultiStreamSource fileSource) 1535/// Loads data from <paramref name="source"/> into an <see cref="IDataView"/>. 1545public IDataView Load(IMultiStreamSource source) => new BoundLoader(this, source);
DataLoadSave\Text\TextLoaderSaverCatalog.cs (16)
32/// If the sample has been saved with ML.NET's <see cref="SaveAsText(DataOperationsCatalog, IDataView, Stream, char, bool, bool, bool, bool)"/>, 81/// If the sample has been saved with ML.NET's <see cref="SaveAsText(DataOperationsCatalog, IDataView, Stream, char, bool, bool, bool, bool)"/>, 137/// Load a <see cref="IDataView"/> from a text file using <see cref="TextLoader"/>. 138/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 160public static IDataView LoadFromTextFile(this DataOperationsCatalog catalog, 186/// Load a <see cref="IDataView"/> from a text file using <see cref="TextLoader"/>. 187/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 199public static IDataView LoadFromTextFile(this DataOperationsCatalog catalog, string path, 211/// Load a <see cref="IDataView"/> from a text file using <see cref="TextLoader"/>. 212/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 233public static IDataView LoadFromTextFile<TInput>(this DataOperationsCatalog catalog, 250/// Load a <see cref="IDataView"/> from a text file using <see cref="TextLoader"/>. 251/// Note that <see cref="IDataView"/>'s are lazy, so no actual loading happens here, just schema validation. 258public static IDataView LoadFromTextFile<TInput>(this DataOperationsCatalog catalog, string path, 268/// Save the <see cref="IDataView"/> as text. 286IDataView data,
DataLoadSave\Text\TextSaver.cs (4)
332public void SaveData(Stream stream, IDataView data, params int[] cols) 338public void SaveData(out string argsLoader, Stream stream, IDataView data, params int[] cols) 357public void WriteData(IDataView data, bool showCount, params int[] cols) 389private void WriteDataCore(IChannel ch, TextWriter writer, IDataView data,
DataLoadSave\TransformerChain.cs (6)
139public IDataView Transform(IDataView input) 145public IDataView Transform(IDataView input, TransformerScope scope) 156var dv = input; 290var chain = ModelFileUtils.LoadPipeline(env, stream, new MultiFileSource(null), extractInnerPipe: false);
DataLoadSave\TransformWrapper.cs (5)
21private readonly IDataView _xf; 23public TransformWrapper(IHostEnvironment env, IDataView xf) 45public IDataView Transform(IDataView input) => ApplyTransformUtils.ApplyTransformToData(_host, (IDataTransform)_xf, input); 74public abstract TransformWrapper Fit(IDataView input);
DataLoadSave\Transpose\TransposeLoader.cs (14)
136private IDataView _view; 177public IDataView GetViewOrNull() 190var view = Interlocked.CompareExchange(ref _view, loader, null); 207protected abstract void VerifyView(IDataView view); 218public IDataView GetView() 222var view = GetViewOrNull(); 235public SchemaSubIdv(TransposeLoader parent, IDataView view) 241protected override void VerifyView(IDataView view) 291protected override void VerifyView(IDataView view) 388var view = _schemaEntry.GetView(); 458private TransposeLoader(IHost host, ModelLoadContext ctx, IDataView schemaView) 613var view = _entries[col].GetViewOrNull(); 640var view = _entries[col].GetViewOrNull(); 730var view = _entries[col].GetViewOrNull();
DataLoadSave\Transpose\TransposeSaver.cs (3)
82public void SaveData(Stream stream, IDataView data, params int[] cols) 131Action<string, IDataView> viewAction = 144IDataView subdata = new ChooseColumnsByIndexTransform(_host,
DataLoadSave\TrivialEstimator.cs (2)
11/// the transformer and returns it on every call to <see cref="Fit(IDataView)"/>. 34public TTransformer Fit(IDataView input)
DataView\AppendRowsDataView.cs (7)
35private readonly IDataView[] _sources; 56public static IDataView Create(IHostEnvironment env, DataViewSchema schema, params IDataView[] sources) 68private AppendRowsDataView(IHostEnvironment env, DataViewSchema schema, IDataView[] sources) 86IDataView dv = _sources[i]; 132foreach (var source in _sources) 164protected readonly IDataView[] Sources;
DataView\ArrayDataViewBuilder.cs (1)
184public IDataView GetDataView(int? rowCount = null)
DataView\BatchDataViewMapperBase.cs (2)
18private readonly IDataView _source; 21protected BatchDataViewMapperBase(IHostEnvironment env, string registrationName, IDataView input)
DataView\CacheDataView.cs (4)
30private readonly IDataView _subsetInput; 79public CacheDataView(IHostEnvironment env, IDataView input, int[] prefetch) 112private static IDataView SelectCachableColumns(IDataView data, IHostEnvironment env, ref int[] prefetch, out int[] inputToSubset)
DataView\DataViewConstructionUtils.cs (4)
25public static IDataView CreateFromList<TRow>(IHostEnvironment env, IList<TRow> data, 121public static IDataView LoadPipeWithPredictor(IHostEnvironment env, Stream modelStream, IDataView view) 124var pipe = env.LoadTransforms(modelStream, view);
DataView\DataViewExtensions.cs (9)
20/// <param name="dv">The <see cref="IDataView"/> containing the <paramref name="columnsNeeded"/>.</param> 21public static DataViewRowCursor GetRowCursor(this IDataView dv, params DataViewSchema.Column[] columnsNeeded) 27$" is not present in the {nameof(IDataView)} where the {nameof(DataViewRowCursor)} is being requested."); 38/// <param name="dv">The <see cref="IDataView"/> containing the <paramref name="columnNeeded"/>.</param> 39public static DataViewRowCursor GetRowCursor(this IDataView dv, DataViewSchema.Column columnNeeded) 42$" is not present in the {nameof(IDataView)} where the {nameof(DataViewRowCursor)} is being requested."); 50public static DataViewRowCursor GetRowCursor(this IDataView dv) => dv.GetRowCursor(Enumerable.Empty<DataViewSchema.Column>()); 53/// Get a row cursor including all the columns of the <see cref="IDataView"/>. 55public static DataViewRowCursor GetRowCursorForAllColumns(this IDataView dv) => dv.GetRowCursor(dv.Schema);
DataView\LambdaColumnMapper.cs (7)
20public static IDataView Create<TSrc, TDst>(IHostEnvironment env, string name, IDataView input, 67IDataView impl; 72Func<IHostEnvironment, string, IDataView, Column, DataViewType, ValueMapper<int, int>, 77impl = (IDataView)meth.Invoke(null, new object[] { env, name, input, col, typeDst, conv, mapper, keyValueGetter, slotNamesGetter }); 84IHostEnvironment env, string name, IDataView input, Column col, 106public Impl(IHostEnvironment env, string name, IDataView input, OneToOneColumn col,
DataView\LambdaFilter.cs (7)
20public static IDataView Create<TSrc>(IHostEnvironment env, string name, IDataView input, 57IDataView impl; 62Func<IHostEnvironment, string, IDataView, int, 66impl = (IDataView)meth.Invoke(null, new object[] { env, name, input, colSrc, predicate, conv }); 73IHostEnvironment env, string name, IDataView input, int colSrc, 85public Impl(IHostEnvironment env, string name, IDataView input,
DataView\OpaqueDataView.cs (2)
17private readonly IDataView _source; 21public OpaqueDataView(IDataView source)
DataView\RowToRowMapperTransform.cs (4)
95public RowToRowMapperTransform(IHostEnvironment env, IDataView input, IRowMapper mapper, Func<DataViewSchema, IRowMapper> mapperFactory) 111private RowToRowMapperTransform(IHost host, ModelLoadContext ctx, IDataView input) 121public static RowToRowMapperTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 269IDataTransform ITransformTemplate.ApplyToData(IHostEnvironment env, IDataView newSource)
DataView\Transposer.cs (21)
18/// <see cref="IDataView"/>. Instances of <see cref="Transposer"/> act like a wrapped version of 31private readonly IDataView _view; 54public static Transposer Create(IHostEnvironment env, IDataView view, bool forceSave, 74public static Transposer Create(IHostEnvironment env, IDataView view, bool forceSave, 85private Transposer(IHost host, IDataView view, bool forceSave, int[] columns) 203private static int[] CheckNamesAndGetIndices(IHost host, IDataView view, string[] columns) 219private static int[] CheckIndices(IHost host, IDataView view, int[] columns) 336private readonly IDataView _view; 424private readonly IDataView _view; 720private readonly IDataView _input; 739public DataViewSlicer(IHost host, IDataView input, int[] toSlice) 890/// of one column from a <see cref="IDataView"/> into multiple columns. The instance 896private static readonly FuncStaticMethodInfo1<IDataView, int, Splitter> _createCoreMethodInfo 897= new FuncStaticMethodInfo1<IDataView, int, Splitter>(CreateCore<int>); 899private readonly IDataView _view; 911protected Splitter(IDataView view, int col) 922public static Splitter Create(IDataView view, int col) 964private static Splitter CreateCore<T>(IDataView view, int col) 969private static Splitter CreateCore<T>(IDataView view, int col, int[] ends) 1008public NoSplitter(IDataView view, int col) 1091public ColumnSplitter(IDataView view, int col, int[] lims)
DataView\TypedCursor.cs (9)
31/// This interface provides cursoring through a <see cref="IDataView"/> via a 'strongly typed' binding. 43/// This interface allows to create strongly typed cursors over a <see cref="IDataView"/>. 74private readonly IDataView _data; 90private TypedCursorable(IHostEnvironment env, IDataView data, bool ignoreMissingColumns, InternalSchemaDefinition schemaDefn) 220private static void ValidateMemberInfo(MemberInfo memberInfo, IDataView data) 258private static void ValidateUserType(SchemaDefinition schemaDefinition, Type userType, IDataView data) 312public static TypedCursorable<TRow> Create(IHostEnvironment env, IDataView data, bool ignoreMissingColumns, SchemaDefinition schemaDefinition) 655/// Generate a strongly-typed cursorable wrapper of the <see cref="IDataView"/>. 663public static ICursorable<TRow> AsCursorable<TRow>(this IHostEnvironment env, IDataView data, bool ignoreMissingColumns = false,
DataView\ZipDataView.cs (6)
29private readonly IDataView[] _sources; 32public static IDataView Create(IHostEnvironment env, IEnumerable<IDataView> sources) 45private ZipDataView(IHost host, IDataView[] sources) 62foreach (var source in _sources) 97private DataViewRowCursor GetMinimumCursor(IDataView dv)
DebuggerExtensions.cs (3)
22public static DataDebuggerPreview Preview(this IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows) 31public static DataDebuggerPreview Preview(this ITransformer transformer, IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows) 41public static DataDebuggerPreview Preview(this IEstimator<ITransformer> estimator, IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows,
Dirty\ChooseColumnsByIndexTransform.cs (3)
197public ChooseColumnsByIndexTransform(IHostEnvironment env, Options options, IDataView input) 205private ChooseColumnsByIndexTransform(IHost host, ModelLoadContext ctx, IDataView input) 215public static ChooseColumnsByIndexTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Dirty\PredictorInterfaces.cs (1)
127IDataView GetSummaryDataView(RoleMappedSchema schema);
EntryPoints\CommonOutputs.cs (12)
23public IDataView OutputData; 34Var<IDataView> OutputData { get; } 216public IDataView Warnings; 219public IDataView OverallMetrics; 222public IDataView PerInstanceMetrics; 232public IDataView ConfusionMatrix; 247Var<IDataView> Warnings { get; } 248Var<IDataView> OverallMetrics { get; } 249Var<IDataView> PerInstanceMetrics { get; } 257Var<IDataView> ConfusionMatrix { get; } 263public IDataView Summary; 266public IDataView Stats;
EntryPoints\EntryPointNode.cs (3)
79type == typeof(IDataView) || 742newName = new Var<IDataView>().VarName; 753newName = new Var<IDataView>().VarName;
EntryPoints\InputBase.cs (6)
32public IDataView Data; 82IDataView view = input.TrainingData; 91IDataView outputData = null; 136Var<IDataView> Data { get; set; } 152Var<IDataView> TrainingData { get; set; } 202Var<IDataView> Data { get; }
EntryPoints\PredictorModelImpl.cs (3)
30internal PredictorModelImpl(IHostEnvironment env, RoleMappedData trainingData, IDataView startingData, IPredictor predictor) 82IDataView data = new EmptyDataView(env, TransformModel.InputSchema); 99internal override void PrepareData(IHostEnvironment env, IDataView input, out RoleMappedData roleMappedData, out IPredictor predictor)
EntryPoints\SchemaManipulation.cs (1)
37var xf = new ColumnSelectingTransformer(env, input.KeepColumns, input.DropColumns, input.KeepHidden, input.IgnoreMissing).Transform(input.Data);
EntryPoints\SummarizePredictor.cs (3)
49internal static IDataView GetSummaryAndStats(IHostEnvironment env, IPredictor predictor, RoleMappedSchema schema, out IDataView stats) 58IDataView summary = null;
EntryPoints\TransformModelImpl.cs (15)
29/// This contains the transforms to save instantiated on an <see cref="IDataView"/> with 31/// an empty <see cref="IDataView"/> or a <see cref="BinaryLoader"/> with no rows. However, other root 36private readonly IDataView _chain; 41/// If an <see cref="IDataView"/> exists with this schema, then applying this transform model to it 60public TransformModelImpl(IHostEnvironment env, IDataView result, IDataView input) 71private TransformModelImpl(IHostEnvironment env, DataViewSchema schemaRoot, IDataView chain) 90IDataView view = new EmptyDataView(env, schemaRoot); 120for (IDataView view = _chain; ;) 136internal override IDataView Apply(IHostEnvironment env, IDataView input) 151IDataView view; 195private readonly IDataView _chain; 203public CompositeRowToRowMapper(IExceptionContext ectx, IDataView chain, DataViewSchema rootSchema) 214public static bool IsCompositeRowToRowMapper(IDataView chain)
Evaluators\AnomalyDetectionEvaluator.cs (12)
129out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 204var result = new Dictionary<string, IDataView>(); 588internal AnomalyDetectionMetrics Evaluate(IDataView data, string label = DefaultColumnNames.Label, string score = DefaultColumnNames.Score, 603var overall = resultDict[MetricKinds.OverallMetrics]; 664private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 666IDataView top; 711IDataView overall; 773IDataView fold = ColumnSelectingTransformer.CreateKeep(Host, overall, colsToKeep.ToArray()); 779private protected override IDataView GetOverallResultsCore(IDataView overall) 829var warnings = ExtractWarnings(host, metrics); 830var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator);
Evaluators\BinaryClassifierEvaluator.cs (42)
218out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 369var result = new Dictionary<string, IDataView>(); 810public CalibratedBinaryClassificationMetrics Evaluate(IDataView data, string label, string score, string probability, string predictedLabel) 826var overall = resultDict[MetricKinds.OverallMetrics]; 827var confusionMatrix = resultDict[MetricKinds.ConfusionMatrix]; 853IDataView data, 874var prCurveView = resultDict[MetricKinds.PrCurve]; 876var overall = resultDict[MetricKinds.OverallMetrics]; 893var confusionMatrix = resultDict[MetricKinds.ConfusionMatrix]; 908private void GetPrecisionRecallDataPointGetters(IDataView prCurveView, 938/// <seealso cref="Evaluate(IDataView, string, string, string)"/> 939public BinaryClassificationMetrics Evaluate(IDataView data, string label, string score, string predictedLabel) 953var overall = resultDict[MetricKinds.OverallMetrics]; 954var confusionMatrix = resultDict[MetricKinds.ConfusionMatrix]; 979/// <seealso cref="Evaluate(IDataView, string, string, string)"/> 981IDataView data, 999var prCurveView = resultDict[MetricKinds.PrCurve]; 1001var overall = resultDict[MetricKinds.OverallMetrics]; 1002var confusionMatrix = resultDict[MetricKinds.ConfusionMatrix]; 1355private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 1359IDataView fold; 1363IDataView conf; 1408private protected override IDataView GetOverallResultsCore(IDataView overall) 1413private protected override void PrintAdditionalMetricsCore(IChannel ch, Dictionary<string, IDataView>[] metrics) 1419IDataView pr; 1449private bool TryGetPrMetrics(Dictionary<string, IDataView>[] metrics, out IDataView pr) 1453var prList = new List<IDataView>(); 1457IDataView idv; 1518var warnings = ExtractWarnings(host, metrics); 1519var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator); 1521var confusionMatrix = ExtractConfusionMatrix(host, metrics); 1546private static IDataView ExtractWarnings(IHost host, Dictionary<string, IDataView> metrics) 1548IDataView warnings; 1559private static IDataView ExtractOverallMetrics(IHost host, Dictionary<string, IDataView> metrics, IMamlEvaluator evaluator) 1561IDataView overallMetrics; 1574private static IDataView ExtractConfusionMatrix(IHost host, Dictionary<string, IDataView> metrics) 1576IDataView confusionMatrix;
Evaluators\ClusteringEvaluator.cs (8)
65public ClusteringMetrics Evaluate(IDataView data, string score, string label = null, string features = null) 83var overall = resultDict[MetricKinds.OverallMetrics]; 160out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 214var result = new Dictionary<string, IDataView> 835private protected override IDataView GetPerInstanceMetricsCore(IDataView perInst, RoleMappedSchema schema) 874var warnings = ExtractWarnings(host, metrics); 875var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator);
Evaluators\EvaluatorBase.cs (6)
31Dictionary<string, IDataView> IEvaluator.Evaluate(RoleMappedData data) 130private Dictionary<string, IDataView> ProcessData(IDataView data, RoleMappedSchema schema, 178Func<Dictionary<string, IDataView>> consolidate; 203out Action<uint, ReadOnlyMemory<char>, TAgg> addAgg, out Func<Dictionary<string, IDataView>> consolidate); 304public void GetWarnings(Dictionary<string, IDataView> dict, IHostEnvironment env)
Evaluators\EvaluatorUtils.cs (56)
254public static IEnumerable<KeyValuePair<string, double>> GetMetrics(IDataView metricsView, bool getVectorMetrics = true) 375private static IDataView AddTextColumn<TSrc>(IHostEnvironment env, IDataView input, string inputColName, string outputColName, 390public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int curFold) 409private static IDataView AddKeyColumn<TSrc>(IHostEnvironment env, IDataView input, string inputColName, string outputColName, 431public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int curFold, int numFolds) 459public static void ReconcileSlotNames<T>(IHostEnvironment env, IDataView[] views, string columnName, PrimitiveDataViewType itemType, T def = default(T)) 473var idv = views[i]; 602public static void ReconcileKeyValues(IHostEnvironment env, IDataView[] views, string columnName, DataViewType keyValueType) 643public static void ReconcileKeyValuesWithNoNames(IHostEnvironment env, IDataView[] views, string columnName, ulong keyCount) 672public static void ReconcileVectorKeyValues(IHostEnvironment env, IDataView[] views, string columnName, DataViewType keyValueType) 752public static IDataView[] ConcatenatePerInstanceDataViews(IHostEnvironment env, IMamlEvaluator eval, bool collate, bool outputFoldIndex, RoleMappedData[] perInstance, out string[] variableSizeVectorColumnNames) 758Func<RoleMappedData, int, IDataView> getPerInstance = 761var perInst = eval.GetPerInstanceDataViewToSave(rmd); 774var combined = AppendPerInstanceDataViews(env, perInstance[0].Schema.Label?.Name, foldDataViews, out variableSizeVectorColumnNames); 787public static IDataView ConcatenateOverallMetrics(IHostEnvironment env, IDataView[] metrics) 795var overallList = new List<IDataView>(); 799var idv = AddFoldIndex(env, metrics[i], i); 805private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string labelColName, 806IEnumerable<IDataView> foldDataViews, out string[] variableSizeVectorColumnNames) 820var list = new List<IDataView>(); 822foreach (var dv in foldDataViews) 880var idv = dv; 903Func<IDataView, int, IDataView> keyToValue = 923Func<IDataView, IDataView> selectDropNonVarLenthCol = 954private static bool VerifyVectorColumnsMatch(int cachedSize, int col, IDataView dv, 984private static IDataView AddVarLengthColumn<TSrc>(IHostEnvironment env, IDataView idv, string variableSizeVectorColumnName, VectorDataViewType typeSrc) 1051internal static IDataView GetOverallMetricsData(IHostEnvironment env, IDataView data, int numFolds, out AggregatedMetric[] agg, 1057var avgMetrics = GetAverageToDataView(env, data.Schema, agg, weightedAgg, numFolds, stratCol, stratVal, 1060var idvList = new List<IDataView>() { avgMetrics }; 1072var overall = AppendRowsDataView.Create(env, avgMetrics.Schema, idvList.ToArray()); 1081internal static AggregatedMetric[] ComputeMetricsSum(IHostEnvironment env, IDataView data, int numFolds, out int isWeightedCol, 1214internal static IDataView GetAverageToDataView(IHostEnvironment env, DataViewSchema schema, AggregatedMetric[] agg, AggregatedMetric[] weightedAgg, 1289var idv = dvBldr.GetDataView(); 1338public static IDataView CombineFoldMetricsDataViews(IHostEnvironment env, IDataView data, int numFolds) 1357public static string GetConfusionTableAsFormattedString(IHost host, IDataView confusionDataView, out string weightedConfusionTable, bool binary = true, int sample = -1) 1380public static ConfusionMatrix GetConfusionMatrix(IHost host, IDataView confusionDataView, bool binary = true, int sample = -1, bool getWeighted = false) 1464private static double[][] GetConfusionTableAsArray(IDataView confusionDataView, int countIndex, int numClasses, 1536public static string GetPerFoldResults(IHostEnvironment env, IDataView fold, out string weightedMetrics) 1569private static string GetFoldMetricsAsString(IHostEnvironment env, IDataView data, out string weightedMetricsString) 1694public static void PrintOverallMetrics(IHostEnvironment env, IChannel ch, string filename, IDataView overall, int numFolds) 1696var overallWithAvg = EvaluateUtils.GetOverallMetricsData(env, overall, numFolds, out var agg, out var weightedAgg); 1731public static void PrintWarnings(IChannel ch, Dictionary<string, IDataView> metrics) 1733IDataView warnings; 1756public static void SavePerInstance(IHostEnvironment env, IChannel ch, string filename, IDataView data, 1770public static IDataView GetNonStratifiedMetrics(IHostEnvironment env, IDataView data)
Evaluators\MamlEvaluator.cs (23)
27void PrintFoldResults(IChannel ch, Dictionary<string, IDataView> metrics); 34IDataView GetOverallResults(params IDataView[] metrics); 41void PrintAdditionalMetrics(IChannel ch, params Dictionary<string, IDataView>[] metrics); 46IDataView GetPerInstanceDataViewToSave(RoleMappedData perInstance); 107Dictionary<string, IDataView> IEvaluator.Evaluate(RoleMappedData data) 155void IMamlEvaluator.PrintFoldResults(IChannel ch, Dictionary<string, IDataView> metrics) 167private protected virtual void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 172IDataView fold; 183IDataView IMamlEvaluator.GetOverallResults(params IDataView[] metrics) 186var overall = CombineOverallMetricsCore(metrics); 191private protected virtual IDataView CombineOverallMetricsCore(IDataView[] metrics) 197private protected virtual IDataView GetOverallResultsCore(IDataView overall) 202void IMamlEvaluator.PrintAdditionalMetrics(IChannel ch, params Dictionary<string, IDataView>[] metrics) 214private protected virtual void PrintAdditionalMetricsCore(IChannel ch, Dictionary<string, IDataView>[] metrics) 227private IDataView WrapPerInstance(RoleMappedData perInst) 229var idv = perInst.Data; 276private protected virtual IDataView GetPerInstanceMetricsCore(IDataView perInst, RoleMappedSchema schema) 281IDataView IMamlEvaluator.GetPerInstanceDataViewToSave(RoleMappedData perInstance)
Evaluators\Metrics\BinaryClassificationMetrics.cs (1)
98internal BinaryClassificationMetrics(IHost host, DataViewRow overallResult, IDataView confusionMatrix)
Evaluators\Metrics\CalibratedBinaryClassificationMetrics.cs (1)
64internal CalibratedBinaryClassificationMetrics(IHost host, DataViewRow overallResult, IDataView confusionMatrix)
Evaluators\Metrics\ConfusionMatrix.cs (1)
54/// The confusion matrix as a structured type, built from the counts of the confusion table <see cref="IDataView"/> that the <see cref="BinaryClassifierEvaluator"/> or
Evaluators\Metrics\MulticlassClassificationMetrics.cs (1)
118internal MulticlassClassificationMetrics(IHost host, DataViewRow overallResult, int topKPredictionCount, IDataView confusionMatrix)
Evaluators\MulticlassClassificationEvaluator.cs (24)
141out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 246var result = new Dictionary<string, IDataView> 550public MulticlassClassificationMetrics Evaluate(IDataView data, string label, string score, string predictedLabel) 564var overall = resultDict[MetricKinds.OverallMetrics]; 565var confusionMatrix = resultDict[MetricKinds.ConfusionMatrix]; 919private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 923if (!metrics.TryGetValue(MetricKinds.OverallMetrics, out IDataView fold)) 926if (!metrics.TryGetValue(MetricKinds.ConfusionMatrix, out IDataView conf)) 952private protected override IDataView CombineOverallMetricsCore(IDataView[] metrics) 954var overallList = new List<IDataView>(); 958var idv = metrics[i]; 980var idv = views[i]; 999private IDataView ChangeTopKAccColumnName(IDataView input) 1005private IDataView ChangeAllTopKAccColumnName(IDataView input) 1011private IDataView DropColumn(IDataView input, string columnToDrop) 1052private protected override IDataView GetPerInstanceMetricsCore(IDataView perInst, RoleMappedSchema schema) 1103var warnings = ExtractWarnings(host, metrics); 1104var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator); 1106var confusionMatrix = ExtractConfusionMatrix(host, metrics);
Evaluators\MultiOutputRegressionEvaluator.cs (6)
96out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 160var result = new Dictionary<string, IDataView>(); 662private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 664IDataView fold; 789var warnings = ExtractWarnings(host, metrics); 790var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator);
Evaluators\QuantileRegressionEvaluator.cs (9)
488private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 492IDataView fold; 506private protected override IDataView GetOverallResultsCore(IDataView overall) 511private IDataView ExtractRelevantIndex(IDataView data) 513IDataView output = data; 574var warnings = ExtractWarnings(host, metrics); 575var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator);
Evaluators\RankingEvaluator.cs (19)
159out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 238var result = new Dictionary<string, IDataView>(); 254public RankingMetrics Evaluate(IDataView data, string label, string groupId, string score) 266var overall = resultDict[MetricKinds.OverallMetrics]; 574public IDataView Source { get { return _transform.Source; } } 582DataViewSchema IDataView.Schema => OutputSchema; 589public RankingPerInstanceTransform(IHostEnvironment env, IDataView input, string labelCol, string scoreCol, string groupCol, 595private RankingPerInstanceTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 600public static RankingPerInstanceTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 701public Transform(IHostEnvironment env, IDataView input, string labelCol, string scoreCol, string groupCol, 715public Transform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 900private protected override void PrintAdditionalMetricsCore(IChannel ch, Dictionary<string, IDataView>[] metrics) 906IDataView gs; 918private bool TryGetGroupSummaryMetrics(Dictionary<string, IDataView>[] metrics, out IDataView gs) 926var gsList = new List<IDataView>(); 929IDataView idv; 1100var warnings = ExtractWarnings(host, metrics); 1101var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator);
Evaluators\RegressionEvaluator.cs (4)
174public RegressionMetrics Evaluate(IDataView data, string label, string score) 185var overall = resultDict[MetricKinds.OverallMetrics]; 401var warnings = ExtractWarnings(host, metrics); 402var overallMetrics = ExtractOverallMetrics(host, metrics, evaluator);
Evaluators\RegressionEvaluatorBase.cs (2)
51out Action<uint, ReadOnlyMemory<char>, TAgg> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 108var result = new Dictionary<string, IDataView>();
Model\Onnx\OnnxContext.cs (4)
63/// cref="IDataView"/> column associated with it. 66/// cref="IDataView"/> column name</param> 78/// <see cref="IDataView"/>'s column names will map to a variable in the ONNX graph if the intermediate steps 80/// to the <see cref="IDataView"/> column name at a given point in the pipeline execution. Callers should
Model\Pfa\BoundPfaContext.cs (4)
17/// that enables its inclusion relative to the <see cref="IDataView"/> ecosystem. 21/// has facilities to remember what column name in <see cref="IDataView"/> maps to 269/// Given an <see cref="IDataView"/> column name, return the string for referencing the corresponding 282/// Given an <see cref="IDataView"/> column name, return whether in the PFA being built up
Model\Pfa\SavePfaCommand.cs (5)
101private void GetPipe(IChannel ch, IDataView end, out IDataView source, out IDataView trueEnd, out LinkedList<ITransformCanSavePfa> transforms) 139IDataView source; 140IDataView end;
Prediction\Calibrator.cs (2)
138IPredictor Calibrate(IChannel ch, IDataView data, ICalibratorTrainer caliTrainer, int maxRows); 940public static ICalibrator TrainCalibrator(IHostEnvironment env, IChannel ch, ICalibratorTrainer caliTrainer, IDataView scored, string labelColumn, string scoreColumn, string weightColumn = null, int maxRows = _maxCalibrationExamples)
Prediction\CalibratorCatalog.cs (5)
40/// CalibratorEstimators take an <see cref="IDataView"/> (the output of a <see cref="BinaryClassifierScorer"/>) 79/// Gets the output <see cref="SchemaShape"/> of the <see cref="IDataView"/> after fitting the calibrator. 134/// Fits the scored <see cref="IDataView"/> creating a <see cref="CalibratorTransformer{TICalibrator}"/> that can transform the data by adding a 140public CalibratorTransformer<TICalibrator> Fit(IDataView input) 158/// An instance of this class is the result of calling <see cref="CalibratorEstimatorBase{TICalibrator}.Fit(IDataView)"/>.
Prediction\IPredictionTransformer.cs (4)
25/// to score the data of an input <see cref="IDataView"/> through the <see cref="ITransformer.Transform(IDataView)"/> 40/// Implementations of this interface, have the ability to score the data of an input <see cref="IDataView"/> 41/// through the <see cref="ITransformer.Transform(IDataView)"/>
Prediction\PredictionEngine.cs (1)
22internal PipeEngine(IHostEnvironment env, IDataView pipe, bool ignoreMissingColumns, SchemaDefinition schemaDefinition = null)
Scorers\BinaryClassifierScorer.cs (5)
126internal BinaryClassifierScorer(IHostEnvironment env, Arguments args, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema) 137private BinaryClassifierScorer(IHostEnvironment env, BinaryClassifierScorer transform, IDataView newSource) 143private BinaryClassifierScorer(IHost host, ModelLoadContext ctx, IDataView input) 158public static BinaryClassifierScorer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 224private protected override IDataTransform ApplyToDataCore(IHostEnvironment env, IDataView newSource)
Scorers\ClusteringScorer.cs (5)
45internal ClusteringScorer(IHostEnvironment env, Arguments args, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema) 51private ClusteringScorer(IHostEnvironment env, ClusteringScorer transform, IDataView newSource) 56private ClusteringScorer(IHost host, ModelLoadContext ctx, IDataView input) 63public static ClusteringScorer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 85private protected override IDataTransform ApplyToDataCore(IHostEnvironment env, IDataView newSource)
Scorers\FeatureContributionCalculation.cs (1)
56private static IDataScorerTransform Create(IHostEnvironment env, Arguments args, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema)
Scorers\GenericScorer.cs (5)
153internal GenericScorer(IHostEnvironment env, ScorerArgumentsBase args, IDataView data, 170private GenericScorer(IHostEnvironment env, GenericScorer transform, IDataView data) 180private GenericScorer(IHost host, ModelLoadContext ctx, IDataView input) 191public static GenericScorer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 257private protected override IDataTransform ApplyToDataCore(IHostEnvironment env, IDataView newSource)
Scorers\MulticlassClassificationScorer.cs (5)
512internal MulticlassClassificationScorer(IHostEnvironment env, Arguments args, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema) 518private MulticlassClassificationScorer(IHostEnvironment env, MulticlassClassificationScorer transform, IDataView newSource) 523private MulticlassClassificationScorer(IHost host, ModelLoadContext ctx, IDataView input) 533private static MulticlassClassificationScorer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 554private protected override IDataTransform ApplyToDataCore(IHostEnvironment env, IDataView newSource)
Scorers\PredictedLabelScorerBase.cs (3)
276private protected PredictedLabelScorerBase(ScorerArgumentsBase args, IHostEnvironment env, IDataView data, 303IDataView newSource, string registrationName) 311private protected PredictedLabelScorerBase(IHost host, ModelLoadContext ctx, IDataView input,
Scorers\PredictionTransformer.cs (4)
135/// Gets the output schema resulting from the <see cref="Transform(IDataView)"/> 145/// <returns>The transformed <see cref="IDataView"/></returns> 146public IDataView Transform(IDataView input)
Scorers\QuantileRegressionScorer.cs (1)
32private static IDataScorerTransform Create(IHostEnvironment env, Arguments args, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema)
Scorers\RowToRowScorerBase.cs (6)
41private protected RowToRowScorerBase(IHostEnvironment env, IDataView input, string registrationName, ISchemaBindableMapper bindable) 49private protected RowToRowScorerBase(IHost host, ModelLoadContext ctx, IDataView input) 69private protected abstract IDataTransform ApplyToDataCore(IHostEnvironment env, IDataView newSource); 71IDataTransform ITransformTemplate.ApplyToData(IHostEnvironment env, IDataView newSource) 73internal IDataView ApplyToData(IHostEnvironment env, IDataView newSource)
TrainCatalog.cs (20)
39public readonly IDataView Scores; 45public CrossValidationResult(ITransformer model, IDataView scores, int fold) 69public readonly IDataView ScoredHoldOutSet; 75internal CrossValidationResult(ITransformer model, T metrics, IDataView scores, int fold) 89private protected CrossValidationResult[] CrossValidateTrain(IDataView data, IEstimator<ITransformer> estimator, 106IDataView scoredTest; 202public CalibratedBinaryClassificationMetrics Evaluate(IDataView data, string labelColumnName = DefaultColumnNames.Label, string scoreColumnName = DefaultColumnNames.Score, 223public BinaryClassificationMetrics EvaluateNonCalibrated(IDataView data, string labelColumnName = DefaultColumnNames.Label, string scoreColumnName = DefaultColumnNames.Score, 250IDataView data, IEstimator<ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label, 275IDataView data, IEstimator<ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label, 441public ClusteringMetrics Evaluate(IDataView data, 474IDataView data, IEstimator<ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = null, string featuresColumnName = null, 522public MulticlassClassificationMetrics Evaluate(IDataView data, string labelColumnName = DefaultColumnNames.Label, string scoreColumnName = DefaultColumnNames.Score, 554IDataView data, IEstimator<ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label, 599public RegressionMetrics Evaluate(IDataView data, string labelColumnName = DefaultColumnNames.Label, string scoreColumnName = DefaultColumnNames.Score) 624IDataView data, IEstimator<ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label, 670public RankingMetrics Evaluate(IDataView data, 684public RankingMetrics Evaluate(IDataView data, 715IDataView data, IEstimator<ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label, 762public AnomalyDetectionMetrics Evaluate(IDataView data, string labelColumnName = DefaultColumnNames.Label, string scoreColumnName = DefaultColumnNames.Score,
Training\TrainerEstimatorBase.cs (5)
77public TTransformer Fit(IDataView input) => TrainTransformer(input); 144private protected TTransformer TrainTransformer(IDataView trainSet, 145IDataView validationSet = null, IPredictor initPredictor = null) 165private protected virtual RoleMappedData MakeRoles(IDataView data) => 197private protected override RoleMappedData MakeRoles(IDataView data) =>
Training\TrainerInputBase.cs (3)
22/// that the user will use the <see cref="IEstimator{TTransformer}.Fit(IDataView)"/> or some other train 27internal IDataView TrainingData; 44/// is that the user will use the <see cref="DataOperationsCatalog.Cache(IDataView, string[])"/> or other method
Training\TrainerUtils.cs (2)
617/// The typed analog to <see cref="IDataView.GetRowCursor(IEnumerable{DataViewSchema.Column},Random)"/>. 634/// The typed analog to <see cref="IDataView.GetRowCursorSet"/>, this provides a
Transforms\BootstrapSamplingTransformer.cs (5)
78public BootstrapSamplingTransformer(IHostEnvironment env, Options options, IDataView input) 94/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 100IDataView input, 109private BootstrapSamplingTransformer(IHost host, ModelLoadContext ctx, IDataView input) 153public static BootstrapSamplingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\ColumnConcatenatingEstimator.cs (1)
69public ColumnConcatenatingTransformer Fit(IDataView input)
Transforms\ColumnConcatenatingTransformer.cs (3)
369internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 389internal static IDataTransform Create(IHostEnvironment env, TaggedOptions options, IDataView input) 411private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\ColumnCopying.cs (2)
147internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 180private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\ColumnSelecting.cs (20)
20[assembly: LoadableClass(ColumnSelectingTransformer.Summary, typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), 27[assembly: LoadableClass("", typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), 31[assembly: LoadableClass("", typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), 37/// Keeps or drops selected columns from an <see cref="IDataView"/>. 265private static ColumnSelectingTransformer LoadDropColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 329private static ColumnSelectingTransformer LoadChooseColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 402private static IDataView Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 426internal static IDataView CreateKeep(IHostEnvironment env, IDataView input, string[] keepColumns, bool keepHidden = false) 430internal static IDataView CreateDrop(IHostEnvironment env, IDataView input, params string[] dropColumns) 434private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 507/// Note that <see cref="IDataView"/>'s are lazy, so no actual transformations happen here, just schema validation. 509public IDataView Transform(IDataView input) 659public SelectColumnsDataTransform(IHostEnvironment env, ColumnSelectingTransformer transform, Mapper mapper, IDataView input) 669public IDataView Source { get; } 673DataViewSchema IDataView.Schema => OutputSchema; 728IDataTransform ITransformTemplate.ApplyToData(IHostEnvironment env, IDataView newSource)
Transforms\ConversionsExtensionsCatalog.cs (16)
126/// <see cref="MapValueToKey(TransformsCatalog.ConversionTransforms, InputOutputColumnPair[], int, ValueToKeyMappingEstimator.KeyOrdinality, bool, IDataView)"/></remarks> 147/// <see cref="MapValueToKey(TransformsCatalog.ConversionTransforms, InputOutputColumnPair[], int, ValueToKeyMappingEstimator.KeyOrdinality, bool, IDataView)"/></remarks> 238/// the mapping from the input data during training. If specified, this should be a single column <see cref="IDataView"/> containing the values. 253IDataView keyData = null) 273/// the mapping from the input data during training. If specified, this should be a single column <see cref="IDataView"/> containing the values. 287IDataView keyData = null) 308ValueToKeyMappingEstimator.ColumnOptions[] columns, IDataView keyData = null) 342var lookupMap = DataViewHelper.CreateDataView(catalog.GetEnvironment(), keys, values, 374var lookupMap = DataViewHelper.CreateDataView(catalog.GetEnvironment(), keys, values, 408var lookupMap = DataViewHelper.CreateDataView(catalog.GetEnvironment(), keys, values, 447var lookupMap = DataViewHelper.CreateDataView(catalog.GetEnvironment(), keys, values, 478var lookupMap = DataViewHelper.CreateDataView(catalog.GetEnvironment(), keys, values, 496/// <param name="lookupMap">An instance of <see cref="IDataView"/> that contains the <paramref name="keyColumn"/> and <paramref name="valueColumn"/> columns.</param> 510string outputColumnName, IDataView lookupMap, DataViewSchema.Column keyColumn, DataViewSchema.Column valueColumn, string inputColumnName = null) 523/// <param name="lookupMap">An instance of <see cref="IDataView"/> that contains the <paramref name="keyColumn"/> and <paramref name="valueColumn"/> columns.</param> 530IDataView lookupMap, DataViewSchema.Column keyColumn, DataViewSchema.Column valueColumn, params InputOutputColumnPair[] columns)
Transforms\ExtensionsCatalog.cs (3)
119/// Create a <see cref="ColumnSelectingEstimator"/>, which drops a given list of columns from an <see cref="IDataView"/>. Any column not specified will 136/// Create a <see cref="ColumnSelectingEstimator"/>, which keeps a given list of columns in an <see cref="IDataView"/> and drops the others. 157/// Create a <see cref="ColumnSelectingEstimator"/>, which keeps a given list of columns in an <see cref="IDataView"/> and drops the others.
Transforms\FeatureContributionCalculationTransformer.cs (1)
378var outData = new FeatureContributionCalculatingTransformer(host, predictor, options.FeatureColumn, options.Top, options.Bottom, options.Normalize).Transform(options.Data);
Transforms\GenerateNumberTransform.cs (5)
266/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 270public GenerateNumberTransform(IHostEnvironment env, IDataView input, string name, uint? seed = null, bool useCounter = Defaults.UseCounter) 278public GenerateNumberTransform(IHostEnvironment env, Options options, IDataView input) 287private GenerateNumberTransform(IHost host, ModelLoadContext ctx, IDataView input) 300public static GenerateNumberTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\Hashing.cs (4)
192internal HashingTransformer(IHostEnvironment env, IDataView input, params HashingEstimator.ColumnOptions[] columns) : 319private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 327private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 1947public HashingTransformer Fit(IDataView input) => new HashingTransformer(_host, input, _columns);
Transforms\KeyToValue.cs (2)
102internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 133private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\KeyToVector.cs (2)
193private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 214private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\LabelConvertTransform.cs (5)
74/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 77public LabelConvertTransform(IHostEnvironment env, IDataView input, string outputColumnName, string inputColumnName = null) 82public LabelConvertTransform(IHostEnvironment env, Arguments args, IDataView input) 90private LabelConvertTransform(IHost host, ModelLoadContext ctx, IDataView input) 102public static LabelConvertTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\LabelIndicatorTransform.cs (6)
79ModelLoadContext ctx, IDataView input) 90Options options, IDataView input) 120/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 125IDataView input, 133internal LabelIndicatorTransform(IHostEnvironment env, Options options, IDataView input) 147private LabelIndicatorTransform(IHost host, ModelLoadContext ctx, IDataView input)
Transforms\NAFilter.cs (5)
85/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 88public NAFilter(IHostEnvironment env, IDataView input, bool complement = Defaults.Complement, params string[] columns) 93public NAFilter(IHostEnvironment env, Arguments args, IDataView input) 123public NAFilter(IHost host, ModelLoadContext ctx, IDataView input) 159public static NAFilter Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\NopTransform.cs (6)
28public IDataView Source { get; } 36public static IDataTransform CreateIfNeeded(IHostEnvironment env, IDataView input) 44private NopTransform(IHostEnvironment env, IDataView input) 70public static NopTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 80private NopTransform(IHost host, ModelLoadContext ctx, IDataView input) 108DataViewSchema IDataView.Schema => OutputSchema;
Transforms\NormalizeColumn.cs (8)
293/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 296public static IDataView CreateMinMaxNormalizer(IHostEnvironment env, IDataView input, string outputColumnName, string inputColumnName = null) 307internal static IDataTransform Create(IHostEnvironment env, MinMaxArguments args, IDataView input) 325internal static IDataTransform Create(IHostEnvironment env, MeanVarArguments args, IDataView input) 345internal static IDataTransform Create(IHostEnvironment env, LogMeanVarArguments args, IDataView input) 365internal static IDataTransform Create(IHostEnvironment env, BinArguments args, IDataView input) 386internal static IDataTransform Create(IHostEnvironment env, RobustScalingArguments args, IDataView input)
Transforms\Normalizer.cs (5)
334public NormalizingTransformer Fit(IDataView input) 531internal static NormalizingTransformer Train(IHostEnvironment env, IDataView data, NormalizingEstimator.ColumnOptionsBase[] columns) 635private NormalizingTransformer(IHost host, ModelLoadContext ctx, IDataView input) 664private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 715internal new IDataTransform MakeDataTransform(IDataView input)
Transforms\PerGroupTransformBase.cs (4)
94DataViewSchema IDataView.Schema => OutputSchema; 98public IDataView Source { get; } 102protected PerGroupTransformBase(IHostEnvironment env, IDataView input, string labelCol, string scoreCol, string groupCol, string registrationName) 117protected PerGroupTransformBase(IHostEnvironment env, ModelLoadContext ctx, IDataView input, string registrationName)
Transforms\RangeFilter.cs (5)
85/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 90public RangeFilter(IHostEnvironment env, IDataView input, string column, Double lowerBound, Double upperBound, bool includeUpperBound) 95public RangeFilter(IHostEnvironment env, Options options, IDataView input) 134private RangeFilter(IHost host, ModelLoadContext ctx, IDataView input) 167public static RangeFilter Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\RowShufflingTransformer.cs (8)
88private readonly IDataView _subsetInput; 94/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 99IDataView input, 110public RowShufflingTransformer(IHostEnvironment env, Options options, IDataView input) 129private RowShufflingTransformer(IHost host, ModelLoadContext ctx, IDataView input) 152public static RowShufflingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 189private static IDataView SelectCachableColumns(IDataView data, IHostEnvironment env)
Transforms\RowToRowTransformerBase.cs (3)
47public IDataView Transform(IDataView input) => MakeDataTransform(input); 50private protected RowToRowMapperTransform MakeDataTransform(IDataView input)
Transforms\SkipTakeFilter.cs (10)
88private SkipTakeFilter(long skip, long take, IHostEnvironment env, IDataView input) 103/// <param name="input">Input <see cref="IDataView"/>.</param> 104internal SkipTakeFilter(IHostEnvironment env, SkipOptions options, IDataView input) 114/// <param name="input">Input <see cref="IDataView"/>.</param> 115internal SkipTakeFilter(IHostEnvironment env, TakeOptions options, IDataView input) 120IDataTransform ITransformTemplate.ApplyToData(IHostEnvironment env, IDataView newSource) 123public static SkipTakeFilter Create(IHostEnvironment env, Options options, IDataView input) 134public static SkipTakeFilter Create(IHostEnvironment env, SkipOptions options, IDataView input) 142public static SkipTakeFilter Create(IHostEnvironment env, TakeOptions options, IDataView input) 151public static SkipTakeFilter Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\SlotsDroppingTransformer.cs (2)
314private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 321private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\TrainAndScoreTransformer.cs (12)
42public IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> Scorer; 57/// <param name="input">Input <see cref="IDataView"/>.</param> 62IDataView input, 78private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) 159public IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform> Scorer; 172/// <param name="input">Input <see cref="IDataView"/>.</param> 178IDataView input, 202private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) 214internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input, IComponentFactory<IPredictor, ISchemaBindableMapper> mapperFactory) 226private static IDataTransform Create(IHostEnvironment env, Arguments args, ITrainer trainer, IDataView input, IComponentFactory<IPredictor, ISchemaBindableMapper> mapperFactory) 249public static RoleMappedData CreateDataFromArgs(IExceptionContext ectx, IDataView input, 257private static RoleMappedData CreateDataFromArgs(IExceptionContext ectx, IDataView input,
Transforms\TransformBase.cs (16)
25public IDataView Source { get; } 27protected TransformBase(IHostEnvironment env, string name, IDataView input) 37protected TransformBase(IHost host, IDataView input) 57/// Explicit interface implementation hides <see cref="IDataView.Schema"/> in all derived classes. The reason 59/// Thus, this field will be eventually removed while legacy code can still access <see cref="IDataView.Schema"/> for now. 61DataViewSchema IDataView.Schema => OutputSchema; 110protected RowToRowTransformBase(IHostEnvironment env, string name, IDataView input) 115protected RowToRowTransformBase(IHost host, IDataView input) 130private protected FilterBase(IHostEnvironment env, string name, IDataView input) 136private protected FilterBase(IHost host, IDataView input) 157protected RowToRowMapperTransformBase(IHostEnvironment env, string name, IDataView input) 162protected RowToRowMapperTransformBase(IHost host, IDataView input) 499IDataView input, Func<DataViewType, string> testType) 513IDataView input, Func<DataViewType, string> testType) 527IDataView input, Func<DataViewType, string> testType) 544IDataView newInput, Func<DataViewType, string> checkType)
Transforms\TransformInputBase.cs (2)
20/// create an <see cref="ITransformer"/> is to use the <see cref="IEstimator{TTransformer}.Fit(IDataView)"/> method. 24internal IDataView Data;
Transforms\TypeConverting.cs (2)
295internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 344private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Transforms\ValueMapping.cs (20)
65/// <seealso cref="ConversionsExtensionsCatalog.MapValue(TransformsCatalog.ConversionTransforms, string, IDataView, DataViewSchema.Column, DataViewSchema.Column, string)"/> 74/// <param name="lookupMap">An instance of <see cref="IDataView"/> that contains the key and value columns.</param> 78internal ValueMappingEstimator(IHostEnvironment env, IDataView lookupMap, DataViewSchema.Column keyColumn, DataViewSchema.Column valueColumn, params (string outputColumnName, string inputColumnName)[] columns) 173/// <param name="lookupMap">A <see cref="IDataView"/> containing key column and value column.</param> 177internal ValueMappingEstimator(IHostEnvironment env, IDataView lookupMap, DataViewSchema.Column keyColumn, DataViewSchema.Column valueColumn, params (string outputColumnName, string inputColumnName)[] columns) 257internal static IDataView CreateDataView<TKey, TValue>(IHostEnvironment env, 274internal static IDataView CreateDataView<TKey, TValue>(IHostEnvironment env, 431internal ValueMappingTransformer(IHostEnvironment env, IDataView lookupMap, 441private ValueMap CreateValueMapFromDataView(IDataView dataView, DataViewSchema.Column keyColumn, DataViewSchema.Column valueColumn) 469IDataView loader, 549IDataView idv, 598var lookupMap = DataViewHelper.CreateDataView(env, keys, values, keyColumnName, valueColumnName, treatValuesAsKeyTypes); 602private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 614IDataView loader; 655var textLoader = TextLoader.LoadFile(env, txtArgs, fileSource); 761private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 821public abstract IDataView GetDataView(IHostEnvironment env); 946public override IDataView GetDataView(IHostEnvironment env) 983private static byte[] GetBytesFromDataView(IHost host, IDataView lookup, string keyColumn, string valueColumn) 1003var view = new ColumnCopyingTransformer(host, cols.ToArray()).Transform(lookup);
Transforms\ValueToKeyMappingEstimator.cs (7)
43/// <seealso cref="ConversionsExtensionsCatalog.MapValueToKey(TransformsCatalog.ConversionTransforms, InputOutputColumnPair[], int, KeyOrdinality, bool, IDataView)"/> 44/// <seealso cref="ConversionsExtensionsCatalog.MapValueToKey(TransformsCatalog.ConversionTransforms, string, string, int, KeyOrdinality, bool, IDataView)"/> 45/// <seealso cref="ConversionsExtensionsCatalog.MapValueToKey(TransformsCatalog.ConversionTransforms, InputOutputColumnPair[], int, ValueToKeyMappingEstimator.KeyOrdinality, bool, IDataView)"/> 46/// <seealso cref="ConversionsExtensionsCatalog.MapValueToKey(TransformsCatalog.ConversionTransforms, string, string, int, ValueToKeyMappingEstimator.KeyOrdinality, bool, IDataView)"/> 135private readonly IDataView _keyData; 152internal ValueToKeyMappingEstimator(IHostEnvironment env, ColumnOptionsBase[] columns, IDataView keyData = null) 172public ValueToKeyMappingTransformer Fit(IDataView input) => new ValueToKeyMappingTransformer(_host, input, _columns, _keyData, false);
Transforms\ValueToKeyMappingTransformer.cs (12)
245internal ValueToKeyMappingTransformer(IHostEnvironment env, IDataView input, 250internal ValueToKeyMappingTransformer(IHostEnvironment env, IDataView input, 251ValueToKeyMappingEstimator.ColumnOptionsBase[] columns, IDataView keyData, bool autoConvert) 267internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 302var keyData = GetKeyDataViewOrNull(env, ch, options.DataFile, options.TermsColumn, options.Loader, out bool autoLoaded); 363private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 371/// Returns a single-column <see cref="IDataView"/>, based on values from <see cref="Options"/>, 386internal static IDataView GetKeyDataViewOrNull(IHostEnvironment env, IChannel ch, 406IDataView keyData; 467private static TermMap CreateTermMapFromData(IHostEnvironment env, IChannel ch, IDataView keyData, bool autoConvert, Builder bldr) 515IDataView keyData, ValueToKeyMappingEstimator.ColumnOptionsBase[] columns, IDataView trainingData, bool autoConvert)
Utilities\ApplyTransformUtils.cs (6)
26public static IDataTransform ApplyTransformToData(IHostEnvironment env, IDataTransform transform, IDataView newSource) 67public static IDataView ApplyAllTransformsToData(IHostEnvironment env, IDataView chain, IDataView newSource, IDataView oldSource = null) 100IDataView newChain = newSource;
Utilities\ColumnCursor.cs (10)
12/// Extension methods that allow to extract values of a single column of an <see cref="IDataView"/> as an 25public static IEnumerable<T> GetColumn<T>(this IDataView data, string columnName) 34public static IEnumerable<T> GetColumn<T>(this IDataView data, DataViewSchema.Column column) 66Func<IDataView, int, Func<int, T>, IEnumerable<T>> del = GetColumnConvert; 79Func<IDataView, int, IEnumerable<int[]>> del = GetColumnArrayDirect<int>; 87Func<IDataView, int, Func<int, long>, IEnumerable<long[]>> del = GetColumnArrayConvert; 98private static IEnumerable<T> GetColumnDirect<T>(IDataView data, int col) 116private static IEnumerable<TOut> GetColumnConvert<TOut, TData>(IDataView data, int col, Func<TData, TOut> convert) 134private static IEnumerable<T[]> GetColumnArrayDirect<T>(IDataView data, int col) 156private static IEnumerable<TOut[]> GetColumnArrayConvert<TOut, TData>(IDataView data, int col, Func<TData, TOut> convert)
Utilities\ComponentCreation.cs (9)
29public static IDataView Zip(this IHostEnvironment env, IEnumerable<IDataView> sources) 47public static RoleMappedData CreateExamples(this IHostEnvironment env, IDataView data, string features, string label = null, 69public static IDataView LoadTransforms(this IHostEnvironment env, Stream modelStream, IDataView data) 125public static IDataTransform CreateTransform<TArgs>(this IHostEnvironment env, TArgs arguments, IDataView source) 136public static IDataTransform CreateTransform(this IHostEnvironment env, string settings, IDataView source) 140Type factoryType = typeof(IComponentFactory<IDataView, IDataTransform>); 163Type factoryType = typeof(IComponentFactory<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform>);
Utilities\ModelFileUtils.cs (9)
43public static IDataView LoadPipeline(IHostEnvironment env, Stream modelStream, IMultiStreamSource files, bool extractInnerPipe = false) 63public static IDataView LoadPipeline(IHostEnvironment env, RepositoryReader rep, IMultiStreamSource files, bool extractInnerPipe = false) 83IDataView result = loader; 104public static IDataView LoadTransforms(IHostEnvironment env, IDataView data, Stream modelStream) 126public static IDataView LoadTransforms(IHostEnvironment env, IDataView data, RepositoryReader rep) 261var view = builder.GetDataView(); 299var loader = new TextLoader(env, dataSample: repoStreamWrapper).Load(repoStreamWrapper);
Utilities\TypeParsingUtils.cs (1)
14/// Utilities to parse command-line representations of <see cref="IDataView"/> types.
Microsoft.ML.DataView (12)
DataViewRowId.cs (1)
12/// A structure serving as the identifier of a row of <see cref="IDataView"/>.
DataViewSchema.cs (1)
15/// Represents the schema of an <see cref="IDataView"/> or an <see cref="DataViewRow"/>.
DataViewType.cs (4)
13/// This is the abstract base class for all types in the <see cref="IDataView"/> type system. 16/// Those that wish to extend the <see cref="IDataView"/> type system should derive from one of 470/// <see cref="DataViewTypeAttribute"/> should be used to decorated class properties and fields, if that class' instances will be loaded as ML.NET <see cref="IDataView"/>. 473/// in <see cref="IDataView"/> would be the associated <see cref="DataViewType"/>.
IDataView.cs (6)
87/// A logical row of data. May be a row of an <see cref="IDataView"/> or a stand-alone row. 105/// <see cref="IDataView.GetRowCursorSet(IEnumerable{DataViewSchema.Column}, int, Random)"/>. When getting a set, there is a need 110/// identically configured <see cref="IDataView.GetRowCursor(IEnumerable{DataViewSchema.Column}, Random)"/>. So: for any cursor 113/// <see cref="IDataView.GetRowCursorSet(IEnumerable{DataViewSchema.Column}, int, Random)"/>. In this way, order is determined by 129/// instances to iterate over what is supposed to be the same data, for example, in a <see cref="IDataView"/> 184/// Class used to cursor through rows of an <see cref="IDataView"/>.
Microsoft.ML.Ensemble (13)
EnsembleUtils.cs (1)
35var view = LambdaColumnMapper.Create(
EntryPoints\CreateEnsemble.cs (3)
90private static void GetPipeline(IHostEnvironment env, InputBase input, out IDataView startingData, out RoleMappedData transformedData) 139GetPipeline(host, input, out IDataView startingData, out RoleMappedData transformedData); 174GetPipeline(host, input, out IDataView startingData, out RoleMappedData transformedData);
EntryPoints\PipelineEnsemble.cs (4)
20public IDataView[] Summaries; 23public IDataView[] Stats; 47var summaries = new IDataView[ensemble.PredictorModels.Length]; 48var stats = new IDataView[ensemble.PredictorModels.Length];
OutputCombiners\BaseStacking.cs (3)
143var view = CreateDataView(host, ch, data, maps, models); 152private IDataView CreateDataView(IHostEnvironment env, IChannel ch, RoleMappedData data, ValueMapper<VBuffer<Single>, 169private IDataView CreateDataView<T>(IHostEnvironment env, IChannel ch, RoleMappedData data, ValueMapper<VBuffer<Single>, TOutput>[] maps,
PipelineEnsemble.cs (1)
322public IPredictor Calibrate(IChannel ch, IDataView data, ICalibratorTrainer caliTrainer, int maxRows)
Selector\SubModelSelector\BaseSubModelSelector.cs (1)
94if (!metricsDict.TryGetValue(MetricKinds.OverallMetrics, out IDataView metricsView))
Microsoft.ML.EntryPoints (108)
CrossValidationMacro.cs (39)
29public Var<IDataView> Data; 44public IDataView Data; 102public IDataView Warnings; 105public IDataView OverallMetrics; 108public IDataView PerInstanceMetrics; 111public IDataView ConfusionMatrix; 117public IDataView[] OverallMetrics; 120public IDataView[] PerInstanceMetrics; 123public IDataView[] ConfusionMatrix; 126public IDataView[] Warnings; 147public IDataView Warnings; 150public IDataView OverallMetrics; 153public IDataView PerInstanceMetrics; 156public IDataView ConfusionMatrix; 186var splitOutputTrainData = new ArrayVar<IDataView>(); 187var splitOutputTestData = new ArrayVar<IDataView>(); 196var warningsVars = new Var<IDataView>[input.NumFolds]; 197var overallMetricsVars = new Var<IDataView>[input.NumFolds]; 198var instanceMetricsVars = new Var<IDataView>[input.NumFolds]; 199var confusionMatrixVars = new Var<IDataView>[input.NumFolds]; 226args.Inputs.Data = new Var<IDataView> 276var warningVar = new Var<IDataView>(); 279var overallMetric = new Var<IDataView>(); 282var instanceMetric = new Var<IDataView>(); 285var confusionMatrix = new Var<IDataView>(); 296var warningsArrayVar = new ArrayVar<IDataView>(); 297var overallArrayVar = new ArrayVar<IDataView>(); 298var instanceArrayVar = new ArrayVar<IDataView>(); 299ArrayVar<IDataView> confusionMatrixArrayVar = null; 306confusionMatrixArrayVar = new ArrayVar<IDataView>(); 338var combineWarningVar = new Var<IDataView>(); 341var combineOverallMetric = new Var<IDataView>(); 344var combineInstanceMetric = new Var<IDataView>(); 349var combineConfusionMatrix = new Var<IDataView>(); 372var warnings = input.Warnings != null ? new List<IDataView>(input.Warnings) : new List<IDataView>(); 384var overall = eval.GetOverallResults(input.OverallMetrics); 387IDataView conf = null; 394var idv = input.ConfusionMatrix[i];
CVSplit.cs (6)
25public IDataView Data; 37public IDataView[] TrainData; 40public IDataView[] TestData; 55var data = input.Data; 62TrainData = new IDataView[n], 63TestData = new IDataView[n]
DataViewReference.cs (2)
19public IDataView Data; 25public IDataView Data;
FeatureCombiner.cs (8)
54var viewTrain = input.Data; 87private static IDataView ApplyKeyToVec(List<KeyToVectorMappingEstimator.ColumnOptions> ktv, IDataView viewTrain, IHost host) 115private static string GetTerms(IDataView data, string colName) 142private static IDataView ApplyConvert(List<TypeConvertingEstimator.ColumnOptions> cvt, IDataView viewTrain, IHostEnvironment env) 281var xf = new KeyToValueMappingTransformer(host, input.PredictedLabelColumn).Transform(input.Data); 303var xf = new TypeConvertingTransformer(host, new TypeConvertingEstimator.ColumnOptions(input.LabelColumn, DataKind.Single, input.LabelColumn)).Transform(input.Data);
ImportTextData.cs (2)
16/// A component for importing text files as <see cref="IDataView"/>. 32public IDataView Data;
JsonUtils\ExecuteGraphCommand.cs (6)
113IDataView loader = new BinaryLoader(_host, new BinaryLoader.Arguments(), path); 146var idv = runner.GetOutput<IDataView>(varName); 177var idvArray = runner.GetOutputOrDefault<IDataView[]>(varName); 199private void SaveArrayToFile(IDataView[] array, string partialPath, string extension) 224private void SaveDataView(IDataView idv, string path, string extension)
MacroUtils.cs (3)
101public IDataView[] Data; 107public IDataView[] OutputData; 144Var<IDataView>[] vars, string outputVarName)
ModelOperations.cs (1)
80public IDataView OutputData;
OneVersusAllMacro.cs (1)
67var remappedLabelVar = new Var<IDataView>();
PermutationFeatureImportance.cs (12)
31IDataView result = PermutationFeatureImportanceUtils.GetMetrics(env, predictor, roleMappedData, input); 39public IDataView Metrics; 59internal static IDataView GetMetrics( 67IDataView result; 84private static IDataView GetBinaryMetrics( 137var result = dataOps.LoadFromEnumerable(metrics); 141private static IDataView GetMulticlassMetrics( 196var result = dataOps.LoadFromEnumerable(metrics, schema); 200private static IDataView GetRegressionMetrics( 247var result = dataOps.LoadFromEnumerable(metrics); 251private static IDataView GetRankingMetrics( 303var result = dataOps.LoadFromEnumerable(metrics, schema);
ScoreColumnSelector.cs (3)
29var view = input.Data; 104var copyColumn = new ColumnCopyingTransformer(env, copyCols.ToArray()).Transform(input.Data); 105var dropColumn = ColumnSelectingTransformer.CreateDrop(env, copyColumn, copyCols.Select(c => c.source).ToArray());
ScoreModel.cs (6)
28public IDataView Data; 40public IDataView Data; 49public IDataView ScoredData; 75var inputData = input.Data; 78IDataView scoredPipe; 128IDataView scoredPipe;
TrainTestMacro.cs (13)
23public Var<IDataView> Data; 36public IDataView TrainingData; 40public IDataView TestingData; 84public IDataView Warnings; 87public IDataView OverallMetrics; 90public IDataView PerInstanceMetrics; 93public IDataView ConfusionMatrix; 96public IDataView TrainingWarnings; 99public IDataView TrainingOverallMetrics; 102public IDataView TrainingPerInstanceMetrics; 105public IDataView TrainingConfusionMatrix; 201var scoreNodeOutputScoredData = new Var<IDataView>(); 235scoreNodeOutputScoredData = new Var<IDataView>();
TrainTestSplit.cs (6)
21public IDataView Data; 33public IDataView TrainData; 36public IDataView TestData; 52var data = input.Data; 55IDataView trainData = new RangeFilter(host, 59IDataView testData = new RangeFilter(host,
Microsoft.ML.Fairlearn (16)
AutoML\AutoMLExperimentExtension.cs (1)
60var trainData = datasetManager.LoadTrainDataset(context, new TrialSettings
Metrics\FairlearnMetricCatalog.cs (7)
24public BinaryGroupMetric BinaryClassification(IDataView eval, string labelColumn, string predictedColumn, string sensitiveFeatureColumn, string scoreColumn = "Score") 31public RegressionGroupMetric Regression(IDataView eval, string labelColumn, string scoreColumn, string sensitiveFeatureColumn) 40private readonly IDataView _eval; 47public BinaryGroupMetric(MLContext context, IDataView eval, string labelColumn, string predictedColumn, string sensitiveFeatureColumn, string scoreColumn) 69var data = convertToString.Fit(_eval).Transform(_eval); 149private readonly IDataView _eval; 155public RegressionGroupMetric(IDataView eval, string labelColumn, string scoreColumn, string sensitiveFeatureColumn)
Reductions\GridSearchTrialRunner.cs (4)
69var trainDataset = _datasetManager.LoadTrainDataset(_context, settings); 70var validateDataset = _datasetManager.LoadValidateDataset(_context, settings); 78trainDataset = ZipDataView.Create(_context, new IDataView[] { trainDataset, new DataFrame(signWeightColumn) }); 81var eval = model.Transform(validateDataset);
Reductions\Moment.cs (3)
27public IDataView X { get; protected set; } 44public virtual void LoadData(IDataView features, DataFrameColumn label, StringDataFrameColumn sensitiveFeature) 54public virtual void LoadData(IDataView trainData, string label, string sensitiveColumnName)
Reductions\UtilityParity.cs (1)
67public override void LoadData(IDataView x, DataFrameColumn y, StringDataFrameColumn sensitiveFeature)//, StringDataFrameColumn events = null, StringDataFrameColumn utilities = null)
Microsoft.ML.Fairlearn.Tests (2)
GridSearchTest.cs (1)
93var shuffledDataset = context.Data.ShuffleRows(df);
MetricTest.cs (1)
15IDataView data;
Microsoft.ML.FastTree (47)
FastTree.cs (3)
1342IDataView data = examples.Data; 3394IDataView ICanGetSummaryAsIDataView.GetSummaryDataView(RoleMappedSchema schema) 3440IDataView ICanGetSummaryAsIDataView.GetSummaryDataView(RoleMappedSchema schema)
FastTreeClassification.cs (2)
309public BinaryPredictionTransformer<CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, IDataView validationData)
FastTreeRanking.cs (2)
482public RankingPredictionTransformer<FastTreeRankingModelParameters> Fit(IDataView trainData, IDataView validationData)
FastTreeRegression.cs (2)
198public RegressionPredictionTransformer<FastTreeRegressionModelParameters> Fit(IDataView trainData, IDataView validationData)
FastTreeTweedie.cs (2)
357public RegressionPredictionTransformer<FastTreeTweedieModelParameters> Fit(IDataView trainData, IDataView validationData)
GamClassification.cs (2)
180public BinaryPredictionTransformer<CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, IDataView validationData)
GamModelParameters.cs (1)
722IDataView metricsView;
GamRegression.cs (2)
132public RegressionPredictionTransformer<GamRegressionModelParameters> Fit(IDataView trainData, IDataView validationData)
RandomForestClassification.cs (2)
372public BinaryPredictionTransformer<FastForestBinaryModelParameters> Fit(IDataView trainData, IDataView validationData)
RandomForestRegression.cs (2)
501public RegressionPredictionTransformer<FastForestRegressionModelParameters> Fit(IDataView trainData, IDataView validationData)
TreeEnsembleFeaturizationEstimator.cs (14)
16/// requires an input feature column name and a suffix for all output columns. The <see cref="ITransformer"/> returned by <see cref="Fit(IDataView)"/> 29/// The name of feature column in the <see cref="IDataView"/> when calling <see cref="Fit(IDataView)"/>. 101/// All derived class should implement <see cref="PrepareModel(IDataView)"/> to tell how to get a <see cref="TreeEnsembleModelParameters"/> 106private protected abstract TreeEnsembleModelParameters PrepareModel(IDataView input); 112public TreeEnsembleFeaturizationTransformer Fit(IDataView input) 153/// <see cref="IEstimator{TTransformer}.Fit(IDataView)"/> produces a featurizer based on the pre-trained model. 204private protected override TreeEnsembleModelParameters PrepareModel(IDataView input) => _modelParameters; 242private protected override TreeEnsembleModelParameters PrepareModel(IDataView input) 285private protected override TreeEnsembleModelParameters PrepareModel(IDataView input) 328private protected override TreeEnsembleModelParameters PrepareModel(IDataView input) 371private protected override TreeEnsembleModelParameters PrepareModel(IDataView input) 414private protected override TreeEnsembleModelParameters PrepareModel(IDataView input) 457private protected override TreeEnsembleModelParameters PrepareModel(IDataView input)
TreeEnsembleFeaturizer.cs (9)
589TreeEnsembleFeaturizerBindableMapper.Arguments args, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema) 612private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) 676trainScoreArgs.Scorer = ComponentFactoryUtils.CreateFromFunction<IDataView, ISchemaBoundMapper, RoleMappedSchema, IDataScorerTransform>( 682var labelInput = AppendLabelTransform(host, ch, input, trainScoreArgs.LabelColumn, args.LabelPermutationSeed); 693public static IDataTransform CreateForEntryPoint(IHostEnvironment env, ArgumentsForEntryPoint args, IDataView input) 739private static IDataView AppendFloatMapper<TInput>(IHostEnvironment env, IChannel ch, IDataView input, 792private static IDataView AppendLabelTransform(IHostEnvironment env, IChannel ch, IDataView input, string labelName, int labelPermutationSeed)
Utils\RegressionTreeBaseUtils.cs (4)
17/// Utility method used to represent a tree ensemble as an <see cref="IDataView"/>. 18/// Every row in the <see cref="IDataView"/> corresponds to a node in the tree ensemble. The columns are the fields for each node. 23public static IDataView RegressionTreeEnsembleAsIDataView(IHost host, double bias, IReadOnlyList<double> treeWeights, IReadOnlyList<RegressionTreeBase> trees) 142var data = builder.GetDataView();
Microsoft.ML.ImageAnalytics (10)
ImageGrayscale.cs (2)
95internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 122private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
ImageLoader.cs (2)
120internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView data) 151private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
ImagePixelExtractor.cs (2)
194internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 239private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
ImageResizer.cs (2)
151internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) 215private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
VectorToImageTransform.cs (2)
218internal static IDataTransform Create(IHostEnvironment env, Options args, IDataView input) 268private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Microsoft.ML.IntegrationTests (147)
Common.cs (7)
18/// Assert that an <see cref="IDataView"/> rows are of <see cref="TypeTestData"/>. 20/// <param name="testTypeDataset">An <see cref="IDataView"/>.</param> 21public static void AssertTypeTestDataset(IDataView testTypeDataset) 63/// <param name="data1">A <see cref="IDataView"/> of <see cref="TypeTestData"/></param> 64/// <param name="data2">A <see cref="IDataView"/> of <see cref="TypeTestData"/></param> 65public static void AssertTestTypeDatasetsAreEqual(MLContext mlContext, IDataView data1, IDataView data2)
DataIO.cs (10)
36var data = mlContext.Data.LoadFromEnumerable(TypeTestData.GenerateDataset()); 51var data = mlContext.Data.LoadFromEnumerable(enumerableBefore); 70var dataBefore = mlContext.Data.LoadFromEnumerable(TypeTestData.GenerateDataset()); 76var dataAfter = TypeTestData.GetTextLoader(mlContext, separator).Load(filePath); 92var dataBefore = mlContext.Data.LoadFromEnumerable(TypeTestData.GenerateDataset()); 98var dataAfter = mlContext.Data.LoadFromTextFile<TypeTestData>(filePath, separatorChar: separator, hasHeader: true, allowQuoting: true); 111var dataBefore = mlContext.Data.LoadFromEnumerable(TypeTestData.GenerateDataset()); 115var dataAfter = mlContext.Data.LoadFromBinary(filePath); 119private string SerializeDatasetToFile(MLContext mlContext, IDataView data, char separator) 128private string SerializeDatasetToBinaryFile(MLContext mlContext, IDataView data)
Datasets\Iris.cs (3)
36public static IDataView LoadAsRankingProblem(MLContext mlContext, string filePath, bool hasHeader, char separatorChar, int seed = 1) 39var data = mlContext.Data.LoadFromTextFile<Iris>(filePath, hasHeader: hasHeader, separatorChar: separatorChar); 59var transformedData = pipeline.Fit(data).Transform(data);
Datasets\TrivialMatrixFactorization.cs (3)
24public static IDataView LoadAndFeaturizeFromTextFile(MLContext mlContext, string filePath, bool hasHeader, char separatorChar) 27var data = mlContext.Data.LoadFromTextFile<TrivialMatrixFactorization>(filePath, hasHeader: hasHeader, separatorChar: separatorChar); 34var transformedData = pipeline.Fit(data).Transform(data);
DataTransformation.cs (10)
32var data = mlContext.Data.LoadFromTextFile<Iris>( 64var transformedData = pipeline.Fit(data).Transform(data); 85var data = mlContext.Data.LoadFromTextFile<Iris>( 110var transformedData = pipeline.Fit(data).Transform(data); 132var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 152var scoredData = model.Transform(data); 169var data = mlContext.Data.LoadFromTextFile<Iris>( 179var transformedData = pipeline.Fit(data).Transform(data); 196var data = mlContext.Data.LoadFromTextFile<Iris>( 207var transformedData = pipeline.Fit(data).Transform(data);
Debugging.cs (5)
40var data = mlContext.Data.LoadFromEnumerable<TweetSentiment>( 65var transformedData = model.Transform(data); 104var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 133var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 171var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true);
Evaluation.cs (22)
30var trainData = MnistOneClass.GetTextLoader(mlContext, 33var testData = MnistOneClass.GetTextLoader(mlContext, 45var scoredTest = model.Transform(testData); 60var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 74var scoredData = model.Transform(data); 89var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 103var scoredData = model.Transform(data); 118var data = mlContext.Data.LoadFromTextFile<Iris>(TestCommon.GetDataPath(DataDir, TestDatasets.iris.trainFilename), 131var scoredData = model.Transform(data); 146var data = mlContext.Data.LoadFromTextFile<Iris>(TestCommon.GetDataPath(DataDir, TestDatasets.iris.trainFilename), 161var scoredData = model.Transform(data); 168private IDataView GetScoredDataForRankingEvaluation(MLContext mlContext) 170var data = Iris.LoadAsRankingProblem(mlContext, 183var scoredData = model.Transform(data); 196var scoredData = GetScoredDataForRankingEvaluation(mlContext); 215var scoredData = GetScoredDataForRankingEvaluation(mlContext); 230var data = TrivialMatrixFactorization.LoadAndFeaturizeFromTextFile( 252var scoredData = model.Transform(data); 268var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 277var scoredData = model.Transform(data); 295var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 309var scoredData = model.Transform(data);
Explainability.cs (21)
35var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 44IDataView transformedData; 93var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 117var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 144var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 171var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 179var scoredData = model.Transform(data); 186var outputData = featureContributions.Fit(scoredData).Transform(scoredData); 189var shuffledSubset = mlContext.Data.TakeRows(mlContext.Data.ShuffleRows(outputData), 10); 208var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 216var scoredData = model.Transform(data); 223var outputData = featureContributions.Fit(scoredData).Transform(scoredData); 226var shuffledSubset = mlContext.Data.TakeRows(mlContext.Data.ShuffleRows(outputData), 10); 245var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 253var scoredData = model.Transform(data); 260var outputData = featureContributions.Fit(scoredData).Transform(scoredData); 263var shuffledSubset = mlContext.Data.TakeRows(mlContext.Data.ShuffleRows(outputData), 10); 283var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 291var scoredData = model.Transform(data); 298var outputData = featureContributions.Fit(scoredData).Transform(scoredData); 301var shuffledSubset = mlContext.Data.TakeRows(mlContext.Data.ShuffleRows(outputData), 10);
IntrospectiveTraining.cs (12)
35var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 75var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 137var data = mlContext.Data.LoadFromTextFile<Iris>( 178var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 204var transformedData = model.Transform(data); 219var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 234var transformedData = model.Transform(data); 258var data = mlContext.Data.LoadFromTextFile<Iris>( 289var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 332var data = mlContext.Data.LoadFromTextFile<Adult>(TestCommon.GetDataPath(DataDir, TestDatasets.adult.trainFilename), 346var transformedData = model.Transform(data); 389var data = mlContext.Data.LoadFromTextFile<Iris>(TestCommon.GetDataPath(DataDir, TestDatasets.iris.trainFilename),
ModelFiles.cs (6)
45var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 92var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 136var data = loader.Load(file); 269var data = loader.Load(file); 326var data = loader.Load(file); 427var data = loader.Load(file);
ONNX.cs (3)
37var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 87var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 139var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true);
Prediction.cs (3)
46var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 82var data = mlContext.Data.LoadFromEnumerable(TypeTestData.GenerateDataset()); 105var data = mlContext.Data.LoadFromEnumerable(TypeTestData.GenerateDataset());
SchemaDefinitionTests.cs (1)
35var data = loader.Load(new MultiFileSource(fileName));
Training.cs (28)
32var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 37var trainData = trainTestSplit.TrainSet; 38var testData = trainTestSplit.TestSet; 55var featurizedTrain = featurization.Transform(trainData); 56var featurizedTest = featurization.Transform(testData); 64var sdcaPredictions = sdca.Transform(featurizedTest); 66var fastTreePredictions = fastTree.Transform(featurizedTest); 68var ffmPredictions = sdca.Transform(featurizedTest); 86var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 100var featurizedData = featurization.Transform(data); 130var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 144var featurizedData = featurization.Transform(data); 174var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 188var featurizedData = featurization.Transform(data); 218var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 232var featurizedData = featurization.Transform(data); 261var data = mlContext.Data.LoadFromTextFile<Iris>(TestCommon.GetDataPath(DataDir, TestDatasets.iris.trainFilename), 275var featurizedData = featurization.Transform(data); 312var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), 326var featurizedData = featurization.Transform(data); 356var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), 370var featurizedData = featurization.Transform(data); 400var data = mlContext.Data.LoadFromTextFile<TweetSentiment>(TestCommon.GetDataPath(DataDir, TestDatasets.Sentiment.trainFilename), 418var featurizedData = featurization.Transform(data); 448var data = mlContext.Data.LoadFromTextFile<Iris>(TestCommon.GetDataPath(DataDir, TestDatasets.iris.trainFilename), 464var binaryClassificationPredictions = binaryClassificationModel.Transform(data); 479var data = mlContext.Data.LoadFromTextFile<Iris>(TestCommon.GetDataPath(DataDir, TestDatasets.iris.trainFilename), 496var binaryClassificationPredictions = binaryClassificationModel.Transform(data);
Validation.cs (13)
38var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 50Assert.True(cvResult[0].ScoredHoldOutSet is IDataView); 85var trainDataView = reader.Load(TestCommon.GetDataPath(DataDir, "MSLRWeb1K-tiny.tsv")); 104var data = mlContext.Data.LoadFromTextFile<HousingRegression>(TestCommon.GetDataPath(DataDir, TestDatasets.housing.trainFilename), hasHeader: true); 108var trainData = dataSplit.TrainSet; 109var validData = dataSplit.TestSet; 117var preprocessedTrainData = preprocessor.Transform(trainData); 118var preprocessedValidData = preprocessor.Transform(validData); 133var scoredTrainData = model.Transform(trainData); 134var scoredValidData = model.Transform(validData); 153var data = mlContext.Data.LoadFromTextFile<Iris>(TestCommon.GetDataPath(DataDir, TestDatasets.iris.trainFilename), hasHeader: true); 160var scoredDataOneRow = model.Transform(mlContext.Data.TakeRows(data, 1)); 166var scoredDataZeroRows = mlContext.Data.FilterRowsByColumn(scoredDataOneRow, "Label", lowerBound: -2, upperBound: -1);
Microsoft.ML.LightGbm (8)
LightGbmBinaryTrainer.cs (2)
300public BinaryPredictionTransformer<CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, IDataView validationData)
LightGbmMulticlassTrainer.cs (2)
382public MulticlassPredictionTransformer<OneVersusAllModelParameters> Fit(IDataView trainData, IDataView validationData)
LightGbmRankingTrainer.cs (2)
313public RankingPredictionTransformer<LightGbmRankingModelParameters> Fit(IDataView trainData, IDataView validationData)
LightGbmRegressionTrainer.cs (2)
261public RegressionPredictionTransformer<LightGbmRegressionModelParameters> Fit(IDataView trainData, IDataView validationData)
Microsoft.ML.Mkl.Components (10)
SymSgdClassificationTrainer.cs (3)
189var idvToShuffle = examples.Data; 190IDataView idvToFeedTrain; 269public BinaryPredictionTransformer<TPredictor> Fit(IDataView trainData, LinearModelParameters modelParameters)
VectorWhitening.cs (7)
193internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 201internal static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 245private static long GetRowCount(IDataView inputData, params VectorWhiteningEstimator.ColumnOptions[] columns) 262internal static (float[][] models, float[][] invModels) TrainVectorWhiteningTransform(IHostEnvironment env, IDataView inputData, params VectorWhiteningEstimator.ColumnOptions[] columns) 278private static void GetColTypesAndIndex(IHostEnvironment env, IDataView inputData, VectorWhiteningEstimator.ColumnOptions[] columns, out DataViewType[] srcTypes, out int[] cols) 299private static float[][] LoadDataAsDense(IHostEnvironment env, IChannel ch, IDataView inputData, out int[] actualRowCounts, 879public VectorWhiteningTransformer Fit(IDataView input)
Microsoft.ML.OnnxConverter (26)
OnnxExportExtensions.cs (14)
18private static ModelProto ConvertToOnnxProtobufCore(IHostEnvironment env, OnnxContextImpl ctx, ITransformer transform, IDataView inputData, string[] outputColumnNamesToKeep = null) 20var outputData = transform.Transform(inputData); 24SaveOnnxCommand.GetPipe(ctx, ch, outputData, out IDataView root, out IDataView sink, out transforms); 44/// <param name="catalog">The class that <see cref="ConvertToOnnxProtobuf(ModelOperationsCatalog, ITransformer, IDataView, string[])"/> attached to.</param> 50internal static ModelProto ConvertToOnnxProtobuf(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, string[] outputColumns = null) 60/// <param name="catalog">The class that <see cref="ConvertToOnnxProtobuf(ModelOperationsCatalog, ITransformer, IDataView, int)"/> attached to.</param> 66internal static ModelProto ConvertToOnnxProtobuf(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, int opSetVersion) 76/// <param name="catalog">The class that <see cref="ConvertToOnnx(ModelOperationsCatalog, ITransformer, IDataView, Stream)"/> attached to.</param> 81public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, Stream stream) => 87/// <param name="catalog">The class that <see cref="ConvertToOnnx(ModelOperationsCatalog, ITransformer, IDataView, int, Stream)"/> attached to.</param> 93public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, int opSetVersion, Stream stream) => 99/// <param name="catalog">The class that <see cref="ConvertToOnnx(ModelOperationsCatalog, ITransformer, IDataView, Stream)"/> attached to.</param> 105public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, Stream stream, params string[] outputColumns) =>
SaveOnnxCommand.cs (12)
139internal static void GetPipe(OnnxContextImpl ctx, IChannel ch, IDataView end, out IDataView source, out IDataView trueEnd, out LinkedList<ITransformCanSaveOnnx> transforms) 164internal static ModelProto ConvertTransformListToOnnxModel(OnnxContextImpl ctx, IChannel ch, IDataView inputData, IDataView outputData, 261private HashSet<string> GetPassThroughKeyDataViewTypeColumnsNames(IDataView source, IDataView end) 295IDataView view; 331IDataView source; 332IDataView end; 367var outputData = new KeyToValueMappingTransformer(Host, DefaultColumnNames.PredictedLabel).Transform(scorePipe); 393var outputData = new KeyToValueMappingTransformer(Host, name).Transform(end);
Microsoft.ML.OnnxTransformer (13)
DnnImageFeaturizerTransform.cs (1)
107public TransformerChain<ColumnCopyingTransformer> Fit(IDataView input)
OnnxMapType.cs (3)
13/// The corresponding <see cref="DataViewSchema.Column.Type"/> of ONNX's map type in <see cref="IDataView"/>'s type system. 14/// In other words, if an ONNX model produces a map, a column in <see cref="IDataView"/> may be typed to <see cref="OnnxMapType"/>. 45/// To declare <see cref="OnnxMapType"/> column in <see cref="IDataView"/> as a field
OnnxSequenceType.cs (3)
13/// The corresponding <see cref="DataViewSchema.Column.Type"/> of ONNX's sequence type in <see cref="IDataView"/>'s type system. 14/// In other words, if an ONNX model produces a sequence, a column in <see cref="IDataView"/> may be typed to <see cref="OnnxSequenceType"/>. 51/// To declare <see cref="OnnxSequenceType"/> column in <see cref="IDataView"/> as a field
OnnxTransform.cs (3)
150private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 156private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 493/// <see cref="_inputColIndices"/>'s i-th element value tells the <see cref="IDataView"/> column index to
OnnxUtils.cs (3)
71/// Return the ONNX value for a <see cref="IDataView"/> input column called <paramref name="name"/>. 89/// Return the ONNX value for a <see cref="IDataView"/> output column called <paramref name="name"/>. 123/// to in <see cref="IDataView"/>'s type system.
Microsoft.ML.OnnxTransformerTest (47)
DnnImageFeaturizerTest.cs (10)
67var dataView = DataViewConstructionUtils.CreateFromList(Env, 80var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 81var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData); 82var invalidDataWrongVectorSize = ML.Data.LoadFromEnumerable(sizeData); 104var data = ML.Data.LoadFromTextFile(dataFile, new[] { 116var result = pipe.Fit(data).Transform(data); 143var dataView = ML.Data.LoadFromEnumerable( 155var result = transformer.Transform(dataView); 161var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 214var data = ML.Data.LoadFromTextFile<ModelInput>(
OnnxTransformTests.cs (37)
131var dataView = ML.Data.LoadFromEnumerable( 160var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 161var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData); 162var invalidDataWrongVectorSize = ML.Data.LoadFromEnumerable(sizeData); 186var dataView = ML.Data.LoadFromEnumerable( 198var result = transformer.Transform(dataView); 204var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 249var data = ML.Data.LoadFromTextFile(dataFile, new[] { 262var result = model.Transform(data); 300var data = ML.Data.LoadFromTextFile(dataFile, new[] { 313var result = model.Transform(data); 361var dataView = ML.Data.LoadFromEnumerable( 371var onnx = onnxTransformer.Transform(dataView); 394var dataView = ML.Data.LoadFromEnumerable( 428var dataView = ML.Data.LoadFromEnumerable( 438var onnx = onnxTransformer.Transform(dataView); 467var dataView = ML.Data.LoadFromEnumerable( 478var onnx = onnxTransformer.Transform(dataView); 535var idv = mlContext.Data.LoadFromEnumerable(data); 538var transformedValues = onnxTransformer.Transform(idv); 561var idv = mlContext.Data.LoadFromEnumerable(data); 564var transformedValues = onnxTransformer.Transform(idv); 637var dataView = ML.Data.LoadFromEnumerable(dataPoints); 646var onnx = model.Transform(dataView); 693var dataView = ML.Data.LoadFromEnumerable(dataPoints); 696var transformedDataView = onnxTransformer.Transform(dataView); 746var dataView = ML.Data.LoadFromEnumerable(dataPoints); 749var transformedDataView = onnxTransformer.Transform(dataView); 860var dataView = ML.Data.LoadFromEnumerable(dataPoints); 863var transformedDataView = model.Transform(dataView); 900var dataView = ML.Data.LoadFromEnumerable(dataPoints); 904var transformedDataViews = new IDataView[3]; 928foreach (var transformedDataView in transformedDataViews) 962var dataView = ML.Data.LoadFromEnumerable( 1070var dataView = ML.Data.LoadFromEnumerable(dataPoints); 1091var transformedDataView = loadedModel.Transform(dataView); 1129var data = ML.Data.LoadFromTextFile(dataFile, new[] {
Microsoft.ML.PCA (7)
PcaTrainer.cs (1)
587IDataView ICanGetSummaryAsIDataView.GetSummaryDataView(RoleMappedSchema schema)
PcaTransformer.cs (6)
204internal PrincipalComponentAnalysisTransformer(IHostEnvironment env, IDataView input, PrincipalComponentAnalyzer.ColumnOptions[] columns) 240private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 248private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 300private void Train(PrincipalComponentAnalyzer.ColumnOptions[] columns, TransformInfo[] transformInfos, IDataView trainingData) 391private void Project(IDataView trainingData, float[][] mean, float[][][] omega, float[][][] y, TransformInfo[] transformInfos) 809public PrincipalComponentAnalysisTransformer Fit(IDataView input) => new PrincipalComponentAnalysisTransformer(_host, input, _columns);
Microsoft.ML.PerformanceTests (22)
CacheDataViewBench.cs (3)
18private IDataView _cacheDataView; 36var dv = builder.GetDataView(); 37var cacheDv = ctx.Data.Cache(dv);
FeaturizeTextBench.cs (1)
20private IDataView _dataset;
ImageClassificationBench.cs (3)
24private IDataView _trainDataset; 25private IDataView _testDataset; 57IDataView shuffledFullImagesDataset = _mlContext.Data.ShuffleRows(
KMeansAndLogisticRegressionBench.cs (1)
24var input = ml.Data.LoadFromTextFile(_dataPath, new[] {
PredictionEngineBench.cs (3)
55IDataView data = loader.Load(irisDataPath); 91IDataView data = loader.Load(sentimentDataPath); 126IDataView data = loader.Load(breastCancerDataPath);
RffTransform.cs (1)
43var data = loader.Load(_dataPathDigits);
ShuffleRowsBench.cs (2)
32IDataView data = _context.Data.LoadFromEnumerable(_rows); 34IDataView shuffledData = _context.Data.ShuffleRows(data, seed: 0);
StochasticDualCoordinateAscentClassifierBench.cs (6)
41private IDataView _scoredIrisTestData; 76IDataView data = loader.Load(dataPath); 101var loader = _mlContext.Data.LoadFromTextFile(_sentimentDataPath, arguments); 102var text = _mlContext.Transforms.Text.FeaturizeText("WordEmbeddings", new TextFeaturizingEstimator.Options 112var trans = _mlContext.Transforms.Text.ApplyWordEmbedding("Features", "WordEmbeddings_TransformedText", 145IDataView testData = loader.Load(_dataPath);
TextLoaderBench.cs (1)
20private IDataView _dataView;
TextPredictionEngineCreation.cs (1)
24var data = _context.Data.LoadFromTextFile<SentimentData>(
Microsoft.ML.Predictor.Tests (19)
TestIniModels.cs (4)
519var idv = mlContext.Data.CreateTextLoader( 533var data = model.Transform(idv); 558var idv = mlContext.Data.CreateTextLoader( 572var data = model.Transform(idv);
TestPredictors.cs (11)
627var dataView = ML.Data.LoadFromTextFile(dataPath); 648var dataView = ML.Data.LoadFromTextFile(dataPath); 650var cat = ML.Transforms.Categorical.OneHotEncoding("Features", "Categories").Fit(dataView).Transform(dataView); 667private void CombineAndTestTreeEnsembles(IDataView idv, PredictorModel[] fastTrees) 674var scored = ScoreModel.Score(Env, new ScoreModel.Input() { Data = idv, PredictorModel = new PredictorModelImpl(Env, data, idv, fastTree) }).ScoredData; 683var scoredArray = new IDataView[predCount]; 757var dataView = ML.Data.LoadFromTextFile(dataPath); 803var dataView = ML.Data.LoadFromTextFile(dataPath); 835private void CombineAndTestEnsembles(IDataView idv, string name, string options, PredictionKind predictionKind, 844var scored = ScoreModel.Score(Env, new ScoreModel.Input() { Data = idv, PredictorModel = new PredictorModelImpl(Env, data, idv, predictor) }).ScoredData; 858var scoredArray = new IDataView[predCount];
TestTransposer.cs (4)
24private static T[] NaiveTranspose<T>(IDataView view, int col) 65private static void TransposeCheckHelper<T>(IDataView view, int viewCol, ITransposeDataView trans) 173IDataView view = builder.GetDataView(); 239IDataView view = builder.GetDataView();
Microsoft.ML.Recommender (11)
MatrixFactorizationTrainer.cs (9)
144/// The name of variable (i.e., Column in a <see cref="IDataView"/> type system) used as matrix's column index. 150/// The name of variable (i.e., column in a <see cref="IDataView"/> type system) used as matrix's row index. 156/// The name variable (i.e., column in a <see cref="IDataView"/> type system) used as matrix's element value. 323/// The name of variable (i.e., Column in a <see cref="IDataView"/> type system) used be as matrix's column index. 328/// The name of variable (i.e., column in a <see cref="IDataView"/> type system) used as matrix's row index. 333/// The name variable (i.e., column in a <see cref="IDataView"/> type system) used as matrix's element value. 525public MatrixFactorizationPredictionTransformer Fit(IDataView trainData, IDataView validationData) 548public MatrixFactorizationPredictionTransformer Fit(IDataView input) => Fit(input, null);
RecommenderCatalog.cs (2)
109public RegressionMetrics Evaluate(IDataView data, string labelColumnName = DefaultColumnNames.Label, string scoreColumnName = DefaultColumnNames.Score) 136IDataView data, IEstimator<ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label,
Microsoft.ML.Samples (532)
Dynamic\DataOperations\BootstrapSample.cs (2)
25var data = mlContext.Data.LoadFromEnumerable(rawData); 43var resample = mlContext.Data.BootstrapSample(data, seed: i);
Dynamic\DataOperations\Cache.cs (3)
16var data = DatasetUtils.LoadHousingRegressionDataset(mlContext); 29var cachedData = mlContext.Data.Cache(data); 60TimeToScanIDataView(MLContext mlContext, IDataView data)
Dynamic\DataOperations\CrossValidationSplit.cs (1)
22var dataview = mlContext.Data.LoadFromEnumerable(examples);
Dynamic\DataOperations\DataViewEnumerable.cs (1)
23IDataView data = mlContext.Data.LoadFromEnumerable(enumerableOfData);
Dynamic\DataOperations\FilterRowsByColumn.cs (2)
20var data = mlContext.Data.LoadFromEnumerable(enumerableOfData); 46var filteredData = mlContext.Data
Dynamic\DataOperations\FilterRowsByCustomPredicate.cs (2)
27var data = mlContext.Data.LoadFromEnumerable(enumerableOfData); 48var filteredData = mlContext.Data.FilterByCustomPredicate<InputData>(
Dynamic\DataOperations\FilterRowsByKeyColumnFraction.cs (4)
33var data = mlContext.Data.LoadFromEnumerable(samples); 37var transformedData = pipeline.Fit(data).Transform(data); 68var filteredHalfData = mlContext.Data 95var filteredMiddleData = mlContext.Data
Dynamic\DataOperations\FilterRowsByMissingValues.cs (2)
32var data = mlContext.Data.LoadFromEnumerable(samples); 35var filteredData = mlContext.Data
Dynamic\DataOperations\FilterRowsByStatefulCustomPredicate.cs (2)
27var data = mlContext.Data.LoadFromEnumerable(enumerableOfData); 48var filteredData = mlContext.Data.FilterByStatefulCustomPredicate<InputData, State>(
Dynamic\DataOperations\LoadFromEnumerable.cs (2)
39IDataView data = mlContext.Data.LoadFromEnumerable(enumerableKnownSize); 81IDataView data2 = mlContext.Data
Dynamic\DataOperations\LoadingSvmLight.cs (3)
49var svmData = loader.Load(file); 82private static void PrintSchema(IDataView svmData) 88private static void PrintData(IDataView svmData)
Dynamic\DataOperations\LoadingText.cs (8)
52var singleFileData = loader.Load(dataFiles[0]); 60var multipleFilesData = loader.Load(dataFiles.ToArray()); 68var multipleFilesWildcardData = 81var singleFileCustomTypeData = loaderWithCustomType.Load(dataFiles[0]); 101var dataWithInferredLength = loaderWithUnknownLength.Load(dataFiles[0]); 147var sparseData = sparseLoader.Load(sparseDataFileName); 177var sparseDataWithSchema = sparseLoaderWithSchema.Load(sparseDataFileName); 184private static void PrintRowCount(IDataView idv)
Dynamic\DataOperations\SaveAndLoadFromBinary.cs (2)
30IDataView data = mlContext.Data.LoadFromEnumerable(dataPoints); 38IDataView loadedData = mlContext.Data.LoadFromBinary("data.idv");
Dynamic\DataOperations\SaveAndLoadFromText.cs (2)
30IDataView data = mlContext.Data.LoadFromEnumerable(dataPoints); 38IDataView loadedData = mlContext.Data.LoadFromTextFile("data.tsv");
Dynamic\DataOperations\ShuffleRows.cs (2)
20var data = mlContext.Data.LoadFromEnumerable(enumerableOfData); 39var shuffledData = mlContext.Data.ShuffleRows(data, seed: 123);
Dynamic\DataOperations\SkipRows.cs (2)
19var data = mlContext.Data.LoadFromEnumerable(enumerableOfData); 43var filteredData = mlContext.Data.SkipRows(data, 5);
Dynamic\DataOperations\TakeRows.cs (2)
20var data = mlContext.Data.LoadFromEnumerable(enumerableOfData); 44var filteredData = mlContext.Data.TakeRows(data, 5);
Dynamic\DataOperations\TrainTestSplit.cs (1)
22var dataview = mlContext.Data.LoadFromEnumerable(examples);
Dynamic\ModelOperations\OnnxConversion.cs (3)
40var originalData = Microsoft.ML.SamplesUtils.DatasetUtils 89var output = transformer.Transform(trainTestOriginalData.TestSet); 90var onnxOutput = onnxTransformer.Transform(trainTestOriginalData.TestSet);
Dynamic\ModelOperations\SaveLoadModel.cs (1)
23var dataView = mlContext.Data.LoadFromEnumerable(data);
Dynamic\ModelOperations\SaveLoadModelFile.cs (1)
23var dataView = mlContext.Data.LoadFromEnumerable(data);
Dynamic\NgramExtraction.cs (3)
29var trainData = ml.Data.LoadFromEnumerable(data); 59var transformedData_onechars = oneCharsPipeline.Fit(trainData) 62var transformedData_twochars = twoCharsPipeline.Fit(trainData)
Dynamic\SimpleDataViewImplementation.cs (9)
10/// The <see cref="IDataView"/> interface is the central concept of "data" in 15/// implementing <see cref="IDataView"/> need at least some knowledge of those 36var transformedDataView = mlContext.Transforms.Text.TokenizeIntoWords( 100/// This is an implementation of <see cref="IDataView"/> that wraps an 106/// or something like that, rather than implementing <see cref="IDataView"/> 111/// This implementation of <see cref="IDataView"/>, being didactic, is much 186/// pattern: in most <see cref="IDataView"/> implementations, the cursor 189/// existing <see cref="IDataView"/> without even bothering to change 194/// <see cref="IDataView.Schema"/> object that created this cursor, as
Dynamic\TensorFlow\ImageClassification.cs (2)
39var idv = mlContext.Data.LoadFromEnumerable(data); 49var transformedValues = estimator.Transform(idv);
Dynamic\TensorFlow\TextClassification.cs (2)
42var dataView = mlContext.Data.LoadFromEnumerable(data); 45var lookupMap = mlContext.Data.LoadFromTextFile(Path.Combine(
Dynamic\TextTransform.cs (3)
31var trainData = ml.Data.LoadFromEnumerable(data); 69var transformedData_default = default_pipeline.Fit(trainData) 72var transformedData_customized = customized_pipeline.Fit(trainData)
Dynamic\Trainers\AnomalyDetection\RandomizedPcaSample.cs (2)
32var data = mlContext.Data.LoadFromEnumerable(samples); 44var transformed = model.Transform(data);
Dynamic\Trainers\AnomalyDetection\RandomizedPcaSampleWithOptions.cs (2)
34var data = mlContext.Data.LoadFromEnumerable(samples); 52var transformed = model.Transform(data);
Dynamic\Trainers\BinaryClassification\AveragedPerceptron.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\AveragedPerceptronWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 46var testData = mlContext.Data 50var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\Calibrators\FixedPlatt.cs (3)
19var data = Microsoft.ML.SamplesUtils.DatasetUtils 38var scoredData = transformer.Transform(trainTestData.TestSet); 63var finalData = calibratorTransformer.Transform(scoredData);
Dynamic\Trainers\BinaryClassification\Calibrators\Isotonic.cs (3)
19var data = Microsoft.ML.SamplesUtils.DatasetUtils 38var scoredData = transformer.Transform(trainTestData.TestSet); 63var finalData = calibratorTransformer.Transform(scoredData);
Dynamic\Trainers\BinaryClassification\Calibrators\Naive.cs (3)
19var data = Microsoft.ML.SamplesUtils.DatasetUtils 38var scoredData = transformer.Transform(trainTestData.TestSet); 63var finalData = calibratorTransformer.Transform(scoredData);
Dynamic\Trainers\BinaryClassification\Calibrators\Platt.cs (3)
19var data = Microsoft.ML.SamplesUtils.DatasetUtils 38var scoredData = transformer.Transform(trainTestData.TestSet); 63var finalData = calibratorTransformer.Transform(scoredData);
Dynamic\Trainers\BinaryClassification\FactorizationMachine.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 43var testData = mlContext.Data 47var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\FastForest.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 38var testData = mlContext.Data 42var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\FastForestWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 50var testData = mlContext.Data 54var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\FastTree.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 38var testData = mlContext.Data 42var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\FastTreeWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 50var testData = mlContext.Data 54var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachine.cs (2)
27var trainingData = mlContext.Data.LoadFromEnumerable(data); 48var transformedTrainingData = model.Transform(trainingData);
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachineWithOptions.cs (2)
28var trainingData = mlContext.Data.LoadFromEnumerable(data); 59var transformedTrainingData = model.Transform(trainingData);
Dynamic\Trainers\BinaryClassification\Gam.cs (3)
24var data = mlContext.Data.LoadFromEnumerable(samples); 28var trainSet = dataSets.TrainSet; 29var validSet = dataSets.TestSet;
Dynamic\Trainers\BinaryClassification\GamWithOptions.cs (3)
25var data = mlContext.Data.LoadFromEnumerable(samples); 29var trainSet = dataSets.TrainSet; 30var validSet = dataSets.TestSet;
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegression.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegressionWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 44var testData = mlContext.Data 48var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\LdSvm.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\LdSvmWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 44var testData = mlContext.Data 48var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\LightGbm.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 38var testData = mlContext.Data 42var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\LightGbmWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 49var testData = mlContext.Data 53var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\LinearSvm.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\LinearSvmWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 44var testData = mlContext.Data 48var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportance.cs (2)
21var data = mlContext.Data.LoadFromEnumerable(samples); 37var transformedData = model.Transform(data);
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportanceLoadFromDisk.cs (2)
18var data = mlContext.Data.LoadFromEnumerable(samples); 39var transformedData = model.Transform(data);
Dynamic\Trainers\BinaryClassification\PriorTrainer.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegression.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 43var testData = mlContext.Data 47var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegressionWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 55var testData = mlContext.Data 59var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SdcaNonCalibrated.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 43var testData = mlContext.Data 47var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SdcaNonCalibratedWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 57var testData = mlContext.Data 61var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SgdCalibrated.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SgdCalibratedWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 47var testData = mlContext.Data 51var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SgdNonCalibrated.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SgdNonCalibratedWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 44var testData = mlContext.Data 48var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegression.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 38var testData = mlContext.Data 42var transformedTestData = model.Transform(testData);
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegressionWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 47var testData = mlContext.Data 51var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Clustering\KMeans.cs (3)
24IDataView trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 35var testData = mlContext.Data.LoadFromEnumerable( 39var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Clustering\KMeansWithOptions.cs (3)
25IDataView trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 43var testData = mlContext.Data.LoadFromEnumerable( 47var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (5)
43IDataView shuffledFullImagesDataset = mlContext.Data.ShuffleRows( 61IDataView trainDataset = trainTestData.TrainSet; 62IDataView testDataset = trainTestData.TestSet; 153IDataView testDataset, ITransformer trainedModel) 159IDataView predictions = trainedModel.Transform(testDataset);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (4)
47IDataView trainDataset = mlContext.Data. 66IDataView testDataset = mlContext.Data. 179IDataView testDataset, ITransformer trainedModel) 185IDataView predictions = trainedModel.Transform(testDataset);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (5)
42IDataView shuffledFullImagesDataset = mlContext.Data.ShuffleRows( 60IDataView trainDataset = trainTestData.TrainSet; 61IDataView testDataset = trainTestData.TestSet; 177IDataView testDataset, ITransformer trainedModel) 183IDataView predictions = trainedModel.Transform(testDataset);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (5)
42IDataView shuffledFullImagesDataset = mlContext.Data.ShuffleRows( 60IDataView trainDataset = trainTestData.TrainSet; 61IDataView testDataset = trainTestData.TestSet; 162IDataView testDataset, ITransformer trainedModel) 168IDataView predictions = trainedModel.Transform(testDataset);
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropy.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 40var testData = mlContext.Data 44var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropyWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 48var testData = mlContext.Data 52var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\LightGbm.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 43var testData = mlContext.Data 47var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\LightGbmWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 53var testData = mlContext.Data 57var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\LogLossPerClass.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 40var testData = mlContext.Data 44var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\NaiveBayes.cs (3)
30var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 46var testData = mlContext.Data 50var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\OneVersusAll.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 41var testData = mlContext.Data 45var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\PairwiseCoupling.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 41var testData = mlContext.Data 45var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportance.cs (2)
21var data = mlContext.Data.LoadFromEnumerable(samples); 39var transformedData = model.Transform(data);
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportanceLoadFromDisk.cs (2)
24var data = mlContext.Data.LoadFromEnumerable(samples); 47var transformedData = model.Transform(data);
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropy.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 48var testData = mlContext.Data 52var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropyWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 57var testData = mlContext.Data 61var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibrated.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 48var testData = mlContext.Data 52var transformedTestData = model.Transform(testData);
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibratedWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 57var testData = mlContext.Data 61var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Ranking\FastTree.cs (4)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 37var testData = mlContext.Data.LoadFromEnumerable( 41var transformedTestData = model.Transform(testData); 44var topTransformedTestData = mlContext.Data.TakeRows(
Dynamic\Trainers\Ranking\FastTreeWithOptions.cs (4)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 51var testData = mlContext.Data.LoadFromEnumerable( 55var transformedTestData = model.Transform(testData); 58var topTransformedTestData = mlContext.Data.TakeRows(
Dynamic\Trainers\Ranking\LightGbm.cs (4)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 37var testData = mlContext.Data.LoadFromEnumerable( 41var transformedTestData = model.Transform(testData); 44var topTransformedTestData = mlContext.Data.TakeRows(
Dynamic\Trainers\Ranking\LightGbmWithOptions.cs (4)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 52var testData = mlContext.Data.LoadFromEnumerable( 56var transformedTestData = model.Transform(testData); 59var topTransformedTestData = mlContext.Data.TakeRows(
Dynamic\Trainers\Ranking\PermutationFeatureImportance.cs (2)
21var data = mlContext.Data.LoadFromEnumerable(samples); 39var transformedData = model.Transform(data);
Dynamic\Trainers\Ranking\PermutationFeatureImportanceLoadFromDisk.cs (2)
23var data = mlContext.Data.LoadFromEnumerable(samples); 46var transformedData = model.Transform(data);
Dynamic\Trainers\Recommendation\MatrixFactorization.cs (2)
31var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 43var transformedData = model.Transform(trainingData);
Dynamic\Trainers\Recommendation\MatrixFactorizationWithOptions.cs (2)
32var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 67var transformedData = model.Transform(trainingData);
Dynamic\Trainers\Recommendation\OneClassMatrixFactorizationWithOptions.cs (2)
37var dataView = mlContext.Data.LoadFromEnumerable(data); 74var prediction = model.Transform(mlContext.Data.LoadFromEnumerable(
Dynamic\Trainers\Regression\FastForest.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 39var testData = mlContext.Data.LoadFromEnumerable( 43var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\FastForestWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 52var testData = mlContext.Data.LoadFromEnumerable( 56var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\FastTree.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 39var testData = mlContext.Data.LoadFromEnumerable( 43var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\FastTreeTweedie.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 39var testData = mlContext.Data.LoadFromEnumerable( 43var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\FastTreeTweedieWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 54var testData = mlContext.Data.LoadFromEnumerable( 58var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\FastTreeWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 55var testData = mlContext.Data.LoadFromEnumerable( 59var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\Gam.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 39var testData = mlContext.Data.LoadFromEnumerable( 43var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\GamAdvanced.cs (3)
24var data = mlContext.Data.LoadFromEnumerable(samples); 28var trainSet = dataSets.TrainSet; 29var validSet = dataSets.TestSet;
Dynamic\Trainers\Regression\GamWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 50var testData = mlContext.Data.LoadFromEnumerable( 54var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\GamWithOptionsAdvanced.cs (3)
25var data = mlContext.Data.LoadFromEnumerable(samples); 29var trainSet = dataSets.TrainSet; 30var validSet = dataSets.TestSet;
Dynamic\Trainers\Regression\LbfgsPoissonRegression.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 37var testData = mlContext.Data.LoadFromEnumerable( 41var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\LbfgsPoissonRegressionWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 51var testData = mlContext.Data.LoadFromEnumerable( 55var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\LightGbm.cs (3)
27var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 40var testData = mlContext.Data.LoadFromEnumerable( 44var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\LightGbmAdvanced.cs (2)
20var dataView = Microsoft.ML.SamplesUtils.DatasetUtils 61var dataWithPredictions = model.Transform(split.TestSet);
Dynamic\Trainers\Regression\LightGbmWithOptions.cs (3)
28var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 59var testData = mlContext.Data.LoadFromEnumerable( 63var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\LightGbmWithOptionsAdvanced.cs (2)
21var dataView = Microsoft.ML.SamplesUtils.DatasetUtils.LoadHousingRegressionDataset(mlContext); 70var dataWithPredictions = model.Transform(split.TestSet);
Dynamic\Trainers\Regression\OnlineGradientDescent.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 36var testData = mlContext.Data.LoadFromEnumerable( 40var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\OnlineGradientDescentWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 51var testData = mlContext.Data.LoadFromEnumerable( 55var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\OrdinaryLeastSquares.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 36var testData = mlContext.Data.LoadFromEnumerable( 40var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\OrdinaryLeastSquaresAdvanced.cs (2)
31var dataView = mlContext.Data.LoadFromTextFile(dataFile, 63var dataWithPredictions = model.Transform(split.TestSet);
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 48var testData = mlContext.Data.LoadFromEnumerable( 52var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptionsAdvanced.cs (2)
31var dataView = mlContext.Data.LoadFromTextFile(dataFile, 67var dataWithPredictions = model.Transform(split.TestSet);
Dynamic\Trainers\Regression\PermutationFeatureImportance.cs (2)
21var data = mlContext.Data.LoadFromEnumerable(samples); 38var transformedData = model.Transform(data);
Dynamic\Trainers\Regression\PermutationFeatureImportanceLoadFromDisk.cs (2)
23var data = mlContext.Data.LoadFromEnumerable(samples); 45var transformedData = model.Transform(data);
Dynamic\Trainers\Regression\Sdca.cs (3)
24var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 36var testData = mlContext.Data.LoadFromEnumerable( 40var transformedTestData = model.Transform(testData);
Dynamic\Trainers\Regression\SdcaWithOptions.cs (3)
25var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 52var testData = mlContext.Data.LoadFromEnumerable( 56var transformedTestData = model.Transform(testData);
Dynamic\Transforms\ApplyOnnxModel.cs (2)
26var data = mlContext.Data.LoadFromEnumerable(samples); 30var transformedValues = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\ApplyONNXModelWithInMemoryImages.cs (2)
34var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 50var onnx = model.Transform(dataView);
Dynamic\Transforms\ApproximatedKernelMap.cs (2)
28var data = mlContext.Data.LoadFromEnumerable(samples); 39var transformedData = tansformer.Transform(data);
Dynamic\Transforms\CalculateFeatureContribution.cs (3)
21var data = mlContext.Data.LoadFromEnumerable(samples); 33var transformedData = transformer.Transform(data); 49var simpleScoredDataset = linearModel.Transform(mlContext.Data
Dynamic\Transforms\CalculateFeatureContributionCalibrated.cs (3)
21var data = mlContext.Data.LoadFromEnumerable(samples); 33var transformedData = transformer.Transform(data); 51var simpleScoredDataset = linearModel.Transform(mlContext.Data
Dynamic\Transforms\Categorical\OneHotEncoding.cs (3)
27IDataView data = mlContext.Data.LoadFromEnumerable(samples); 34IDataView oneHotEncodedData = pipeline.Fit(data).Transform(data); 74private static void PrintDataColumn(IDataView transformedData,
Dynamic\Transforms\Categorical\OneHotEncodingMultiColumn.cs (2)
25IDataView data = mlContext.Data.LoadFromEnumerable(samples); 38IDataView transformedData =
Dynamic\Transforms\Categorical\OneHotHashEncoding.cs (4)
27IDataView data = mlContext.Data.LoadFromEnumerable(samples); 34IDataView hashEncodedData = pipeline.Fit(data).Transform(data); 52IDataView hashKeyEncodedData = keyPipeline.Fit(data).Transform(data); 74private static void PrintDataColumn(IDataView transformedData,
Dynamic\Transforms\Categorical\OneHotHashEncodingMultiColumn.cs (2)
25IDataView data = mlContext.Data.LoadFromEnumerable(samples); 39IDataView transformedData =
Dynamic\Transforms\Concatenate.cs (2)
39var dataview = mlContext.Data.LoadFromEnumerable(samples); 55var transformedData = pipeline.Fit(dataview).Transform(dataview);
Dynamic\Transforms\Conversion\ConvertType.cs (2)
20var data = mlContext.Data.LoadFromEnumerable(rawData); 28var transformedData = transformer.Transform(data);
Dynamic\Transforms\Conversion\ConvertTypeMultiColumn.cs (2)
37var data = mlContext.Data.LoadFromEnumerable(rawData); 54var transformedData = transformer.Transform(data);
Dynamic\Transforms\Conversion\Hash.cs (2)
25var data = mlContext.Data.LoadFromEnumerable(rawData); 50var transformedData = transformer.Transform(data);
Dynamic\Transforms\Conversion\HashWithOptions.cs (2)
27var data = mlContext.Data.LoadFromEnumerable(rawData); 64var transformedData = transformer.Transform(data);
Dynamic\Transforms\Conversion\KeyToValueToKey.cs (3)
26var trainData = mlContext.Data.LoadFromEnumerable(rawData); 48var transformedDataDefault = defaultPipeline.Fit(trainData).Transform( 51var transformedDataCustomized = customizedPipeline.Fit(trainData)
Dynamic\Transforms\Conversion\MapKeyToBinaryVector.cs (2)
32var data = mlContext.Data.LoadFromEnumerable(rawData); 39IDataView transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\Conversion\MapKeyToValueMultiColumn.cs (3)
27var dataView = mlContext.Data.LoadFromEnumerable(examples); 39var dataWithPredictions = pipeline.Fit(dataView).Transform(dataView); 54var transformedData = newPipeline.Fit(dataWithPredictions).Transform(
Dynamic\Transforms\Conversion\MapKeyToVector.cs (2)
29var data = mlContext.Data.LoadFromEnumerable(rawData); 52IDataView transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\Conversion\MapKeyToVectorMultiColumn.cs (2)
31var data = mlContext.Data.LoadFromEnumerable(rawData); 40IDataView transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\Conversion\MapValue.cs (2)
28var data = mlContext.Data.LoadFromEnumerable(rawData); 67IDataView transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\Conversion\MapValueIdvLookup.cs (3)
29var data = mlContext.Data.LoadFromEnumerable(rawData); 42var lookupIdvMap = mlContext.Data.LoadFromEnumerable(lookupData); 51IDataView transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\Conversion\MapValueToArray.cs (2)
31var data = mlContext.Data.LoadFromEnumerable(rawData); 48IDataView transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\Conversion\MapValueToKeyMultiColumn.cs (3)
27var data = mlContext.Data.LoadFromEnumerable(rawData); 38IDataView transformedData = pipeline.Fit(data).Transform(data); 78var lookupIdvMap = mlContext.Data.LoadFromEnumerable(lookupData);
Dynamic\Transforms\CopyColumns.cs (2)
38var dataview = mlContext.Data.LoadFromEnumerable(samples); 52var transformedData = pipeline.Fit(dataview).Transform(dataview);
Dynamic\Transforms\CustomMapping.cs (2)
27var data = mlContext.Data.LoadFromEnumerable(samples); 45var transformedData = transformer.Transform(data);
Dynamic\Transforms\CustomMappingSaveAndLoad.cs (2)
30var data = mlContext.Data.LoadFromEnumerable(samples); 61var transformedData = loadedTransform.Transform(data);
Dynamic\Transforms\CustomMappingWithInMemoryCustomType.cs (2)
29var tribeDataView = mlContext.Data.LoadFromEnumerable(tribe); 34var tribeTransformed = model.Transform(tribeDataView);
Dynamic\Transforms\DropColumns.cs (2)
38var dataview = mlContext.Data.LoadFromEnumerable(samples); 47var transformedData = pipeline.Fit(dataview).Transform(dataview);
Dynamic\Transforms\Expression.cs (2)
29var dataview = mlContext.Data.LoadFromEnumerable(samples); 42var transformedData = pipeline.Fit(dataview).Transform(dataview);
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnCount.cs (2)
31var data = mlContext.Data.LoadFromEnumerable(rawData); 44var transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnCountMultiColumn.cs (2)
31var data = mlContext.Data.LoadFromEnumerable(rawData); 44var transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnMutualInformation.cs (2)
31var data = mlContext.Data.LoadFromEnumerable(rawData); 42var transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\FeatureSelection\SelectFeaturesBasedOnMutualInformationMultiColumn.cs (2)
31var data = mlContext.Data.LoadFromEnumerable(rawData); 45var transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScale.cs (3)
34var data = mlContext.Data.CreateTextLoader(new TextLoader.Options() 50var transformedData = pipeline.Fit(data).Transform(data); 60private static void PrintColumns(IDataView transformedData)
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScaleInMemory.cs (2)
21var data = mlContext.Data.LoadFromEnumerable(images); 30var transformedData = model.Transform(data);
Dynamic\Transforms\ImageAnalytics\ConvertToImage.cs (3)
29var data = mlContext.Data.LoadFromEnumerable(dataPoints); 36var transformedData = pipeline.Fit(data).Transform(data); 48private static void PrintColumns(IDataView transformedData)
Dynamic\Transforms\ImageAnalytics\DnnFeaturizeImage.cs (2)
33var data = mlContext.Data.CreateTextLoader(new TextLoader.Options() 56var transformedData = pipeline.Fit(data).Transform(data);
Dynamic\Transforms\ImageAnalytics\ExtractPixels.cs (3)
36var data = mlContext.Data.CreateTextLoader(new TextLoader.Options() 55var transformedData = pipeline.Fit(data).Transform(data); 67private static void PrintColumns(IDataView transformedData)
Dynamic\Transforms\ImageAnalytics\LoadImages.cs (3)
33var data = mlContext.Data.CreateTextLoader(new TextLoader.Options() 47var transformedData = pipeline.Fit(data).Transform(data); 58private static void PrintColumns(IDataView transformedData)
Dynamic\Transforms\ImageAnalytics\ResizeImages.cs (3)
33var data = mlContext.Data.CreateTextLoader(new TextLoader.Options() 49var transformedData = pipeline.Fit(data).Transform(data); 62private static void PrintColumns(IDataView transformedData)
Dynamic\Transforms\IndicateMissingValues.cs (2)
24var data = mlContext.Data.LoadFromEnumerable(samples); 36var transformedData = tansformer.Transform(data);
Dynamic\Transforms\IndicateMissingValuesMultiColumn.cs (2)
28var data = mlContext.Data.LoadFromEnumerable(samples); 44var transformedData = tansformer.Transform(data);
Dynamic\Transforms\NormalizeBinning.cs (3)
28var data = mlContext.Data.LoadFromEnumerable(samples); 46var transformedData = normalizeTransform.Transform(data); 48var fixZeroData = normalizeFixZeroTransform.Transform(data);
Dynamic\Transforms\NormalizeBinningMulticolumn.cs (2)
34var data = mlContext.Data.LoadFromEnumerable(samples); 47var transformedData = normalizeTransform.Transform(data);
Dynamic\Transforms\NormalizeGlobalContrast.cs (2)
25var data = mlContext.Data.LoadFromEnumerable(samples); 34var transformedData = tansformer.Transform(data);
Dynamic\Transforms\NormalizeLogMeanVariance.cs (3)
27var data = mlContext.Data.LoadFromEnumerable(samples); 44var transformedData = normalizeTransform.Transform(data); 46var noCdfData = normalizeNoCdfTransform.Transform(data);
Dynamic\Transforms\NormalizeLogMeanVarianceFixZero.cs (3)
26var data = mlContext.Data.LoadFromEnumerable(samples); 37var transformedData = normalizeTransform.Transform(data); 39var noCdfData = normalizeNoCdfTransform.Transform(data);
Dynamic\Transforms\NormalizeLpNorm.cs (2)
26var data = mlContext.Data.LoadFromEnumerable(samples); 35var transformedData = tansformer.Transform(data);
Dynamic\Transforms\NormalizeMeanVariance.cs (3)
27var data = mlContext.Data.LoadFromEnumerable(samples); 43var transformedData = normalizeTransform.Transform(data); 45var noCdfData = normalizeNoCdfTransform.Transform(data);
Dynamic\Transforms\NormalizeMinMax.cs (3)
25var data = mlContext.Data.LoadFromEnumerable(samples); 42var transformedData = normalizeTransform.Transform(data); 44var fixZeroData = normalizeFixZeroTransform.Transform(data);
Dynamic\Transforms\NormalizeMinMaxMulticolumn.cs (3)
42var data = mlContext.Data.LoadFromEnumerable(samples); 66var transformedData = normalizeTransform.Transform(data); 68var fixZeroData = normalizeFixZeroTransform.Transform(data);
Dynamic\Transforms\NormalizeSupervisedBinning.cs (3)
37var data = mlContext.Data.LoadFromEnumerable(samples); 60var transformedData = normalizeTransform.Transform(data); 62var fixZeroData = normalizeFixZeroTransform.Transform(data);
Dynamic\Transforms\Projection\VectorWhiten.cs (2)
22var trainData = ml.Data.LoadFromEnumerable(data); 53var transformedData = whiteningPipeline.Fit(trainData).Transform(
Dynamic\Transforms\Projection\VectorWhitenWithOptions.cs (2)
21var trainData = ml.Data.LoadFromEnumerable(data); 53var transformedData = whiteningPipeline.Fit(trainData).Transform(
Dynamic\Transforms\ReplaceMissingValues.cs (3)
28var data = mlContext.Data.LoadFromEnumerable(samples); 40var defaultTransformedData = defaultTransformer.Transform(data); 71var meanTransformedData = meanTransformer.Transform(data);
Dynamic\Transforms\ReplaceMissingValuesMultiColumn.cs (3)
32var data = mlContext.Data.LoadFromEnumerable(samples); 46var defaultTransformedData = defaultTransformer.Transform(data); 82var meanTransformedData = meanTransformer.Transform(data);
Dynamic\Transforms\SelectColumns.cs (2)
38var dataview = mlContext.Data.LoadFromEnumerable(samples); 47var transformedData = pipeline.Fit(dataview).Transform(dataview);
Dynamic\Transforms\StatefulCustomMapping.cs (2)
28var data = mlContext.Data.LoadFromEnumerable(samples); 59var transformedData = transformer.Transform(data);
Dynamic\Transforms\Text\ApplyCustomWordEmbedding.cs (1)
23var emptyDataView = mlContext.Data.LoadFromEnumerable(emptySamples);
Dynamic\Transforms\Text\ApplyWordEmbedding.cs (1)
23var emptyDataView = mlContext.Data.LoadFromEnumerable(emptySamples);
Dynamic\Transforms\Text\FeaturizeText.cs (1)
39var dataview = mlContext.Data.LoadFromEnumerable(samples);
Dynamic\Transforms\Text\FeaturizeTextWithOptions.cs (1)
40var dataview = mlContext.Data.LoadFromEnumerable(samples);
Dynamic\Transforms\Text\LatentDirichletAllocation.cs (1)
33var dataview = mlContext.Data.LoadFromEnumerable(samples);
Dynamic\Transforms\Text\NormalizeText.cs (1)
23var emptyDataView = mlContext.Data.LoadFromEnumerable(emptySamples);
Dynamic\Transforms\Text\ProduceHashedNgrams.cs (2)
37var dataview = mlContext.Data.LoadFromEnumerable(samples); 57var transformedDataView = textTransformer.Transform(dataview);
Dynamic\Transforms\Text\ProduceHashedWordBags.cs (2)
40var dataview = mlContext.Data.LoadFromEnumerable(samples); 56var transformedDataView = textTransformer.Transform(dataview);
Dynamic\Transforms\Text\ProduceNgrams.cs (2)
44var dataview = mlContext.Data.LoadFromEnumerable(samples); 65var transformedDataView = textTransformer.Transform(dataview);
Dynamic\Transforms\Text\ProduceWordBags.cs (2)
49var dataview = mlContext.Data.LoadFromEnumerable(samples); 62var transformedDataView = textTransformer.Transform(dataview);
Dynamic\Transforms\Text\RemoveDefaultStopWords.cs (1)
24var emptyDataView = mlContext.Data.LoadFromEnumerable(emptySamples);
Dynamic\Transforms\Text\RemoveStopWords.cs (1)
23var emptyDataView = mlContext.Data.LoadFromEnumerable(emptySamples);
Dynamic\Transforms\Text\TokenizeIntoCharactersAsKeys.cs (1)
23var emptyDataView = mlContext.Data.LoadFromEnumerable(emptySamples);
Dynamic\Transforms\Text\TokenizeIntoWords.cs (1)
23var emptyDataView = mlContext.Data.LoadFromEnumerable(emptySamples);
Dynamic\Transforms\TimeSeries\DetectAnomalyBySrCnn.cs (1)
34var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TimeSeries\DetectAnomalyBySrCnnBatchPrediction.cs (2)
30var dataView = ml.Data.LoadFromEnumerable(data); 37var transformedData = ml.Transforms.DetectAnomalyBySrCnn(
Dynamic\Transforms\TimeSeries\DetectChangePointBySsa.cs (1)
50var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TimeSeries\DetectChangePointBySsaBatchPrediction.cs (2)
54var dataView = ml.Data.LoadFromEnumerable(data); 61var transformedData = ml.Transforms.DetectChangePointBySsa(
Dynamic\Transforms\TimeSeries\DetectChangePointBySsaStream.cs (1)
50var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TimeSeries\DetectEntireAnomalyBySrCnn.cs (2)
31var dataView = ml.Data.LoadFromEnumerable(data); 38var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName,
Dynamic\Transforms\TimeSeries\DetectIidChangePoint.cs (1)
50var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TimeSeries\DetectIidChangePointBatchPrediction.cs (2)
48var dataView = ml.Data.LoadFromEnumerable(data); 55var transformedData = ml.Transforms.DetectIidChangePoint(
Dynamic\Transforms\TimeSeries\DetectIidSpike.cs (1)
42var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TimeSeries\DetectIidSpikeBatchPrediction.cs (2)
40var dataView = ml.Data.LoadFromEnumerable(data); 47var transformedData = ml.Transforms.DetectIidSpike(outputColumnName,
Dynamic\Transforms\TimeSeries\DetectSeasonality.cs (1)
21var dataView = mlContext.Data.LoadFromEnumerable(seasonalData);
Dynamic\Transforms\TimeSeries\DetectSpikeBySsa.cs (1)
48var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TimeSeries\DetectSpikeBySsaBatchPrediction.cs (2)
56var dataView = ml.Data.LoadFromEnumerable(data); 63var transformedData = ml.Transforms.DetectSpikeBySsa(outputColumnName,
Dynamic\Transforms\TimeSeries\Forecasting.cs (1)
42var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TimeSeries\ForecastingWithConfidenceInterval.cs (1)
42var dataView = ml.Data.LoadFromEnumerable(data);
Dynamic\Transforms\TreeFeaturization\FastForestBinaryFeaturizationWithOptions.cs (2)
27var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 78var transformed = model.Transform(dataView);
Dynamic\Transforms\TreeFeaturization\FastForestRegressionFeaturizationWithOptions.cs (2)
27var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 79var transformed = model.Transform(dataView);
Dynamic\Transforms\TreeFeaturization\FastTreeBinaryFeaturizationWithOptions.cs (2)
27var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 80var transformed = model.Transform(dataView);
Dynamic\Transforms\TreeFeaturization\FastTreeRankingFeaturizationWithOptions.cs (2)
27var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 76var transformed = model.Transform(dataView);
Dynamic\Transforms\TreeFeaturization\FastTreeRegressionFeaturizationWithOptions.cs (2)
27var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 79var transformed = model.Transform(dataView);
Dynamic\Transforms\TreeFeaturization\FastTreeTweedieFeaturizationWithOptions.cs (2)
27var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 79var transformed = model.Transform(dataView);
Dynamic\Transforms\TreeFeaturization\PretrainedTreeEnsembleFeaturizationWithOptions.cs (3)
27var dataView = mlContext.Data.LoadFromEnumerable(dataPoints); 51var predicted = model.Transform(dataView); 69var transformed = treeFeaturizer.Transform(dataView);
Dynamic\WithOnFitDelegate.cs (1)
36var data = mlContext.Data.LoadFromEnumerable(samples);
Microsoft.ML.Samples.GPU (23)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (2)
39var idv = mlContext.Data.LoadFromEnumerable(data); 49var transformedValues = estimator.Transform(idv);
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (2)
42var dataView = mlContext.Data.LoadFromEnumerable(data); 45var lookupMap = mlContext.Data.LoadFromTextFile(Path.Combine(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (5)
43IDataView shuffledFullImagesDataset = mlContext.Data.ShuffleRows( 61IDataView trainDataset = trainTestData.TrainSet; 62IDataView testDataset = trainTestData.TestSet; 153IDataView testDataset, ITransformer trainedModel) 159IDataView predictions = trainedModel.Transform(testDataset);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (4)
47IDataView trainDataset = mlContext.Data. 66IDataView testDataset = mlContext.Data. 179IDataView testDataset, ITransformer trainedModel) 185IDataView predictions = trainedModel.Transform(testDataset);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (5)
42IDataView shuffledFullImagesDataset = mlContext.Data.ShuffleRows( 60IDataView trainDataset = trainTestData.TrainSet; 61IDataView testDataset = trainTestData.TestSet; 177IDataView testDataset, ITransformer trainedModel) 183IDataView predictions = trainedModel.Transform(testDataset);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (5)
42IDataView shuffledFullImagesDataset = mlContext.Data.ShuffleRows( 60IDataView trainDataset = trainTestData.TrainSet; 61IDataView testDataset = trainTestData.TestSet; 162IDataView testDataset, ITransformer trainedModel) 168IDataView predictions = trainedModel.Transform(testDataset);
Microsoft.ML.Samples.OneDal (23)
Program.cs (23)
14public static IDataView[] LoadData( 18List<IDataView> dataList = new List<IDataView>(); 49public static string[] GetFeaturesArray(IDataView data, string labelName = "target") 64public static double[] RunRandomForestClassification(MLContext mlContext, IDataView trainingData, IDataView testingData, string labelName, int numberOfTrees, int numberOfLeaves) 68var preprocessedTrainingData = preprocessingPipeline.Fit(trainingData).Transform(trainingData); 69var preprocessedTestingData = preprocessingPipeline.Fit(trainingData).Transform(testingData); 83IDataView trainingPredictions = model.Transform(preprocessedTrainingData); 85IDataView testingPredictions = model.Transform(preprocessedTestingData); 96public static double[] RunRandomForestRegression(MLContext mlContext, IDataView trainingData, IDataView testingData, string labelName, int numberOfTrees, int numberOfLeaves) 100var preprocessedTrainingData = preprocessingPipeline.Fit(trainingData).Transform(trainingData); 101var preprocessedTestingData = preprocessingPipeline.Fit(trainingData).Transform(testingData); 115IDataView trainingPredictions = model.Transform(preprocessedTrainingData); 117IDataView testingPredictions = model.Transform(preprocessedTestingData); 128public static double[] RunOLSRegression(MLContext mlContext, IDataView trainingData, IDataView testingData, string labelName) 132var preprocessedTrainingData = preprocessingPipeline.Fit(trainingData).Transform(trainingData); 133var preprocessedTestingData = preprocessingPipeline.Fit(trainingData).Transform(testingData); 143IDataView trainingPredictions = model.Transform(preprocessedTrainingData); 145IDataView testingPredictions = model.Transform(preprocessedTestingData); 168IDataView[] data = LoadData(mlContext, args[0], args[1], args[2]);
Microsoft.ML.SamplesUtils (8)
SamplesDatasetUtils.cs (8)
44public static IDataView LoadHousingRegressionDataset(MLContext mlContext) 70var data = loader.Load(dataFile); 88public static IDataView LoadFeaturizedAdultDataset(MLContext mlContext) 107var data = LoadRawAdultDataset(mlContext); 108var featurizedData = pipeline.Fit(data).Transform(data); 120public static IDataView LoadRawAdultDataset(MLContext mlContext) 225/// calling <see cref="DataOperationsCatalog.CreateEnumerable{TRow}(IDataView, bool, bool, SchemaDefinition)"/> via on <see cref="MLContext"/>. 236/// calling <see cref="DataOperationsCatalog.CreateEnumerable{TRow}(IDataView, bool, bool, SchemaDefinition)"/> via on <see cref="MLContext"/>.
Microsoft.ML.StandardTrainers (23)
FactorizationMachine\FactorizationMachineTrainer.cs (3)
588public FieldAwareFactorizationMachinePredictionTransformer Fit(IDataView trainData, 589IDataView validationData = null, FieldAwareFactorizationMachineModelParameters modelParameters = null) 615public FieldAwareFactorizationMachinePredictionTransformer Fit(IDataView input) => Fit(input, null, null);
Standard\LogisticRegression\LogisticRegression.cs (1)
187public BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, LinearModelParameters modelParameters)
Standard\LogisticRegression\MulticlassLogisticRegression.cs (2)
390public MulticlassPredictionTransformer<MaximumEntropyModelParameters> Fit(IDataView trainData, MaximumEntropyModelParameters modelParameters) 1094IDataView ICanGetSummaryAsIDataView.GetSummaryDataView(RoleMappedSchema schema)
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (3)
91private protected IDataView MapLabelsCore<T>(DataViewType type, InPredicate<T> equalsTarget, RoleMappedData data) 100IDataView dataView = data.Data; 191public abstract TTransformer Fit(IDataView input);
Standard\MulticlassClassification\OneVersusAllTrainer.cs (3)
165var view = MapLabels(data, cls); 191private IDataView MapLabels(RoleMappedData data, int cls) 210public override MulticlassPredictionTransformer<OneVersusAllModelParameters> Fit(IDataView input)
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (3)
151var view = MapLabels(data, cls1, cls2); 164private IDataView MapLabels(RoleMappedData data, int cls1, int cls2) 186public override TTransformer Fit(IDataView input)
Standard\Online\OnlineLinear.cs (1)
308public TTransformer Fit(IDataView trainData, LinearModelParameters modelParameters)
Standard\PoissonRegression\PoissonRegression.cs (1)
134public RegressionPredictionTransformer<PoissonRegressionModelParameters> Fit(IDataView trainData, LinearModelParameters linearModel)
Standard\SdcaBinary.cs (3)
100var idvToShuffle = examples.Data; 101IDataView idvToFeedTrain; 2013public BinaryPredictionTransformer<TModel> Fit(IDataView trainData, LinearModelParameters modelParameters)
Standard\Simple\SimpleTrainers.cs (1)
243public BinaryPredictionTransformer<PriorModelParameters> Fit(IDataView input)
Standard\StochasticTrainerBase.cs (2)
64var idvToShuffle = examples.Data; 65IDataView idvToFeedTrain;
Microsoft.ML.Sweeper (1)
Algorithms\SmacSweeper.cs (1)
129IDataView view = dvBuilder.GetDataView();
Microsoft.ML.TensorFlow (7)
TensorflowTransform.cs (7)
190internal static IDataTransform Create(IHostEnvironment env, TensorFlowEstimator.Options options, IDataView input) 201internal TensorFlowTransformer(IHostEnvironment env, TensorFlowEstimator.Options options, IDataView input) 206internal TensorFlowTransformer(IHostEnvironment env, TensorFlowEstimator.Options options, TensorFlowModel tensorFlowModel, IDataView input, IDataView validationSet = null) 245private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 288bool addBatchDimensionInput, int batchSize = 1, TensorFlowEstimator.Options options = null, IDataView input = null, bool treatOutputAsBatched = true) 1056public TensorFlowTransformer Fit(IDataView input)
Microsoft.ML.TensorFlow.Tests (85)
TensorFlowEstimatorTests.cs (13)
64var dataView = ML.Data.LoadFromEnumerable( 84var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 85var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData); 86var invalidDataWrongVectorSize = ML.Data.LoadFromEnumerable(sizeData); 105var dataView = ML.Data.LoadFromEnumerable( 126var result = transformer.Transform(dataView); 132var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 156var data = ML.Data.LoadFromTextFile(dataFile, new[] { 170var result = model.Transform(data); 198var data = ML.Data.LoadFromTextFile(dataFile, new[] { 249var data = ML.Data.LoadFromTextFile(dataFile, new[] { 263var result = model.Transform(data); 295private void ValidateTensorFlowTransformer(IDataView result)
TensorflowTests.cs (72)
159var predictions = transformer.Transform(data); 188var loader = _mlContext.Data.LoadFromEnumerable( 201var idv = trans.Transform(loader); 287var loader = _mlContext.Data.LoadFromEnumerable(data); 293var idv = trans.Transform(loader); 409var loader = _mlContext.Data.LoadFromEnumerable(data); 415var idv = trans.Transform(loader); 506var images = new ImageLoadingTransformer(_mlContext, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 507var cropped = new ImageResizingTransformer(_mlContext, "ImageCropped", 32, 32, "ImageReal").Transform(images); 509var pixels = _mlContext.Transforms.ExtractPixels("image_tensor", "ImageCropped", outputAsFloatArray: false).Fit(cropped).Transform(cropped); 511var tf = tfModel.ScoreTensorFlowModel(new[] { "detection_boxes", "detection_scores", "num_detections", "detection_classes" }, new[] { "image_tensor" }).Fit(pixels).Transform(pixels); 552var data = reader.Load(new MultiFileSource(dataFile)); 553var images = _mlContext.Transforms.LoadImages("ImageReal", "ImagePath", imageFolder).Fit(data).Transform(data); 554var cropped = _mlContext.Transforms.ResizeImages("ImageCropped", 224, 224, "ImageReal").Fit(images).Transform(images); 555var pixels = _mlContext.Transforms.ExtractPixels(inputName, "ImageCropped", interleavePixelColors: true).Fit(cropped).Transform(cropped); 557var tf = tfModel.ScoreTensorFlowModel(outputName, inputName, true).Fit(pixels).Transform(pixels); 665var trainData = reader.Load(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); 666var testData = reader.Load(GetDataPath(TestDatasets.mnistOneClass.testFilename)); 674var predicted = trainedModel.Transform(testData); 706var trainData = reader.Load(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); 707var testData = reader.Load(GetDataPath(TestDatasets.mnistOneClass.testFilename)); 796var trainData = reader.Load(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); 797var testData = reader.Load(GetDataPath(TestDatasets.mnistOneClass.testFilename)); 799IDataView preprocessedTrainData = null; 800IDataView preprocessedTestData = null; 850var predicted = trainedModel.Transform(preprocessedTestData); 889var trainData = reader.Load(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); 890var testData = reader.Load(GetDataPath(TestDatasets.mnistOneClass.testFilename)); 898var predicted = trainedModel.Transform(testData); 1011var data = _mlContext.Data.LoadFromTextFile(dataFile, 1026var pixels = pipeEstimator.Fit(data).Transform(data); 1028IDataView idv = trans.Transform(pixels); 1070var data = _mlContext.Data.LoadFromTextFile(dataFile, columns: new[] 1076var images = _mlContext.Transforms.LoadImages("ImageReal", imageFolder, "ImagePath").Fit(data).Transform(data); 1077var cropped = _mlContext.Transforms.ResizeImages("ImageCropped", imageWidth, imageHeight, "ImageReal").Fit(images).Transform(images); 1078var pixels = _mlContext.Transforms.ExtractPixels("Input", "ImageCropped", interleavePixelColors: true).Fit(cropped).Transform(cropped); 1080IDataView idv = trans.Transform(pixels); 1115var dataView = _mlContext.Data.LoadFromEnumerable<InMemoryImage>(dataObjects); 1169var transformedData = transformer.Transform(data); 1223var data = _mlContext.Data.LoadFromTextFile(dataFile, 1230var images = new ImageLoadingTransformer(_mlContext, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 1231var cropped = new ImageResizingTransformer(_mlContext, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 1232var pixels = new ImagePixelExtractingTransformer(_mlContext, "Input", "ImageCropped").Transform(cropped); 1238IDataView trans = model.ScoreTensorFlowModel("Output", "Input").Fit(pixels).Transform(pixels); 1264var dataView = _mlContext.Data.LoadFromEnumerable(data); 1266var lookupMap = _mlContext.Data.LoadFromTextFile(@"sentiment_model/imdb_word_index.csv", 1348var dataview = _mlContext.Data.CreateTextLoader<TextInput>().Load(new MultiFileSource(null)); 1377var dataview = _mlContext.Data.CreateTextLoader<PrimitiveInput>().Load(new MultiFileSource(null)); 1403IDataView shuffledFullImagesDataset = _mlContext.Data.ShuffleRows( 1415IDataView trainDataset = trainTestData.TrainSet; 1416IDataView testDataset = trainTestData.TestSet; 1433IDataView predictions = trainedModel.Transform(testDataset); 1478IDataView shuffledFullImagesDataset = _mlContext.Data.ShuffleRows( 1490IDataView trainDataset = trainTestData.TrainSet; 1491IDataView testDataset = trainTestData.TestSet; 1492var validationSet = _mlContext.Transforms.LoadRawImageBytes("Image", _fullImagesetFolderPath, "ImagePath") 1536IDataView predictions = trainedModel.Transform(testDataset); 1610IDataView shuffledFullImagesDataset = _mlContext.Data.ShuffleRows( 1622IDataView trainDataset = trainTestData.TrainSet; 1623IDataView testDataset = trainTestData.TestSet; 1624var validationSet = _mlContext.Transforms.LoadRawImageBytes("Image", _fullImagesetFolderPath, "ImagePath") 1695IDataView predictions = trainedModel.Transform(testDataset); 1765IDataView shuffledFullImagesDataset = _mlContext.Data.ShuffleRows( 1777IDataView trainDataset = trainTestData.TrainSet; 1778IDataView testDataset = trainTestData.TestSet; 1781var validationSet = _mlContext.Transforms.LoadRawImageBytes("Image", _fullImagesetFolderPath, "ImagePath") 1825IDataView predictions = trainedModel.Transform(testDataset); 1854IDataView shuffledFullImagesDataset = _mlContext.Data.ShuffleRows( 1867IDataView trainDataset = trainTestData.TrainSet; 1868IDataView testDataset = trainTestData.TestSet; 1896IDataView predictions = trainedModel.Transform(testDataset); 2053IDataView data = _mlContext.Data.LoadFromTextFile(dataFile, new[] {
Microsoft.ML.TestFramework (40)
BaseTestBaseline.cs (4)
696public void CompareResults(string leftColumnName, string rightColumnName, IDataView left, IDataView right, int precision = 6, bool isRightColumnOnnxScalar = false) 727private void CompareSelectedColumns<T>(string leftColumnName, string rightColumnName, IDataView left, IDataView right, int precision = 6, bool isRightColumnOnnxScalar = false)
DataPipe\TestDataPipe.cs (14)
833IDataView view2 = TextLoader.Create(Env, argsText, new MultiFileSource(dataPath)); 858IDataView view1 = ML.Transforms.SelectColumns(colsChoose).Fit(pipe).Transform(pipe); 1114var srcView = builder.GetDataView(); 1116var hashTransform = new HashingTransformer(Env, new HashingEstimator.ColumnOptions("F1", "F1", 5, 42)).Transform(srcView); 1146var srcView = builder.GetDataView(); 1147var hashTransform = new HashingTransformer(Env, new HashingEstimator.ColumnOptions("F1V", "F1V", 5, 42)).Transform(srcView); 1189IDataView view = builder.GetDataView(); 1263IDataView view = builder.GetDataView(); 1275IDataView view = builder.GetDataView(0); 1298IDataView view = builder.GetDataView(100); 1545var srcView = builder.GetDataView(); 1553var transformedData = ldaTransformer.Transform(srcView); 1603var srcView = builder.GetDataView(); 1606var lda = ML.Transforms.Text.LatentDirichletAllocation("Zeros").Fit(srcView).Transform(srcView);
DataPipe\TestDataPipeBase.cs (18)
34IDataView validFitInput, IDataView validTransformInput = null, IDataView invalidInput = null, IDataView validForFitNotValidForTransformInput = null, bool shouldDispose = false) 92Action<IDataView> checkOnData = (IDataView data) => 113var scoredTrain = transformer.Transform(data); 114var scoredTrain2 = loadedTransformer.Transform(data); 195IDataView srcLoader = null; 201var reappliedPipe = ApplyTransformUtils.ApplyAllTransformsToData(_env, comp.View, srcLoader); 263var newPipe = ApplyTransformUtils.ApplyAllTransformsToData(_env, comp.View, cachedData); 375protected bool SaveLoadText(IDataView view, IHostEnvironment env, 424var loadedData = ML.Data.LoadFromTextFile(pathData, options: args); 522protected bool SaveLoad(IDataView view, IHostEnvironment env, string suffix = "") 569protected bool SaveLoadTransposed(IDataView view, IHostEnvironment env, string suffix = "") 652protected bool CheckSameValues(IDataView view1, IDataView view2, bool exactTypes = true, bool exactDoubles = true, bool checkId = true) 782protected bool CheckSameValues(DataViewRowCursor curs1, IDataView view2, bool exactTypes = true, bool exactDoubles = true, bool checkId = true)
TestCommandBase.cs (2)
536IDataView pipe; 541ModelLoadContext.LoadModel<IDataView, SignatureLoadDataLoader>(env,
TestSparseDataView.cs (2)
51var data = env.Data.LoadFromEnumerable(inputs); 91var data = env.Data.LoadFromEnumerable(inputs);
Microsoft.ML.Tests (885)
AnomalyDetectionTests.cs (10)
31var transformedData = DetectAnomalyInMnistOneClass(trainPath, testPath); 48var transformedData = DetectAnomalyInMnistOneClass(trainPath, trainPath); 151var data = mlContext.Data.LoadFromEnumerable(samples); 157var transformed = model.Transform(data); 195var data = mlContext.Data.LoadFromEnumerable(samples); 203var transformed = transformer.Transform(data); 237private IDataView DetectAnomalyInMnistOneClass(string trainPath, string testPath) 246var trainData = loader.Load(trainPath); 247var testData = loader.Load(testPath); 275var data = mlContext.Data.LoadFromEnumerable(samples);
BinaryLoaderSaverTests.cs (1)
24var data = ML.Data.LoadFromBinary(GetDataPath("schema-codec-test.idv"));
CachingTests.cs (1)
84var data = ML.Data.LoadFromEnumerable(src);
CalibratedModelParametersTests.cs (5)
26var data = GetDenseDataset(); 47var data = GetDenseDataset(); 70var data = GetDenseDataset(); 95private IDataView GetDenseDataset() 132var srcDV = bldr.GetDataView();
CollectionsDataViewTest.cs (9)
160var dataView = env.Data.LoadFromEnumerable(data); 191var dataView = env.Data.LoadFromEnumerable(data); 234var dataView = env.Data.LoadFromEnumerable(data); 260var dataView = env.Data.LoadFromEnumerable(data); 314var dataView = env.Data.LoadFromEnumerable(data); 344var dataView = env.Data.LoadFromEnumerable(data); 395var dataView = env.Data.LoadFromEnumerable(data); 446var dataView = env.Data.LoadFromEnumerable(data); 483var dataView = env.Data.LoadFromEnumerable(data);
DatabaseLoaderTests.cs (6)
65var trainingData = loader.Load(dbs); 101var trainingData = loader.Load(GetIrisDatabaseSource("SELECT Label as [My Label], SepalLength, SepalWidth, PetalLength, PetalWidth FROM {0}")); 137var trainingData = loader.Load(GetIrisDatabaseSource("SELECT * FROM {0}")); 169var trainingData = loader.Load(GetIrisDatabaseSource("SELECT * FROM {0}")); 201var trainingData = loader.Load(GetIrisDatabaseSource("SELECT * FROM {0}")); 260var data = loader.Load(source);
EvaluateTests.cs (2)
47var inputDV = mlContext.Data.LoadFromEnumerable(inputArray); 64var inputDV2 = mlContext.Data.LoadFromEnumerable(inputArray2);
FeatureContributionTests.cs (10)
30var data = GetSparseDataset(); 193IDataView data, 215IDataView data, 237private void CheckOutput(IEstimator<ITransformer> estimator, IDataView data, string testFile, int precision = 6) 243var savedData = ML.Data.TakeRows(estimator.Fit(data).Transform(data), 4); 257private IDataView GetSparseDataset(TaskType task = TaskType.Regression, int numberOfInstances = 1000) 312var srcDV = bldr.GetDataView(); 415private IDataView GetOneHotEncodedData(int numberOfInstances = 100) 418IDataView trainingDataView = ML.Data.LoadFromTextFile<TaxiTrip>(trainDataPath, hasHeader: true, separatorChar: ','); 434var someRows = ML.Data.TakeRows(trainingDataView, numberOfInstances);
ImagesTests.cs (50)
124var imagesEmptyImageFolder = new ImageLoadingTransformer(env, emptyImageFolder, ("ImageReal", "ImagePath")).Transform(data); 127var imagesNullImageFolder = new ImageLoadingTransformer(env, null, ("ImageReal", "ImagePath")).Transform(data); 130var imagesCorrectImageFolder = new ImageLoadingTransformer(env, correctImageFolder, ("ImageReal", "ImagePath")).Transform(data); 149var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 150var cropped = new ImageResizingTransformer(env, "ImageCropped", 100, 100, "ImageReal", ImageResizingEstimator.ResizingKind.IsoPad).Transform(images); 186var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 188var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 190IDataView grey = new ImageGrayscalingTransformer(env, ("ImageGrey", "ImageCropped")).Transform(cropped); 236var data = ML.Data.LoadFromEnumerable(images); 245var transformedData = model.Transform(data); 345var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 346var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 348var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", ImagePixelExtractingEstimator.ColorBits.All, interleavePixelColors: true, scaleImage: 2f / 19, offsetImage: 30).Transform(cropped); 349IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", 420var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 421var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 422var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", interleavePixelColors: true, scaleImage: 2f / 19, offsetImage: 30).Transform(cropped); 424IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", 496var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 497var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 499var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", ImagePixelExtractingEstimator.ColorBits.All, orderOfExtraction: ImagePixelExtractingEstimator.ColorsOrder.ABRG).Transform(cropped); 500IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", 571var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 572var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 573var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", ImagePixelExtractingEstimator.ColorBits.All, scaleImage: 2f / 19, offsetImage: 30).Transform(cropped); 575IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", 646var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 647var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 648var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", scaleImage: 2f / 19, offsetImage: 30).Transform(cropped); 650IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", 721var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 722var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 724var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", ImagePixelExtractingEstimator.ColorBits.All, interleavePixelColors: true).Transform(cropped); 726IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", 797var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 798var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 800var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", interleavePixelColors: true).Transform(cropped); 802IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", interleavedColors: true).Transform(pixels); 872var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 873var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 875var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped", ImagePixelExtractingEstimator.ColorBits.All).Transform(cropped); 877IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels", 948var images = new ImageLoadingTransformer(env, imageFolder, ("ImageReal", "ImagePath")).Transform(data); 949var cropped = new ImageResizingTransformer(env, "ImageCropped", imageWidth, imageHeight, "ImageReal").Transform(images); 950var pixels = new ImagePixelExtractingTransformer(env, "ImagePixels", "ImageCropped").Transform(cropped); 952IDataView backToImages = new VectorToImageConvertingTransformer(env, "ImageRestored", imageHeight, imageWidth, "ImagePixels").Transform(pixels); 1091var data = mlContext.Data.LoadFromEnumerable(dataPoints); 1129var tsvFile = mlContext.Data.LoadFromTextFile(tsvPath, columns: new[] 1182var dataView = mlContext.Data.LoadFromEnumerable<InMemoryImage>(dataObjects); 1187var resizedDV = model.Transform(dataView);
OnnxConversionTest.cs (69)
71var data = mlContext.Data.LoadFromTextFile<AdultData>(trainDataPath, 75var cachedTrainData = mlContext.Data.Cache(data); 149var data = mlContext.Data.LoadFromTextFile<BreastCancerFeatureVector>(dataPath, 182var dataView = mlContext.Data.LoadFromTextFile<AdultData>(dataPath, 222var dataView = mlContext.Data.LoadFromTextFile<BreastCancerBinaryClassification>(dataPath, separatorChar: '\t', hasHeader: false); 262var dataView = mlContext.Data.LoadFromTextFile(dataPath, new[] { 276private (IDataView, List<IEstimator<ITransformer>>, EstimatorChain<NormalizingTransformer>) GetEstimatorsForOnnxConversionTests() 280var dataView = ML.Data.LoadFromTextFile<BreastCancerBinaryClassification>(dataPath, separatorChar: '\t', hasHeader: true); 319IDataView dataSoloCalibrator = ML.Data.LoadFromEnumerable(GetCalibratorTestData()); 324IDataView dataSoloCalibratorNonStandard = ML.Data.LoadFromEnumerable(GetCalibratorTestDataNonStandard()); 386var dataView = ML.Data.LoadFromTextFile(dataPath, new[] { 423var dataView = mlContext.Data.LoadFromEnumerable(samples); 475IDataView[] dataViews = 567var data = mlContext.Data.LoadFromTextFile<AdultData>(trainDataPath, 571var cachedTrainData = mlContext.Data.Cache(data); 598var data = mlContext.Data.LoadFromTextFile<AdultData>(trainDataPath, 602var cachedTrainData = mlContext.Data.Cache(data); 624var data = mlContext.Data.LoadFromTextFile<BreastCancerMulticlassExample>(dataPath, 769var data = ML.Data.LoadFromTextFile(dataPath, new[] { 788var data = mlContext.Data.LoadFromTextFile<BreastCancerCatFeatureExample>(dataPath, 799var transformedData = model.Transform(data); 806SaveOnnxCommand.GetPipe(onnxConversionContext, conversionChannel, transformedData, out IDataView root, out IDataView sink, out transforms); 828var onnxResult = onnxTransformer.Transform(data); 851var data = mlContext.Data.LoadFromTextFile<SmallSentimentExample>(dataPath, separatorChar: '\t', hasHeader: false); 870var dataView = ML.Data.LoadFromTextFile(dataPath, new[] { 947var dataView = mlContext.Data.LoadFromTextFile(filePath, columns); 967var dataView = mlContext.Data.LoadFromTextFile(dataSource, new[] { 977var transformedData = model.Transform(dataView); 990var onnxResult = onnxTransformer.Transform(dataView); 1004var dataView = mlContext.Data.LoadFromTextFile<BreastCancerCatFeatureExample>(dataPath); 1034var data = ML.Data.LoadFromTextFile(dataFile, new[] 1074var dataView = mlContext.Data.LoadFromTextFile(dataPath, new[] { 1125var dataView = mlContext.Data.LoadFromTextFile(dataPath, new[] { 1160var dataView = mlContext.Data.LoadFromEnumerable(samples); 1200IDataView[] dataViews = 1238IDataView[] dataViews = 1402IDataView[] dataViews = 1446var dataView = mlContext.Data.LoadFromEnumerable(samples); 1474var dataView = mlContext.Data.LoadFromEnumerable(samples); 1504var transformedData = model.Transform(dataView); 1517var onnxResult = onnxTransformer.Transform(dataView); 1552var dataView = mlContext.Data.LoadFromEnumerable(samples); 1576var dataView = mlContext.Data.LoadFromEnumerable(samples); 1603var dataView = ML.Data.LoadFromTextFile(dataPath, new[] { 1613var outputData = transform.OutputData; 1618SaveOnnxCommand.GetPipe(ctx, ch, outputData, out IDataView root, out IDataView sink, out transforms); 1634var onnxResult = onnxTransformer.Transform(dataView); 1647var dataView = mlContext.Data.LoadFromTextFile<BreastCancerMulticlassExample>(dataPath, separatorChar: '\t', hasHeader: false); 1701var dataView = mlContext.Data.LoadFromTextFile<AdultData>(trainDataPath, 1719var dataView = mlContext.Data.LoadFromTextFile<AdultData>(trainDataPath, 1775var originalData = loader.Load(dataPath); 1777var mappedData = pipeline1.Fit(originalData).Transform(originalData); 1788IDataView reloadedData = mlContext.Data.LoadFromBinary(mappedDataPath); 1808var onnxResult = onnxTransformer.Transform(reloadedData); 1821var onnxResult2 = onnxTransformer2.Transform(originalData); 1847var dataView = mlContext.Data.LoadFromTextFile(dataPath, new[] { 1886var dataView = ML.Data.LoadFromTextFile(dataPath, new[] { 1933var dataView = mlContext.Data.LoadFromTextFile<BreastCancerBinaryClassificationNonDefaultColNames>(dataPath, separatorChar: '\t', hasHeader: false); 1974var dataView = mlContext.Data.LoadFromTextFile<BreastCancerMulticlassExampleNonDefaultColNames>(dataPath, separatorChar: '\t', hasHeader: false); 2025var dataView = ML.Data.LoadFromTextFile<BreastCancerCatFeatureExample>(dataPath); 2030var transformedData = model.Transform(dataView); 2186var dataView = ML.Data.LoadFromEnumerable(data, schemaDefinition); 2200private void TestPipeline(IEstimator<ITransformer> pipeline, IDataView dataView, string onnxFileName, ColumnComparison[] columnsToCompare, string onnxTxtName = null, string onnxTxtSubDir = null) 2223var dataView = ML.Data.LoadFromEnumerable(data, schemaDefinition); 2238private void TestPipeline<TLastTransformer>(EstimatorChain<TLastTransformer> pipeline, IDataView dataView, string onnxFileName, ColumnComparison[] columnsToCompare, string onnxTxtName = null, string onnxTxtSubDir = null) 2242var transformedData = model.Transform(dataView); 2256var onnxResult = onnxTransformer.Transform(dataView);
OnnxSequenceTypeWithAttributesTest.cs (2)
44var dataView = ctx.Data.LoadFromEnumerable(new List<FloatInput>()); 83var dataView = ctx.Data.LoadFromEnumerable(new List<FloatInput>());
PermutationFeatureImportanceTests.cs (15)
37var data = GetDenseDataset(); 105var data = GetDenseDataset(); 179var data = GetDenseDataset(); 267var data = GetSparseDataset(); 341var data = GetDenseDataset(TaskType.BinaryClassification); 415var data = GetSparseDataset(TaskType.BinaryClassification); 489var data = ML.Data.LoadFromTextFile(dataPath, 524var data = GetDenseDataset(TaskType.MulticlassClassification); 596var data = GetSparseDataset(TaskType.MulticlassClassification); 675var data = GetDenseDataset(TaskType.Ranking); 744var data = GetSparseDataset(TaskType.Ranking); 813private IDataView GetDenseDataset(TaskType task = TaskType.Regression) 856var srcDV = bldr.GetDataView(); 880private IDataView GetSparseDataset(TaskType task = TaskType.Regression) 936var srcDV = bldr.GetDataView();
RangeFilterTests.cs (3)
25var data = builder.GetDataView(); 27var data1 = ML.Data.FilterRowsByColumn(data, "Floats", upperBound: 2.8); 32var data2 = ML.Data.FilterRowsByKeyColumnFraction(data, "Key", upperBound: 0.15);
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (28)
41var data = mlContext.Data.LoadFromTextFile<InspectedRow>(dataPath, 51var transformedData = pipeline.Fit(data).Transform(data); 94var data = mlContext.Data.LoadFromEnumerable(samples); 151var trainData = mlContext.Data.LoadFromTextFile<RegressionData>(trainDataPath, 162var cachedTrainData = mlContext.Data.Cache(trainData); 187var testData = mlContext.Data.LoadFromTextFile<RegressionData>(testDataPath, 219var trainData = mlContext.Data.LoadFromTextFile<IrisInput>(irisDataPath, 304var trainData = mlContext.Data.LoadFromTextFile<IrisInputAllFeatures>(dataPath, 334IDataView data = context.Data.LoadFromTextFile(dataPath, new[] 357var transformedData = model.Transform(data); 374IDataView data = context.Data.LoadFromTextFile(dataPath, new[] 409IDataView data = context.Data.LoadFromTextFile(dataPath, new[] 445IDataView data = context.Data.LoadFromTextFile(dataPath, new[] 468var transfomedData = model.Transform(data); 474var featureContributionData = featureContributionCalculation.Fit(transfomedData).Transform(transfomedData); 476var shuffledSubset = context.Data.TakeRows(context.Data.ShuffleRows(featureContributionData), 10); 513var data = loader.Load(dataPath); 547var transformedData = pipeline.Fit(data).Transform(data); 587var data = loader.Load(dataPath); 603var transformedData = pipeline.Fit(data).Transform(data); 636var data = mlContext.Data.LoadFromTextFile<IrisInput>(dataPath, 685var loader = mlContext.Data.LoadFromTextFile<RegressionData>(dataPath, 706var data = mlContext.Data.LoadFromTextFile(GetDataPath("adult.tiny.with-schema.txt"), new[] 737private static void RunEndToEnd(MLContext mlContext, IDataView trainData, string modelPath) 746var cachedTrainData = mlContext.Data.Cache(trainData); 765public static IDataView PrepareData(MLContext mlContext, IDataView data) 774public static ITransformer TrainModel(MLContext mlContext, IDataView trainData)
Scenarios\Api\Estimators\DecomposableTrainAndPredict.cs (2)
31var data = ml.Data.LoadFromTextFile<IrisData>(dataPath, separatorChar: ','); 42var testLoader = ml.Data.LoadFromTextFile(dataPath, TestDatasets.irisData.GetLoaderColumns(), separatorChar: ',', hasHeader: true);
Scenarios\Api\Estimators\Extensibility.cs (2)
30var data = ml.Data.CreateTextLoader(TestDatasets.irisData.GetLoaderColumns(), separatorChar: ',') 51var testLoader = ml.Data.LoadFromTextFile(dataPath, TestDatasets.irisData.GetLoaderColumns(), separatorChar: ',');
Scenarios\Api\Estimators\MultithreadedPrediction.cs (1)
28var data = ml.Data.LoadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.trainFilename), hasHeader: true);
Scenarios\Api\Estimators\PredictAndMetadata.cs (6)
29var data = ml.Data.LoadFromTextFile<IrisData>(dataPath, separatorChar: ','); 39var testLoader = ml.Data.LoadFromTextFile(dataPath, TestDatasets.irisData.GetLoaderColumns(), separatorChar: ',', hasHeader: true); 78var data = mlContext.Data.LoadFromTextFile<IrisData>(dataPath, separatorChar: ','); 88var scoredData = model.Transform(data); 110var data2 = dataReader.Load(dataPath2); 122var scoredData2 = model2.Transform(data2);
Scenarios\Api\Estimators\SimpleTrainAndPredict.cs (2)
26var data = ml.Data.LoadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.trainFilename), hasHeader: true); 63var data = ml.Data.LoadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.trainFilename), hasHeader: true);
Scenarios\Api\Estimators\TrainWithInitialPredictor.cs (2)
25var data = ml.Data.LoadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.trainFilename), hasHeader: true); 32var trainData = ml.Data.Cache(pipeline.Fit(data).Transform(data));
Scenarios\Api\TestApi.cs (21)
69var idv1 = env.Data.LoadFromEnumerable(data1); 72var filter1 = LambdaTransform.CreateFilter<OneIChannelWithAttribute, object>(env, idv1, 82var idv2 = env.Data.LoadFromEnumerable(data2); 85var filter2 = LambdaTransform.CreateFilter<OneStringWithAttribute, object>(env, idv2, 103var idv3 = env.Data.LoadFromEnumerable(data3); 107var filter3 = LambdaTransform.CreateFilter<TwoIChannelsWithAttributes, object>(env, idv3, 128var idv4 = env.Data.LoadFromEnumerable(Utils.CreateArray(10, example4)); 130var filter4 = LambdaTransform.CreateFilter<TwoIChannelsOnlyOneWithAttribute, object>(env, idv4, 153var idv = env.Data.LoadFromEnumerable(data); 155var filter = LambdaTransform.CreateFilter<BreastCancerExample, object>(env, idv, 161var applied = env.Data.LoadFromEnumerable(data); 177IDataView xf = LambdaTransform.CreateFilter<object, object>(mlContext, loader, 183var cached = mlContext.Data.Cache(xf); 229var idv = mlContext.Data.LoadFromEnumerable(data, autoSchema); 301var fullInput = mlContext.Data.LoadFromTextFile(dataPath, new[] { 333foreach (var split in splits) 349var input = mlContext.Data.LoadFromTextFile(dataPath, new[] { 356Func<IDataView, List<string>> getWorkclass = (IDataView view) => 419var input = mlContext.Data.LoadFromEnumerable(new[] 481var inputWithKey = mlContext.Transforms.Conversion.MapValueToKey("KeyStrat", "TextStrat").Fit(input).Transform(input);
Scenarios\ClusteringTests.cs (3)
62var trainData = mlContext.Data.LoadFromEnumerable(data); 63var testData = mlContext.Data.LoadFromEnumerable(clusters); 83var predicted = trainedModel.Transform(testData);
Scenarios\GetColumnTests.cs (3)
29var data = mlContext.Data.LoadFromTextFile(path, new[] { 52var data1 = mlContext.Data.LoadFromTextFile(path, new[] { 71var data = mlContext.Data.LoadFromTextFile(path, new[] {
Scenarios\IrisPlantClassificationTests.cs (3)
42var trainData = reader.Load(dataPath); 43var testData = reader.Load(testDataPath); 87var predicted = trainedModel.Transform(testData);
Scenarios\IrisPlantClassificationWithStringLabelTests.cs (3)
32var trainData = reader.Load(dataPath); 33var testData = reader.Load(testDataPath); 89var predicted = trainedModel.Transform(testData, TransformerScope.Everything);
Scenarios\OvaTest.cs (12)
31var textData = reader.Load(GetDataPath(dataPath)); 32var data = mlContext.Data.Cache(mlContext.Transforms.Conversion.MapValueToKey("Label") 40var predictions = model.Transform(data); 65var textData = reader.Load(GetDataPath(dataPath)); 66var data = mlContext.Data.Cache(mlContext.Transforms.Conversion.MapValueToKey("Label") 76var predictions = model.Transform(data); 101var textData = reader.Load(GetDataPath(dataPath)); 102var data = mlContext.Data.Cache(mlContext.Transforms.Conversion.MapValueToKey("Label") 111var predictions = model.Transform(data); 135var textData = reader.Load(GetDataPath(dataPath)); 136var data = mlContext.Data.Cache(mlContext.Transforms.Conversion.MapValueToKey("Label") 145var predictions = model.Transform(data);
Scenarios\RegressionTest.cs (3)
19var taxiData = 25IDataView trainingDataView = context.Data.FilterRowsByColumn(splitData.TrainSet, "FareAmount", lowerBound: 1, upperBound: 150); 42var predictions = model.Transform(splitData.TestSet);
Scenarios\WordBagTest.cs (2)
30var dataview = mlContext.Data.LoadFromEnumerable(samples); 67var dataview = mlContext.Data.LoadFromEnumerable(samples);
ScenariosWithDirectInstantiation\IrisPlantClassificationTests.cs (3)
40var trainData = reader.Load(dataPath); 41var testData = reader.Load(testDataPath); 47var predicted = trainedModel.Transform(testData);
SvmLightTests.cs (18)
41private void TestSvmLight(string path, string savingPath, int inputSize, int expectedInputSize, bool zeroBased, IDataView expectedData, long? numberOfRows = null) 43var data = ML.Data.LoadFromSvmLightFile(path, inputSize: inputSize, zeroBased: zeroBased, numberOfRows: numberOfRows); 77var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[] 105var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[] 134var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[] 156var data = model.Load(path); 164var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[] 207var data = ML.Data.LoadFromSvmLightFileWithFeatureNames(path); 212var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[] 238var view = ML.Data.LoadFromSvmLightFileWithFeatureNames(path); 258var data = ML.Data.LoadFromSvmLightFile(path); 277var data = ML.Data.LoadFromSvmLightFile(path); 307var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[] 325var data = ML.Data.LoadFromSvmLightFile(path); 349var data = ML.Data.LoadFromSvmLightFile(path); 420var data = loader.Load(new MultiFileSource(path1, path2)); 464var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[] 491var expectedData = ML.Data.LoadFromEnumerable(new SvmLightOutput[]
TermEstimatorTests.cs (10)
80var data = loader.Load(dataPath); 101var dataView = ML.Data.LoadFromEnumerable(data); 107var invalidData = ML.Data.LoadFromEnumerable(xydata); 108var validFitNotValidTransformData = ML.Data.LoadFromEnumerable(stringData); 116var dataView = ML.Data.LoadFromEnumerable(data); 123var result = transformer.Transform(dataView); 129var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 138var dataView = ML.Data.LoadFromEnumerable(data); 143var result = termTransformer.Transform(dataView); 158private void ValidateTermTransformer(IDataView result)
TextLoaderTests.cs (27)
214var data = runner.GetOutput<IDataView>("data"); 288var data = runner.GetOutput<IDataView>("data"); Assert.NotNull(data); 434var data = runner.GetOutput<IDataView>("data"); 548var data = runner.GetOutput<IDataView>("data"); 597var data = mlContext.Data.LoadFromTextFile(combinedPath); 601var data2 = mlContext.Data.LoadFromTextFile<Input>(combinedPath); 612var data = loader.Load(new MultiFileSource(fileName)); 744IDataView dataIris; 765IDataView dataIrisStartEnd; 787IDataView dataIrisColumnIndices; 836IDataView iris; 903var textDataDecimalMarkerPeriod = readerDecimalMarkerPeriod.Load(GetDataPath(dataPathDecimalMarkerPeriod)); 953var textDataDecimalMarkerComma = readerDecimalMarkerComma.Load(GetDataPath(dataPathDecimalMarkerComma)); 1008var textData = reader.Load(GetDataPath(dataPath)); 1062IDataView dataViewPeriod; 1063IDataView dataViewComma; 1186var dataIris = mlContext.Data.CreateTextLoader<IrisPublicGetProperties>(separatorChar: ',').Load(dataPath); 1244var data = mlContext.Data.CreateTextLoader<BreastCancerInputModelWithKeyType>(separatorChar: ',').Load(breastCancerPath); 1256var data = mlContext.Data.CreateTextLoader<BreastCancerInputModelWithoutKeyType>(separatorChar: ',').Load(breastCancerPath); 1292var data = mlContext.Data.LoadFromTextFile(dataPath, options); 1403var data = mlContext.Data.LoadFromTextFile(filePath, options); 1454IDataView baselineDV; 1455IDataView testDV;
TrainerEstimators\CalibratorEstimators.cs (6)
105var scoredData = transformer.Transform(data); 120public IDataView Data { get; set; } 121public IDataView ScoredData { get; set; } 128private void CheckValidCalibratedData(IDataView scoredData, ITransformer transformer) 152IDataView[] dataArray = new IDataView[]
TrainerEstimators\FAFMEstimator.cs (5)
23var dataView = mlContext.Data.LoadFromEnumerable(data); 29var prediction = model.Transform(dataView); 44var dataView = mlContext.Data.LoadFromEnumerable(data); 55var prediction = model.Transform(dataView); 68var data = new TextLoader(Env, GetFafmBCLoaderArgs())
TrainerEstimators\LbfgsTests.cs (10)
21(IEstimator<ITransformer> pipe, IDataView dataView) = GetBinaryClassificationPipeline(); 26var transformedDataView = pipe.Fit(dataView).Transform(dataView); 35(IEstimator<ITransformer> pipe, IDataView dataView) = GetMulticlassPipeline(); 40var transformedDataView = pipe.Fit(dataView).Transform(dataView); 49var dataView = GetRegressionPipeline(); 61(IEstimator<ITransformer> pipe, IDataView dataView) = GetBinaryClassificationPipeline(); 81(IEstimator<ITransformer> pipe, IDataView dataView) = GetBinaryClassificationPipeline(); 107var scoredData = transformer.Transform(dataView); 165(IEstimator<ITransformer> pipe, IDataView dataView) = GetMulticlassPipeline(); 183(IEstimator<ITransformer> pipe, IDataView dataView) = GetMulticlassPipeline();
TrainerEstimators\MatrixFactorizationTests.cs (27)
32var data = new TextLoader(Env, GetLoaderArgs(labelColumnName, matrixColumnIndexColumnName, matrixRowIndexColumnName)) 36var invalidData = new TextLoader(Env, GetLoaderArgs(labelColumnName, matrixColumnIndexColumnName + "Renamed", matrixRowIndexColumnName + "Renamed")) 71var data = reader.Load(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.trainFilename))); 107var testData = reader.Load(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.testFilename))); 110var prediction = model.Transform(testData); 212var dataView = ML.Data.LoadFromEnumerable(dataMatrix); 244var prediction = model.Transform(dataView); 259var testDataView = mlContext.Data.LoadFromEnumerable(testMatrix); 323var dataView = ML.Data.LoadFromEnumerable(dataMatrix); 356var prediction = model.Transform(dataView); 379var invalidTestDataView = mlContext.Data.LoadFromEnumerable(invalidTestMatrix); 382var invalidPrediction = model.Transform(invalidTestDataView); 443var dataView = ML.Data.LoadFromEnumerable(dataMatrix); 469var prediction = model.Transform(dataView); 486var testDataView = ML.Data.LoadFromEnumerable(testDataMatrix); 489var testPrediction = model.Transform(testDataView); 558var testDataView = ML.Data.LoadFromEnumerable(testDataMatrix); 561var testPrediction = model.Transform(testDataView); 587var dataView = ML.Data.LoadFromEnumerable(dataMatrix); 613var prediction = model.Transform(dataView); 628var testDataView = ML.Data.LoadFromEnumerable(testDataMatrix); 631var testPrediction = model.Transform(testDataView); 653var dataView = mlContext.Data.LoadFromEnumerable(data); 679var prediction = model.Transform(mlContext.Data.LoadFromEnumerable(testData)); 770var dataView = ML.Data.LoadFromEnumerable(dataMatrix); 809var testData = ML.Data.LoadFromEnumerable(testMatrix); 812var transformedTestData = model.Transform(testData);
TrainerEstimators\MetalinearEstimators.cs (1)
85var data = loader.Load(GetDataPath(TestDatasets.irisData.trainFilename));
TrainerEstimators\OlsLinearRegressionTests.cs (1)
17var dataView = GetRegressionPipeline();
TrainerEstimators\OneDalEstimators.cs (6)
54var trainingData = loader.Load(trainDataPath); 55var testingData = loader.Load(testDataPath); 59var preprocessedTrainingData = preprocessingPipeline.Fit(trainingData).Transform(trainingData); 60var preprocessedTestingData = preprocessingPipeline.Fit(trainingData).Transform(testingData); 74var trainingPredictions = model.Transform(preprocessedTrainingData); 76var testingPredictions = model.Transform(preprocessedTestingData);
TrainerEstimators\OnlineLinearTests.cs (4)
20var regressionData = ML.Data.LoadFromTextFile(dataPath, new[] { 27var regressionTrainData = regressionPipe.Fit(regressionData).Transform(regressionData); 34var binaryData = ML.Data.LoadFromTextFile(dataPath, new[] { 41var binaryTrainData = binaryPipe.Fit(binaryData).Transform(binaryData);
TrainerEstimators\PriorRandomTests.cs (2)
14private IDataView GetBreastCancerDataviewWithTextColumns() 33var dataView = GetBreastCancerDataviewWithTextColumns();
TrainerEstimators\SdcaTests.cs (17)
21var data = ML.Data.LoadFromTextFile(dataPath, new[] { 28var binaryData = ML.Transforms.Conversion.ConvertType("Label", outputKind: DataKind.Boolean) 43var mcData = ML.Transforms.Conversion.MapValueToKey("Label").Fit(data).Transform(data); 67var data = mlContext.Data.LoadFromEnumerable(rawData); 81var prediction = model.Transform(data); 111var data = mlContext.Data.LoadFromEnumerable(rawData); 126var prediction1 = modelWithoutWeights.Transform(data); 127var prediction2 = modelWithWeights.Transform(data); 167var data = mlContext.Data.LoadFromEnumerable(rawData); 185var prediction1 = modelWithoutWeights.Transform(data); 186var prediction2 = modelWithWeights.Transform(data); 226var data = mlContext.Data.LoadFromEnumerable(rawData); 241var prediction = model.Transform(data); 268var data = mlContext.Data.LoadFromEnumerable(rawData); 284var prediction = model.Transform(data); 303var data = mlContext.Data.LoadFromEnumerable(rawData); 318var prediction = model.Transform(data);
TrainerEstimators\SymSgdClassificationTests.cs (7)
19(var pipe, var dataView) = GetBinaryClassificationPipeline(); 24var transformedDataView = pipe.Fit(dataView).Transform(dataView); 33(var pipe, var dataView) = GetBinaryClassificationPipeline(); 34var transformedData = pipe.Fit(dataView).Transform(dataView); 37var data = initPredictor.Transform(transformedData); 41var outInitData = withInitPredictor.Transform(transformedData); 44var outNoInitData = notInitPredictor.Transform(transformedData);
TrainerEstimators\TrainerEstimators.cs (20)
40var data = reader.Load(GetDataPath(TestDatasets.mnistOneClass.trainFilename)); 70var data = reader.Load(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); 97(IEstimator<ITransformer> pipe, IDataView dataView) = GetBinaryClassificationPipeline(); 102var transformedDataView = pipe.Fit(dataView).Transform(dataView); 107var result = model.Transform(transformedDataView); 129(IEstimator<ITransformer> pipe, IDataView dataView) = GetBinaryClassificationPipeline(); 133var transformedDataView = pipe.Fit(dataView).Transform(dataView); 138var result = model.Transform(transformedDataView); 154(IEstimator<ITransformer> pipe, IDataView dataView) = GetMulticlassPipeline(); 171(IEstimator<ITransformer> pipe, IDataView dataView) = GetBinaryClassificationPipeline(); 175var transformedDataView = pipe.Fit(dataView).Transform(dataView); 179var result = model.Transform(transformedDataView); 189private (IEstimator<ITransformer>, IDataView) GetBinaryClassificationPipeline() 191var data = new TextLoader(Env, 215private (IEstimator<ITransformer>, IDataView) GetOneHotBinaryClassificationPipeline() 225private (IEstimator<ITransformer>, IDataView) GetRankingPipeline() 227var data = new TextLoader(Env, new TextLoader.Options 247private IDataView GetRegressionPipeline() 276private (IEstimator<ITransformer>, IDataView) GetMulticlassPipeline() 278var data = new TextLoader(Env, new TextLoader.Options()
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (38)
22var dataView = ML.Data.LoadFromEnumerable(data); 129var dataView = ML.Data.LoadFromEnumerable(data); 143var predicted = model.Transform(dataView); 153var transformed = treeFeaturizer.Transform(dataView); 181var dataView = ML.Data.LoadFromEnumerable(data); 204var transformed = treeFeaturizer.Transform(dataView); 235var dataView = ML.Data.LoadFromEnumerable(data); 250var predicted = model.Transform(dataView); 268var transformed = treeFeaturizer.Transform(dataView); 303var dataView = ML.Data.LoadFromEnumerable(data); 318var predicted = treeModel.Transform(dataView); 334var prediction = model.Transform(dataView); 340var naivePrediction = naiveModel.Transform(dataView); 354var dataView = ML.Data.LoadFromEnumerable(data); 380var prediction = model.Transform(dataView); 393var dataView = ML.Data.LoadFromEnumerable(data); 419var prediction = model.Transform(dataView); 432var dataView = ML.Data.LoadFromEnumerable(data); 458var prediction = model.Transform(dataView); 470var dataView = ML.Data.LoadFromEnumerable(data); 496var prediction = model.Transform(dataView); 508var dataView = ML.Data.LoadFromEnumerable(data); 534var prediction = model.Transform(dataView); 546var dataView = ML.Data.LoadFromEnumerable(data); 572var prediction = model.Transform(dataView); 584var dataView = ML.Data.LoadFromEnumerable(data); 610var prediction = model.Transform(dataView); 627var loadedPrediction = loadedModel.Transform(dataView); 639var dataView = ML.Data.LoadFromEnumerable(data); 667var prediction = model.Transform(dataView); 686var loadedPrediction = loadedModel.Transform(dataView); 699var secondPrediction = secondModel.Transform(dataView); 713var dataView = ML.Data.LoadFromEnumerable(data); 754var prediction = model.Transform(dataView); 771var dataView = ML.Data.LoadFromEnumerable(data); 800var trainData = split.TrainSet; 801var testData = split.TestSet; 810var prediction = model.Transform(testData);
TrainerEstimators\TreeEstimators.cs (22)
52var transformedDataView = pipe.Fit(dataView).Transform(dataView); 74var transformedDataView = pipe.Fit(dataView).Transform(dataView); 96var transformedDataView = pipe.Fit(dataView).Transform(dataView); 119var transformedDataView = pipe.Fit(dataView).Transform(dataView); 141var transformedDataView = pipe.Fit(dataView).Transform(dataView); 162var transformedDataView = pipe.Fit(dataView).Transform(dataView); 186var transformedDataView = pipe.Fit(dataView).Transform(dataView); 204var transformedDataView = pipe.Fit(dataView).Transform(dataView); 215var dataView = GetRegressionPipeline(); 230var dataView = GetRegressionPipeline(); 252var dataView = GetRegressionPipeline(); 270var dataView = GetRegressionPipeline(); 289var dataView = GetRegressionPipeline(); 373var transformedDataView = pipe.Fit(dataView).Transform(dataView); 461var dataView = mlContext.Data.LoadFromEnumerable(dataList); 475var predicted = gbm.Transform(dataView); 752var trainingData = mlContext.Data.LoadFromEnumerable(dataPoints); 871var summaryDataView = modelParameters.GetSummaryDataView(null); 908var dataView = GetRegressionPipeline(); 926var dataView = GetRegressionPipeline(); 944var dataView = GetRegressionPipeline(); 962var dataView = GetRegressionPipeline();
Transformers\CategoricalHashTests.cs (12)
51var dataView = ML.Data.LoadFromEnumerable(data); 69var savedData = pipe.Fit(dataView).Transform(dataView); 81var data = ML.Data.LoadFromTextFile(dataPath, new[] { 88var invalidData = ML.Data.LoadFromEnumerable(wrongCollection); 102var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 103var view = ML.Transforms.SelectColumns("A", "B", "C", "D", "E", "F").Fit(savedData).Transform(savedData); 119var dataView = ML.Data.LoadFromEnumerable(data); 132var bagResult = bagPipe.Fit(dataView).Transform(dataView); 137private void ValidateMetadata(IDataView result) 224var dataView = ML.Data.LoadFromEnumerable(data); 230var result = pipe.Fit(dataView).Transform(dataView); 237var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Transformers\CategoricalTests.cs (16)
70var dataView = ML.Data.LoadFromEnumerable(data); 88var savedData = pipe.Fit(dataView).Transform(dataView); 108var dataView = mlContext.Data.LoadFromEnumerable(data); 131var dataView = mlContext.Data.LoadFromEnumerable(data); 135var sideData = sideDataBuilder.GetDataView(); 140var output = pipe.Fit(dataView).Transform(dataView); 157var data = ML.Data.LoadFromTextFile(dataPath, new[] { 163var invalidData = ML.Data.LoadFromEnumerable(wrongCollection); 174var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 175var view = ML.Transforms.SelectColumns("A", "B", "C", "D", "E").Fit(savedData).Transform(savedData); 192var dataView = ML.Data.LoadFromEnumerable(data); 208var result = pipe.Fit(dataView).Transform(dataView); 215private void ValidateMetadata(IDataView result) 318var dataView = ML.Data.LoadFromEnumerable(data); 324var result = pipe.Fit(dataView).Transform(dataView); 330var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Transformers\CharTokenizeTests.cs (5)
41var dataView = ML.Data.LoadFromEnumerable(data); 43var invalidDataView = ML.Data.LoadFromEnumerable(invalidData); 61var dataView = ML.Data.LoadFromEnumerable(data); 63var result = pipe.Fit(dataView).Transform(dataView); 69var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Transformers\ConcatTests.cs (2)
57var data = loader.Load(source); 114var data = loader.Load(source);
Transformers\ConvertTests.cs (18)
129var dataView = ML.Data.LoadFromEnumerable(data); 168var allTypesDataView = ML.Data.LoadFromEnumerable(allTypesData); 187var actualConvertedValues = allTypesPipe.Fit(allTypesDataView).Transform(allTypesDataView); 248var expectedConvertedValues = ML.Data.LoadFromEnumerable(allTypesDataConverted); 253var allInputTypesDataView = ML.Data.LoadFromEnumerable(allInputTypesData); 262var convertedValues = allInputTypesDataPipe.Fit(allInputTypesDataView).Transform(allInputTypesDataView); 266var expectedValuesDataView = ML.Data.LoadFromEnumerable(expectedValuesData); 284var dataView = mlContext.Data.LoadFromEnumerable(data); 288var sideData = sideDataBuilder.GetDataView(); 293var output = pipe.Fit(dataView).Transform(dataView); 319var dataView = ML.Data.LoadFromEnumerable(data); 323var result = pipe.Fit(dataView).Transform(dataView); 329var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 345var dataView = ML.Data.LoadFromEnumerable(data); 350private void ValidateMetadata(IDataView result) 388var dataView = ML.Data.LoadFromEnumerable(dataArray); 398var outDataOld = modelOld.Transform(dataView); 402var outDataNew = modelNew.Transform(dataView);
Transformers\CopyColumnEstimatorTests.cs (14)
49var dataView = env.Data.LoadFromEnumerable(data); 52var result = transformer.Transform(dataView); 61var dataView = env.Data.LoadFromEnumerable(data); 79var dataView = env.Data.LoadFromEnumerable(data); 80var xyDataView = env.Data.LoadFromEnumerable(xydata); 85var result = transformer.Transform(xyDataView); 98var dataView = env.Data.LoadFromEnumerable(data); 106var result = loadedTransformer.Transform(dataView); 116var dataView = env.Data.LoadFromEnumerable(data); 119var result = transformer.Transform(dataView); 125var loadedView = ModelFileUtils.LoadTransforms(env, dataView, ms); 135var dataView = env.Data.LoadFromEnumerable(data); 142var result = transformer.Transform(term); 165private void ValidateCopyColumnTransformer(IDataView result)
Transformers\CountTargetEncodingTests.cs (8)
26var data = ML.Data.LoadFromTextFile(dataPath, new[] { 42var data = ML.Data.LoadFromTextFile(dataPath, new[] { new TextLoader.Column("Label", DataKind.Single, 0), 57var data = ML.Data.LoadFromTextFile(dataPath, new[] { 77var data = ML.Data.LoadFromTextFile(dataPath, new[] { 124private static void CheckDoubleCounts(IDataView data, CountTargetEncodingTransformer transformer, CountTargetEncodingTransformer transformer1, params int[] countCols) 126var transformedData = transformer.Transform(data); 127var transformedData1 = transformer1.Transform(data); 162var data = ML.Data.LoadFromTextFile(dataPath, new[] {
Transformers\CustomMappingTests.cs (11)
61var data = loader.Load(source); 63IDataView transformedData; 98var data = loader.Load(source); 106var badData1 = ML.Transforms.CopyColumns("Text1", "Float1").Fit(data).Transform(data); 114var badData2 = ML.Transforms.SelectColumns(new[] { "Float1" }).Fit(data).Transform(data); 175var data = loader.Load(source); 183var transformedData = customEst.Fit(data).Transform(data); 199var data = loader.Load(source); 201var filteredData = ML.Data.FilterByCustomPredicate<MyInput>(data, input => input.Float1 % 2 == 0); 219var data = ML.Data.LoadFromEnumerable(new[] 232var filteredData = ML.Data.FilterByStatefulCustomPredicate<MyFilterInput, MyFilterState>(data,
Transformers\ExpressionTransformerTests.cs (1)
49var transformed = expr.Fit(loader.Load(dataPath)).Transform(loader.Load(dataPath));
Transformers\FeatureSelectionTests.cs (16)
31var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 36var invalidData = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 50var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 65var data = ML.Data.LoadFromTextFile(dataPath, new[] { 87var savedData = ML.Data.TakeRows(trans.Transform(data), 4); 107var data = ML.Data.LoadFromTextFile(dataPath, new[] { 129var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 148var dataView = ML.Data.LoadFromTextFile(dataPath, new[] { 155var result = pipe.Fit(dataView).Transform(dataView); 161var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); 170var data = ML.Data.LoadFromTextFile(dataPath, new[] { 189var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 208var dataView = ML.Data.LoadFromTextFile(dataPath, new[] { 215var result = pipe.Fit(dataView).Transform(dataView); 221var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); 230var dataView = ML.Data.LoadFromTextFile(dataPath, new[] {
Transformers\GroupUngroup.cs (2)
49var dataView = ML.Data.LoadFromEnumerable(data); 86var dataView = ML.Data.LoadFromEnumerable(data);
Transformers\HashTests.cs (13)
50var dataView = ML.Data.LoadFromEnumerable(data); 72var dataView = ML.Data.LoadFromEnumerable(data); 78var result = pipe.Fit(dataView).Transform(dataView); 83private void ValidateMetadata(IDataView result) 112var dataView = ML.Data.LoadFromEnumerable(data); 119var result = pipe.Fit(dataView).Transform(dataView); 125var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 335IDataView data = ML.Data.LoadFromEnumerable(samples); 346var transformedData = model.Transform(data); 357var dataView = ML.Data.LoadFromTextFile(dataPath, new[] 365var hashed = model.Transform(dataView); 381var dataView = ML.Data.LoadFromEnumerable(data); 389var transformed = pipeline.Fit(dataView).Transform(dataView);
Transformers\KeyToBinaryVectorEstimatorTest.cs (9)
47var dataView = ML.Data.LoadFromEnumerable(data); 63var data = ML.Data.LoadFromTextFile(dataPath, new[] { 68var transformedData = new ValueToKeyMappingEstimator(Env, new[] { 91var dataView = ML.Data.LoadFromEnumerable(data); 107var result = pipe.Fit(dataView).Transform(dataView); 112private void ValidateMetadata(IDataView result) 147var dataView = ML.Data.LoadFromEnumerable(data); 156var result = pipe.Fit(dataView).Transform(dataView); 162var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Transformers\KeyToValueTests.cs (9)
37var data = reader.Load(dataPath); 43var badData1 = new ColumnCopyingTransformer(Env, ("A", "BareKey")).Transform(data); 44var badData2 = new ColumnCopyingTransformer(Env, ("B", "VectorString")).Transform(data); 55IDataView savedData = est.Fit(data).Transform(data); 68var data = ML.Data.LoadFromTextFile(dataPath, new[] { 73var transformedData = new ValueToKeyMappingEstimator(Env, new[] { 83var data2Transformed = est.Fit(transformedData).Transform(transformedData); 85var dataLeft = ML.Transforms.SelectColumns(new[] { "ScalarString", "VectorString" }).Fit(data).Transform(data); 86var dataRight = ML.Transforms.SelectColumns(new[] { "ScalarString", "VectorString" }).Fit(data2Transformed).Transform(data2Transformed);
Transformers\KeyToVectorEstimatorTests.cs (11)
54var dataView = ML.Data.LoadFromEnumerable(data); 73var data = ML.Data.LoadFromTextFile(dataPath, new[] { 78var transformedData = new ValueToKeyMappingEstimator(Env, new[] { 101var dataView = ML.Data.LoadFromEnumerable(data); 125var result = pipe.Fit(dataView).Transform(dataView); 130private void ValidateMetadata(IDataView result) 206var dataView = ML.Data.LoadFromEnumerable(data); 218var result = pipe.Fit(dataView).Transform(dataView); 224var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 254IDataView dataview = mlContext.Data.LoadFromEnumerable(GetData()); 259var featurizedData = pipeline.Fit(dataview).Transform(dataview);
Transformers\NAIndicatorTests.cs (9)
46var dataView = ML.Data.LoadFromEnumerable(data); 74var dataView = ML.Data.LoadFromEnumerable(data); 81var result = pipe.Fit(dataView).Transform(dataView); 87var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); 95var data = ML.Data.LoadFromTextFile(dataPath, new[] { 103var invalidData = ML.Data.LoadFromEnumerable(wrongCollection); 117var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 137var dataView = ML.Data.LoadFromEnumerable(data); 140var result = newpipe.Fit(dataView).Transform(dataView);
Transformers\NAReplaceTests.cs (11)
66var dataView = ML.Data.LoadFromEnumerable(data); 76var transformedDataview = pipe.Fit(dataView).Transform(dataView); 87var expectedOutputDataview = ML.Data.LoadFromEnumerable(expectedOutput); 111var dataView = ML.Data.LoadFromEnumerable(data); 125var data = ML.Data.LoadFromTextFile(dataPath, new[] { 133var invalidData = ML.Data.LoadFromEnumerable(wrongCollection); 143var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 144var view = ML.Transforms.SelectColumns("A", "B", "C", "D", "E").Fit(savedData).Transform(savedData); 169var dataView = ML.Data.LoadFromEnumerable(data); 176var result = pipe.Fit(dataView).Transform(dataView); 182var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Transformers\NormalizerTests.cs (73)
76var data = loader.Load(dataPath); 78var badData1 = new ColumnCopyingTransformer(Env, ("float1", "int1")).Transform(data); 79var badData2 = new ColumnCopyingTransformer(Env, ("float4", "float0")).Transform(data); 90var transformedData = est.Fit(data).Transform(data); 91var dataView = ML.Transforms.DropColumns(new[] { "float0" }).Fit(transformedData).Transform(transformedData); 137var data = loader.Load(dataPath); 254var data = loader.Load(dataPath); 479var data = loader.Load(dataPath); 487var data1 = est1.Fit(data).Transform(data); 488var data2 = est2.Fit(data).Transform(data); 489var data3 = est3.Fit(data).Transform(data); 490var data4 = est4.Fit(data).Transform(data); 491var data5 = est5.Fit(data).Transform(data); 507var data6 = est6.Fit(data).Transform(data); 508var data7 = est7.Fit(data).Transform(data); 509var data8 = est8.Fit(data).Transform(data); 520var data9 = est9.Fit(data).Transform(data); 521var data10 = est10.Fit(data).Transform(data); 522var data11 = est11.Fit(data).Transform(data); 533var data12 = est12.Fit(data).Transform(data); 534var data13 = est13.Fit(data).Transform(data); 535var data14 = est14.Fit(data).Transform(data); 546var data15 = est15.Fit(data).Transform(data); 547var data16 = est16.Fit(data).Transform(data); 548var data17 = est17.Fit(data).Transform(data); 559var data18 = est18.Fit(data).Transform(data); 560var data19 = est19.Fit(data).Transform(data); 561var data20 = est20.Fit(data).Transform(data); 583var data = loader.Load(dataPath); 600var data1 = est1.Fit(data).Transform(data); 601var data2 = est2.Fit(data).Transform(data); 602var data3 = est3.Fit(data).Transform(data); 603var data4 = est4.Fit(data).Transform(data); 604var data5 = est5.Fit(data).Transform(data); 605var data6 = est6.Fit(data).Transform(data); 606var data7 = est7.Fit(data).Transform(data); 607var data8 = est8.Fit(data).Transform(data); 608var data9 = est9.Fit(data).Transform(data); 609var data10 = est10.Fit(data).Transform(data); 641var data = loader.Load(dataPath); 656var data = ML.Data.LoadFromTextFile(dataSource, new[] { 661var invalidData = ML.Data.LoadFromTextFile(dataSource, new[] { 675var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 690var data = ML.Data.LoadFromTextFile(dataSource, new[] { 695var invalidData = ML.Data.LoadFromTextFile(dataSource, new[] { 709var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 732var dataView = ML.Data.LoadFromTextFile(dataSource, new[] { 739var result = pipe.Fit(dataView).Transform(dataView); 745var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); 754var data = ML.Data.LoadFromTextFile(dataSource, new[] { 759var invalidData = ML.Data.LoadFromTextFile(dataSource, new[] { 772var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 793var dataView = ML.Data.LoadFromTextFile(dataSource, new[] { 800var result = pipe.Fit(dataView).Transform(dataView); 806var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); 814var data = ML.Data.LoadFromTextFile(dataSource, new[] { 819var invalidData = ML.Data.LoadFromTextFile(dataSource, new[] { 832var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 853var dataView = ML.Data.LoadFromTextFile(dataSource, new[] { 860var result = pipe.Fit(dataView).Transform(dataView); 866var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); 878var result = ModelFileUtils.LoadTransforms(Env, dataView, fs); 905var data = ML.Data.LoadFromEnumerable(samples); 915var transformedData = normalizeTransform.Transform(data); 917var noCdfData = normalizeNoCdfTransform.Transform(data); 946var data = ML.Data.LoadFromEnumerable(samples); 956var transformedData = normalizeTransform.Transform(data); 958var noCdfData = normalizeNoCdfTransform.Transform(data); 1003var data = loader.Load(dataPath); 1014var transformedData = normalizer.Transform(data); 1054var data = ML.Data.LoadFromEnumerable(samples); 1056var transformedData = model.Transform(data); 1061var transformedData2 = loadedModel.Transform(data);
Transformers\PcaTests.cs (4)
29var data = ML.Data.LoadFromTextFile(_dataSource, new[] { 35var invalidData = ML.Data.LoadFromTextFile(_dataSource, new[] { 53var data = ML.Data.LoadFromTextFile(_dataSource, new[] { 60var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4);
Transformers\RffTests.cs (8)
50var invalidData = ML.Data.LoadFromEnumerable(new[] { new TestClassInvalidSchema { A = 1 }, new TestClassInvalidSchema { A = 1 } }); 51var validFitInvalidData = ML.Data.LoadFromEnumerable(new[] { new TestClassBiggerSize { A = new float[200] }, new TestClassBiggerSize { A = new float[200] } }); 52var dataView = ML.Data.LoadFromEnumerable(data); 67var data = ML.Data.LoadFromTextFile(dataPath, new[] { 77var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 98var dataView = ML.Data.LoadFromEnumerable(data); 104var result = est.Fit(dataView).Transform(dataView); 110var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Transformers\SelectColumnsTests.cs (25)
48var dataView = ML.Data.LoadFromEnumerable(data); 51var result = transformer.Transform(dataView); 67var dataView = ML.Data.LoadFromEnumerable(data); 72var result = transformer.Transform(dataView); 88var dataView = ML.Data.LoadFromEnumerable(data); 91var result = transformer.Transform(dataView); 107var dataView = ML.Data.LoadFromEnumerable(data); 108var invalidDataView = ML.Data.LoadFromEnumerable(invalidData); 123var dataView = ML.Data.LoadFromEnumerable(data); 132var dataView = ML.Data.LoadFromEnumerable(data); 136var result = transformer.Transform(dataView); 155var dataView = ML.Data.LoadFromEnumerable(data); 159var result = transformer.Transform(dataView); 178var dataView = ML.Data.LoadFromEnumerable(data); 186var result = loadedTransformer.Transform(dataView); 197var dataView = ML.Data.LoadFromEnumerable(data); 206var result = loadedTransformer.Transform(dataView); 219var dataView = ML.Data.LoadFromEnumerable(data); 223var result = ModelFileUtils.LoadTransforms(Env, dataView, fs); 247var dataView = ML.Data.LoadFromEnumerable(data); 251var result = ModelFileUtils.LoadTransforms(Env, dataView, fs); 275var dataView = ML.Data.LoadFromEnumerable(data); 279var result = ModelFileUtils.LoadTransforms(Env, dataView, fs); 303var dataView = ML.Data.LoadFromEnumerable(data); 307var result = ModelFileUtils.LoadTransforms(Env, dataView, fs);
Transformers\TextFeaturizerTests.cs (43)
49var dataView = ML.Data.LoadFromEnumerable(data); 67var dataView = ML.Data.LoadFromEnumerable(data); 96var dataView = ML.Data.LoadFromEnumerable(data); 138var dataView = ML.Data.LoadFromEnumerable(data); 180var dataView = ML.Data.LoadFromEnumerable(data); 209var dataView = ML.Data.LoadFromEnumerable(data); 240var dataView = ML.Data.LoadFromEnumerable(data); 261private void TestCaseMode(IDataView dataView, TestClass[] data, TextNormalizingEstimator.CaseMode caseMode) 301var dataView = ML.Data.LoadFromEnumerable(data); 309private void TestKeepNumbers(IDataView dataView, TestClass[] data, bool keepNumbers) 340var dataView = ML.Data.LoadFromEnumerable(data); 346private void TestKeepPunctuations(IDataView dataView, TestClass[] data, bool keepPunctuations) 378var dataView = ML.Data.LoadFromEnumerable(data); 384private void TestKeepDiacritics(IDataView dataView, TestClass[] data, bool keepDiacritics) 415var dataView = ML.Data.LoadFromEnumerable(data); 426var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 431var invalidData = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 444var savedData = ML.Data.TakeRows(feat.Fit(data).Transform(data), 4); 459var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 464var invalidData = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 475var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 489var data = ML.Data.LoadFromTextFile(dataPath, new[] { 495var outdata = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 496var savedData = ML.Transforms.SelectColumns("words").Fit(outdata).Transform(outdata); 526var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 531var invalidData = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 544var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 566var tokenized = new WordTokenizingTransformer(ML, new[] 571var xf = factory.CreateComponent(ML, tokenized, 589var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 594var invalidData = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 605var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 619var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 624var invalidData = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 640var savedData = ML.Data.TakeRows(est.Fit(data).Transform(data), 4); 656var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 662var result = ModelFileUtils.LoadTransforms(Env, data, fs); 673var data = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 678var invalidData = ML.Data.LoadFromTextFile(sentimentDataPath, new[] { 698var transformedData = transformer.Transform(data); 699var savedData = ML.Data.TakeRows(transformedData, 4); 729var srcView = builder.GetDataView(); 777var dataView = ML.Data.LoadFromTextFile(dataPath, new[] {
Transformers\TextNormalizer.cs (6)
42var dataView = ML.Data.LoadFromEnumerable(data); 47var invalidDataView = ML.Data.LoadFromEnumerable(invalidData); 63var savedData = ML.Data.TakeRows(pipeVariations.Fit(dataView).Transform(dataView), 5); 81var dataView = ML.Data.LoadFromEnumerable(data); 84var result = pipe.Fit(dataView).Transform(dataView); 90var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Transformers\ValueMappingTests.cs (43)
53var dataView = ML.Data.LoadFromEnumerable(data); 58var lookupMap = DataViewHelper.CreateDataView(Env, keys, values, 69var result = t.Transform(dataView); 91var dataView = ML.Data.LoadFromEnumerable(data); 96var lookupMap = DataViewHelper.CreateDataView(Env, keys, values, 114var result = t.Transform(dataView); 137var dataView = ML.Data.LoadFromEnumerable(data); 172var dataView = ML.Data.LoadFromEnumerable(data); 180var lookupMap = DataViewHelper.CreateDataView(Env, keys, values, 198var result = t.Transform(dataView); 227var dataView = ML.Data.LoadFromEnumerable(data); 234var mapView = ML.Data.LoadFromEnumerable(map); 239var result = t.Transform(dataView); 261var dataView = ML.Data.LoadFromEnumerable(data); 269var lookupMap = DataViewHelper.CreateDataView(Env, keys, values, 280var result = t.Transform(dataView); 305var dataView = ML.Data.LoadFromEnumerable(data); 310var lookupMap = DataViewHelper.CreateDataView(Env, keys, values, 321var result = t.Transform(dataView); 343var dataView = ML.Data.LoadFromEnumerable(data); 348var lookupMap = DataViewHelper.CreateDataView(Env, keys, values, 362var dataView = ML.Data.LoadFromEnumerable(data); 394var dataView = ML.Data.LoadFromEnumerable(data); 427var dataView = ML.Data.LoadFromEnumerable(data); 469var dataView = ML.Data.LoadFromEnumerable(data); 509var dataView = ML.Data.LoadFromEnumerable(data); 550var dataView = ML.Data.LoadFromEnumerable(data); 563var result = t.Transform(dataView); 590var dataView = ML.Data.LoadFromEnumerable(data); 592var badDataView = ML.Data.LoadFromEnumerable(badData); 609var dataView = ML.Data.LoadFromEnumerable(data); 611var badDataView = ML.Data.LoadFromEnumerable(badData); 628var dataView = ML.Data.LoadFromEnumerable(data); 631var badDataView = ML.Data.LoadFromEnumerable(badData); 685var dataView = ML.Data.LoadFromEnumerable(data); 701var result = loadedTransformer.Transform(dataView); 715var dataView = ML.Data.LoadFromEnumerable(data); 719var result = ModelFileUtils.LoadTransforms(Env, dataView, fs); 732var dataView = ML.Data.LoadFromEnumerable(data); 736var result = ModelFileUtils.LoadTransforms(Env, dataView, fs); 763var data = ML.Data.LoadFromEnumerable(rawData); 775var lookupIdvMap = ML.Data.LoadFromEnumerable(lookupData); 781IDataView transformedData = pipeline.Fit(data).Transform(data);
Transformers\WordBagTransformerTests.cs (4)
38var dataview = mlContext.Data.LoadFromEnumerable(samples); 67var dataview = mlContext.Data.LoadFromEnumerable(samples); 105var dataviewDefault = mlContext.Data.LoadFromEnumerable(samplesDefault); 106var dataviewNonDefault = mlContext.Data.LoadFromEnumerable(samplesNonDefault);
Transformers\WordEmbeddingsTests.cs (6)
29var data = new TextLoader(ML, 44var words = est.Fit(data).Transform(data); 51var savedData = ML.Data.TakeRows(pipe.Fit(words).Transform(words), 4); 64var data = new TextLoader(ML, 79var words = est.Fit(data).Transform(data); 94var savedData = ML.Data.TakeRows(pipe.Fit(words).Transform(words), 10);
Transformers\WordTokenizeTests.cs (6)
55var dataView = ML.Data.LoadFromEnumerable(data); 57var invalidDataView = ML.Data.LoadFromEnumerable(invalidData); 66var result = pipe.Fit(dataView).Transform(dataView); 99var dataView = ML.Data.LoadFromEnumerable(data); 104var result = pipe.Fit(dataView).Transform(dataView); 110var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms);
Microsoft.ML.TimeSeries (80)
AdaptiveSingularSpectrumSequenceModeler.cs (2)
1532public void Train(IDataView dataView, string inputColumnName) => Train(new RoleMappedData(dataView, null, inputColumnName)); 1552public void Update(IDataView dataView, string inputColumnName)
ExponentialAverageTransform.cs (2)
60public ExponentialAverageTransform(IHostEnvironment env, Arguments args, IDataView input) 67public ExponentialAverageTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
ExtensionsCatalog.cs (6)
285public static IDataView DetectEntireAnomalyBySrCnn(this AnomalyDetectionCatalog catalog, IDataView input, string outputColumnName, string inputColumnName, 315public static IDataView DetectEntireAnomalyBySrCnn(this AnomalyDetectionCatalog catalog, IDataView input, string outputColumnName, string inputColumnName, SrCnnEntireAnomalyDetectorOptions options) 397/// <param name="input">Input DataView.The data is an instance of <see cref="Microsoft.ML.IDataView"/>.</param> 416IDataView input,
IidAnomalyDetectionBase.cs (4)
57/// Note that <see cref="IDataView"/>'s are lazy, so no actual transformations happen here, just schema validation. 59public IDataView Transform(IDataView input) => InternalTransform.Transform(input); 79internal IDataTransform MakeDataTransform(IDataView input) => InternalTransform.MakeDataTransform(input);
IidChangePointDetector.cs (2)
101private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 139private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
IidSpikeDetector.cs (2)
97private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 121private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
MovingAverageTransform.cs (2)
68public MovingAverageTransform(IHostEnvironment env, Arguments args, IDataView input) 81public MovingAverageTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
PercentileThresholdTransform.cs (2)
67public PercentileThresholdTransform(IHostEnvironment env, Arguments args, IDataView input) 75public PercentileThresholdTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
PValueTransform.cs (2)
72public PValueTransform(IHostEnvironment env, Arguments args, IDataView input) 80public PValueTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
SeasonalityDetector.cs (2)
43/// <param name="input">Input DataView.The data is an instance of <see cref="Microsoft.ML.IDataView"/>.</param> 54IDataView input,
SequentialTransformBase.cs (6)
221private readonly IDataView _transform; 236private static IDataView CreateLambdaTransform(IHost host, IDataView input, string outputColumnName, string inputColumnName, 269string name, IHostEnvironment env, IDataView input, DataViewType outputColTypeOverride = null) 275IHost host, IDataView input, DataViewType outputColTypeOverride = null) 294private protected SequentialTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name, IDataView input)
SequentialTransformerBase.cs (11)
444internal SequentialDataTransform MakeDataTransform(IDataView input) 450public IDataView Transform(IDataView input) => MakeDataTransform(input); 471private readonly IDataView _transform; 477IDataView input, IStatefulRowMapper mapper) 492private static IDataView CreateLambdaTransform(IHost host, IDataView input, string inputColumnName, 590IDataTransform ITransformTemplate.ApplyToData(IHostEnvironment env, IDataView newSource) 758public TimeSeriesRowToRowMapperTransform(IHostEnvironment env, IDataView input, IStatefulRowMapper mapper) 773private TimeSeriesRowToRowMapperTransform(IHost host, ModelLoadContext ctx, IDataView input) 783public static TimeSeriesRowToRowMapperTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
SlidingWindowTransform.cs (2)
39public SlidingWindowTransform(IHostEnvironment env, Arguments args, IDataView input) 44public SlidingWindowTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
SlidingWindowTransformBase.cs (2)
63protected SlidingWindowTransformBase(Arguments args, string loaderSignature, IHostEnvironment env, IDataView input) 80protected SlidingWindowTransformBase(IHostEnvironment env, ModelLoadContext ctx, string loaderSignature, IDataView input)
SrCnnAnomalyDetectionBase.cs (3)
55public IDataView Transform(IDataView input) => InternalTransform.Transform(input); 75internal IDataTransform MakeDataTransform(IDataView input) => InternalTransform.MakeDataTransform(input);
SRCNNAnomalyDetector.cs (2)
112private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 121private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
SrCnnEntireAnomalyDetector.cs (3)
133/// <seealso cref="TimeSeriesCatalog.DetectEntireAnomalyBySrCnn(AnomalyDetectionCatalog, IDataView, string, string, double, int, double, SrCnnDetectMode)"/> 134/// <seealso cref="TimeSeriesCatalog.DetectEntireAnomalyBySrCnn(AnomalyDetectionCatalog, IDataView, string, string, SrCnnEntireAnomalyDetectorOptions)"/> 186public SrCnnEntireAnomalyDetector(IHostEnvironment env, IDataView input, string outputColumnName, string inputColumnName, SrCnnEntireAnomalyDetectorOptions options)
SsaAnomalyDetectionBase.cs (4)
126/// Note that <see cref="IDataView"/>'s are lazy, so no actual transformations happen here, just schema validation. 128public IDataView Transform(IDataView input) => InternalTransform.Transform(input); 145internal IDataTransform MakeDataTransform(IDataView input) => InternalTransform.MakeDataTransform(input);
SsaChangePointDetector.cs (4)
103internal SsaChangePointDetector(IHostEnvironment env, Options options, IDataView input) 110private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 149private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 287public SsaChangePointDetector Fit(IDataView input)
SSaForecasting.cs (4)
128internal SsaForecastingTransformer(IHostEnvironment env, Options options, IDataView input) 135private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 151private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 318public SsaForecastingTransformer Fit(IDataView input)
SsaForecastingBase.cs (4)
59/// Note that <see cref="IDataView"/>'s are lazy, so no actual transformations happen here, just schema validation. 61public IDataView Transform(IDataView input) => InternalTransform.Transform(input); 78internal IDataTransform MakeDataTransform(IDataView input) => InternalTransform.MakeDataTransform(input);
SsaSpikeDetector.cs (4)
100internal SsaSpikeDetector(IHostEnvironment env, Options options, IDataView input) 107private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 123private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 266public SsaSpikeDetector Fit(IDataView input)
TimeSeriesProcessing.cs (5)
36var view = new IidChangePointEstimator(h, options).Fit(options.Data).Transform(options.Data); 50var view = new IidSpikeEstimator(h, options).Fit(options.Data).Transform(options.Data); 106var view = new SsaChangePointEstimator(h, options).Fit(options.Data).Transform(options.Data); 120var view = new SsaSpikeEstimator(h, options).Fit(options.Data).Transform(options.Data); 134var view = new SsaForecastingEstimator(h, options).Fit(options.Data).Transform(options.Data);
Microsoft.ML.TimeSeries.Tests (47)
TimeSeriesDirectApi.cs (24)
113var dataView = env.Data.LoadFromEnumerable(data); 130var output = detector.Transform(dataView); 158var dataView = env.Data.LoadFromEnumerable(data); 180var output = detector.Transform(dataView); 216var dataView = ml.Data.LoadFromEnumerable(data); 292var dataView = ml.Data.LoadFromEnumerable(data); 360var dataView = env.Data.LoadFromEnumerable(data); 386var output = detector.Transform(dataView); 425var dataView = ml.Data.LoadFromEnumerable(data); 533IDataView dataView; 566var transformedData = ml.Transforms.DetectAnomalyBySrCnn(outputColumnName, inputColumnName, 16, 5, 5, 3, 8, 0.35).Fit(dataView).Transform(dataView); 589IDataView dataView; 623var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, 679IDataView dataView; 703var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); 726IDataView dataView; 750var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); 781IDataView dataView; 805var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); 840IDataView dataView; 864var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); 897IDataView dataView; 932var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); 1076var dataView = mlContext.Data.LoadFromEnumerable(input);
TimeSeriesEstimatorTests.cs (15)
54var dataView = ML.Data.LoadFromEnumerable(data); 69var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 70var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData); 88var dataView = ml.Data.LoadFromEnumerable(data); 105var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 106var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData); 124var dataView = ML.Data.LoadFromEnumerable(data); 139var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 140var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData); 155var dataView = ML.Data.LoadFromEnumerable(data); 166var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 167var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData); 182var dataView = ML.Data.LoadFromEnumerable(data); 193var invalidDataWrongNames = ML.Data.LoadFromEnumerable(xyData); 194var invalidDataWrongTypes = ML.Data.LoadFromEnumerable(stringData);
TimeSeriesSimpleApiTests.cs (8)
44var dataView = env.Data.LoadFromEnumerable(data); 57var output = detector.Transform(dataView); 86var dataView = env.Data.LoadFromEnumerable(data); 100var output = detector.Transform(dataView); 129var dataView = env.Data.LoadFromEnumerable(data); 141var output = detector.Transform(dataView); 181var dataView = env.Data.LoadFromEnumerable(data); 193var output = detector.Transform(dataView);
Microsoft.ML.TorchSharp (47)
AutoFormerV2\ObjectDetectionMetrics.cs (3)
76internal static ObjectDetectionMetrics MeasureMetrics(IDataView dataView, 294IDataView idv, 340IDataView idv,
AutoFormerV2\ObjectDetectionTrainer.cs (5)
94public IDataView ValidationSet = null; 155public ObjectDetectionTransformer Fit(IDataView input) 204public Trainer(ObjectDetectionTrainer parent, IChannel ch, IDataView input) 243private protected int GetRowCountAndSetLabelCount(IDataView input) 285public void Train(IHost host, IDataView input, IProgressChannel pch)
NasBert\NasBertTrainer.cs (4)
185public NasBertTrainerBase(TorchSharpBaseTrainer<TLabelCol, TTargetsCol> parent, IChannel ch, IDataView input, string modelUrl) : base(parent, ch, input, modelUrl) 201private protected override Module CreateModule(IChannel ch, IDataView input) 216private protected override DataViewRowCursor GetRowCursor(IDataView input) 224private protected override void InitializeDataGetters(IDataView input, DataViewRowCursor cursor)
NasBert\NerTrainer.cs (4)
88IDataView validationSet = null, 104private protected override TrainerBase CreateTrainer(TorchSharpBaseTrainer<VBuffer<uint>, TargetType> parent, IChannel ch, IDataView input) 121public Trainer(TorchSharpBaseTrainer<VBuffer<uint>, TargetType> parent, IChannel ch, IDataView input) : base(parent, ch, input, ModelUrlString) 213private protected override int GetRowCountAndSetLabelCount(IDataView input)
NasBert\SentenceSimilarityTrainer.cs (4)
84IDataView validationSet = null, 102private protected override TrainerBase CreateTrainer(TorchSharpBaseTrainer<float, float> parent, IChannel ch, IDataView input) 116public Trainer(TorchSharpBaseTrainer<float, float> parent, IChannel ch, IDataView input) : base(parent, ch, input, ModelUrlString) 146private protected override int GetRowCountAndSetLabelCount(IDataView input)
NasBert\TextClassificationTrainer.cs (4)
85IDataView validationSet = null, 102private protected override TrainerBase CreateTrainer(TorchSharpBaseTrainer<uint, long> parent, IChannel ch, IDataView input) 116public Trainer(TorchSharpBaseTrainer<uint, long> parent, IChannel ch, IDataView input) : base(parent, ch, input, ModelUrlString) 148private protected override int GetRowCountAndSetLabelCount(IDataView input)
Roberta\QATrainer.cs (5)
126IDataView validationSet = null, 144public QATransformer Fit(IDataView input) 192public Trainer(QATrainer parent, IChannel ch, IDataView input) 230private protected int GetRowCount(IDataView input) 269public void Train(IHost host, IDataView input, IProgressChannel pch)
TorchSharpBaseTrainer.cs (11)
24public abstract TorchSharpBaseTransformer Fit(IDataView input); 73public IDataView ValidationSet = null; 97public override TorchSharpBaseTransformer Fit(IDataView input) 130private protected abstract TrainerBase CreateTrainer(TorchSharpBaseTrainer<TLabelCol, TTargetsCol> parent, IChannel ch, IDataView input); 145public TrainerBase(TorchSharpBaseTrainer<TLabelCol, TTargetsCol> parent, IChannel ch, IDataView input, string modelUrl) 166private protected abstract int GetRowCountAndSetLabelCount(IDataView input); 167private protected abstract Module CreateModule(IChannel ch, IDataView input); 197var validationSet = Parent.Option.ValidationSet; 223private protected abstract void InitializeDataGetters(IDataView input, DataViewRowCursor cursor); 269public void Train(IHost host, IDataView input) 355private protected abstract DataViewRowCursor GetRowCursor(IDataView input);
TorchSharpCatalog.cs (7)
50IDataView validationSet = null) 90IDataView validationSet = null) 154IDataView data, 165/// Obsolete: please use the <see cref="NamedEntityRecognition(MulticlassClassificationCatalog.MulticlassClassificationTrainers, string, string, string, int, int, BertArchitecture, IDataView)"/> method instead 186IDataView validationSet = null) 224IDataView validationSet = null) 269IDataView validationSet = null)
Microsoft.ML.TorchSharp.Tests (21)
NerTests.cs (8)
36var labels = ML.Data.LoadFromEnumerable( 46var dataView = ML.Data.LoadFromEnumerable( 85var output = transformer.Transform(dataView); 112var labels = ML.Data.LoadFromEnumerable( 125var dataView = ML.Data.LoadFromEnumerable( 164var output = transformer.Transform(dataView); 195var labels = ML.Data.LoadFromTextFile(labelFilePath, new TextLoader.Column[] 235var output = transformer.Transform(trainTest.TestSet);
ObjectDetectionTests.cs (1)
82var idv = model.Transform(data);
QATests.cs (3)
32var dataView = ML.Data.LoadFromEnumerable( 73IDataView dataView = TextLoader.Create(ML, new TextLoader.Options() 89var transformedData = model.Transform(dataView);
TextClassificationTests.cs (9)
54var dataView = ML.Data.LoadFromEnumerable( 117var dataNoLabel = ML.Data.LoadFromEnumerable( 181var predictionIdv = model.Transform(trainTestSplit.TestSet); 191var dataView = ML.Data.LoadFromEnumerable( 264var dataView = ML.Data.LoadFromEnumerable( 318var preppedData = dataPrepTransformer.Transform(dataView); 347var dataView = ML.Data.LoadFromEnumerable( 417IDataView dataView = TextLoader.Create(ML, new TextLoader.Options() 444var transformedData = model.Transform(dataSplit.TestSet);
Microsoft.ML.Transforms (234)
CategoricalCatalog.cs (3)
49IDataView keyData = null) 82IDataView keyData = null) 110IDataView keyData = null)
CompositeTransformer.cs (1)
35private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
CountFeatureSelection.cs (3)
191public ITransformer Fit(IDataView input) 227internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 293public static long[][] Train(IHostEnvironment env, IDataView input, string[] columns, out int[] colSizes)
CustomMappingCatalog.cs (4)
81public static IDataView FilterByCustomPredicate<TSrc>(this DataOperationsCatalog catalog, IDataView input, Func<TSrc, bool> filterPredicate) 95public static IDataView FilterByStatefulCustomPredicate<TSrc, TState>(this DataOperationsCatalog catalog, IDataView input, Func<TSrc, TState, bool> filterPredicate,
CustomMappingFactory.cs (2)
29/// <typeparam name="TSrc">The type that describes what 'source' columns are consumed from the input <see cref="IDataView"/>.</typeparam> 50/// <typeparam name="TSrc">The type that describes what 'source' columns are consumed from the input <see cref="IDataView"/>.</typeparam>
CustomMappingFilter.cs (4)
17protected readonly IDataView Input; 25private protected CustomMappingFilterBase(IHostEnvironment env, IDataView input) 61public CustomMappingFilter(IHostEnvironment env, IDataView input, Func<TSrc, bool> predicate) 138public StatefulCustomMappingFilter(IHostEnvironment env, IDataView input, Func<TSrc, TState, bool> predicate, Action<TState> stateInitAction)
CustomMappingTransformer.cs (4)
16/// <typeparam name="TSrc">The type that describes what 'source' columns are consumed from the input <see cref="IDataView"/>.</typeparam> 88/// Note that <see cref="IDataView"/>'s are lazy, so no actual transformations happen here, just schema validation. 90public IDataView Transform(IDataView input)
Dracula\CountTableTransformer.cs (6)
129public CountTableTransformer Fit(IDataView input) 178private void TrainTables(IDataView trainingData, List<DataViewSchema.Column> cols, MultiCountTableBuilderBase builder, DataViewSchema.Column labelColumn) 455private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 463internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 588IDataView ITransformerWithDifferentMappingAtTrainingTime.TransformForTrainingPipeline(IDataView input)
Dracula\CountTargetEncodingTransformer.cs (7)
276internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 289public CountTargetEncodingTransformer Fit(IDataView input) 391public IDataView Transform(IDataView input) 398IDataView ITransformerWithDifferentMappingAtTrainingTime.TransformForTrainingPipeline(IDataView input) 400var hashedData = HashingTransformer.Transform(input);
EntryPoints\TextAnalytics.cs (1)
125var view = est.Fit(input.Data).Transform(input.Data);
ExpressionTransformer.cs (3)
155public ExpressionTransformer Fit(IDataView input) 313private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 331private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
GcnTransform.cs (3)
211internal static IDataTransform Create(IHostEnvironment env, GcnOptions options, IDataView input) 238internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 278private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
GroupTransform.cs (5)
102/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 105public GroupTransform(IHostEnvironment env, IDataView input, string groupKey, params string[] columns) 110public GroupTransform(IHostEnvironment env, Options options, IDataView input) 119public static GroupTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 129private GroupTransform(IHost host, ModelLoadContext ctx, IDataView input)
HashJoiningTransform.cs (5)
182/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 188IDataView input, 198public HashJoiningTransform(IHostEnvironment env, Arguments args, IDataView input) 224private HashJoiningTransform(IHost host, ModelLoadContext ctx, IDataView input) 277public static HashJoiningTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
KeyToVectorMapping.cs (3)
113private static IDataTransform Create(IHostEnvironment env, IDataView input, params (string outputColumnName, string inputColumnName)[] columns) => 117private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 137private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
LambdaTransform.cs (6)
86/// input <see cref="IDataView"/>.</typeparam> 98public static IDataView CreateMap<TSrc, TDst, TState>(IHostEnvironment env, IDataView source, 129/// input <see cref="IDataView"/>.</typeparam> 139public static IDataView CreateFilter<TSrc, TState>(IHostEnvironment env, IDataView source,
LearnerFeatureSelection.cs (4)
87private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 266private static void TrainCore(IHost host, IDataView input, Options options, ref VBuffer<Single> scores) 278IDataView view = input; 306public static void Train(IHostEnvironment env, IDataView input, Options options, ref VBuffer<Single> scores)
LoadTransform.cs (4)
49/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 53public static IDataTransform Create(IHostEnvironment env, IDataView input, string modelFile, string[] tag, bool complement = false) 65private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) 73IDataView currentView;
MissingValueDroppingTransformer.cs (2)
148internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 152private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
MissingValueHandlingTransformer.cs (4)
114/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 118private static IDataView Create(IHostEnvironment env, IDataView input, string outputColumnName, string inputColumnName = null, 133internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input)
MissingValueIndicatorTransform.cs (3)
75public MissingValueIndicatorTransform(IHostEnvironment env, Arguments args, IDataView input) 85private MissingValueIndicatorTransform(IHost host, ModelLoadContext ctx, IDataView input) 98public static MissingValueIndicatorTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
MissingValueIndicatorTransformer.cs (2)
120internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 124internal static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
MissingValueReplacing.cs (6)
210internal MissingValueReplacingTransformer(IHostEnvironment env, IDataView input, params MissingValueReplacingEstimator.ColumnOptions[] columns) 277private void GetReplacementValues(IDataView input, MissingValueReplacingEstimator.ColumnOptions[] columns, out object[] repValues, out BitArray[] slotIsDefault, out DataViewType[] types) 429internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 454internal static IDataTransform Create(IHostEnvironment env, IDataView input, params MissingValueReplacingEstimator.ColumnOptions[] columns) 472private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 1061public MissingValueReplacingTransformer Fit(IDataView input) => new MissingValueReplacingTransformer(_host, input, _columns);
MutualInformationFeatureSelection.cs (4)
169public ITransformer Fit(IDataView input) 258internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 395internal static float[][] TrainCore(IHost host, IDataView input, string labelColumnName, string[] columns, int numBins, int[] colSizes) 436public float[][] GetScores(IDataView input, string labelColumnName, string[] columns, int numBins, int[] colSizes)
NAHandling.cs (1)
70var xf = new MissingValueIndicatorTransformer(h, input).Transform(input.Data);
OneHotEncoding.cs (10)
94internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 114IDataView keyData = null; 121var transformed = new OneHotEncodingEstimator(env, columns.ToArray(), keyData).Fit(input).Transform(input); 127internal OneHotEncodingTransformer(ValueToKeyMappingEstimator term, IEstimator<ITransformer> toVector, IDataView input) 137public IDataView Transform(IDataView input) => _transformer.Transform(input); 194/// <seealso cref="CategoricalCatalog.OneHotEncoding(TransformsCatalog.CategoricalTransforms, InputOutputColumnPair[], OneHotEncodingEstimator.OutputKind, int, ValueToKeyMappingEstimator.KeyOrdinality, IDataView)"/> 195/// <seealso cref="CategoricalCatalog.OneHotEncoding(TransformsCatalog.CategoricalTransforms, string, string, OneHotEncodingEstimator.OutputKind, int, ValueToKeyMappingEstimator.KeyOrdinality, IDataView)"/> 278internal OneHotEncodingEstimator(IHostEnvironment env, ColumnOptions[] columns, IDataView keyData = null) 339public OneHotEncodingTransformer Fit(IDataView input) => new OneHotEncodingTransformer(_term, _toSomething, input);
OneHotHashEncoding.cs (10)
123/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 132private static IDataView Create(IHostEnvironment env, 133IDataView input, 140return new OneHotHashEncodingEstimator(env, name, source, numberOfBits, maximumNumberOfInverts, outputKind).Fit(input).Transform(input) as IDataView; 143internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 169internal OneHotHashEncodingTransformer(HashingEstimator hash, IEstimator<ITransformer> keyToVector, IDataView input) 183/// Take the data in, make transformations, output the data. Note that <see cref="IDataView"/> 186public IDataView Transform(IDataView input) => _transformer.Transform(input); 390public OneHotHashEncodingTransformer Fit(IDataView input) => new OneHotHashEncodingTransformer(_hash, _toSomething, input);
OptionalColumnTransform.cs (5)
265/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 267public OptionalColumnTransform(IHostEnvironment env, IDataView input, params string[] columns) 275public OptionalColumnTransform(IHostEnvironment env, Arguments args, IDataView input) 284private OptionalColumnTransform(IHost host, ModelLoadContext ctx, IDataView input) 294public static OptionalColumnTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
PermutationFeatureImportance.cs (3)
24IDataView data, 26Func<IDataView, TMetric> evaluationFunc, 221IDataView viewPermuted = LambdaTransform.CreateMap(
PermutationFeatureImportanceExtensions.cs (14)
68IDataView data, 131IDataView data, 146RegressionMetrics evaluationFunc(IDataView idv) => catalog.Evaluate(idv, labelColumnName); 218IDataView data, 281IDataView data, 296BinaryClassificationMetrics evaluationFunc(IDataView idv) => catalog.EvaluateNonCalibrated(idv, labelColumnName); 372IDataView data, 435IDataView data, 450MulticlassClassificationMetrics evaluationFunc(IDataView idv) => catalog.Evaluate(idv, labelColumnName); 532IDataView data, 597IDataView data, 613RankingMetrics evaluationFunc(IDataView idv) => catalog.Evaluate(idv, labelColumnName, rowGroupColumnName); 655IDataView data, 657Func<IDataView, TMetric> evaluationFunc,
ProduceIdTransform.cs (3)
100public ProduceIdTransform(IHostEnvironment env, Arguments args, IDataView input) 109private ProduceIdTransform(IHost host, ModelLoadContext ctx, IDataView input) 119public static ProduceIdTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
RandomFourierFeaturizing.cs (5)
253internal ApproximatedKernelTransformer(IHostEnvironment env, IDataView input, ApproximatedKernelMappingEstimator.ColumnOptions[] columns) 279private float[] GetAvgDistances(ApproximatedKernelMappingEstimator.ColumnOptions[] columns, IDataView input) 386private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 410private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 716public ApproximatedKernelTransformer Fit(IDataView input) => new ApproximatedKernelTransformer(_host, input, _columns);
StatefulCustomMappingTransformer.cs (4)
86/// Note that <see cref="IDataView"/>'s are lazy, so no actual transformations happen here, just schema validation. 88public IDataView Transform(IDataView input) 113public RowToRowMapper(IHostEnvironment env, StatefulCustomMappingTransformer<TSrc, TDst, TState> parent, IDataView input)
StatefulFilterTransform.cs (7)
18/// as well as the ability to 'accept' or 'filter out' some rows of the supplied <see cref="IDataView"/>. 22/// <typeparam name="TSrc">The type that describes what 'source' columns are consumed from the input <see cref="IDataView"/>.</typeparam> 32private readonly IDataView _source; 54public StatefulFilterTransform(IHostEnvironment env, IDataView source, Func<TSrc, TDst, TState, bool> filterFunc, 79private StatefulFilterTransform(IHostEnvironment env, StatefulFilterTransform<TSrc, TDst, TState> transform, IDataView newSource) 93DataViewSchema IDataView.Schema => OutputSchema; 125public IDataView Source => _source;
SvmLight\SvmLightLoader.cs (11)
392/// This class creates an <see cref="IDataView"/> from an <see cref="IMultiStreamSource"/>, that has a single text column 569var data = GetData(_host, options.NumberOfRows, dataSample); 580var data = GetData(_host, options.NumberOfRows, dataSample); 641var data = GetData(_host, null, new MultiFileSource(null)); 652private static IDataView GetData(IHostEnvironment env, long? numRows, IMultiStreamSource dataSample) 654IDataView data = new TextDataView(env, dataSample); 673private static uint InferMax(IHostEnvironment env, IDataView view) 750public IDataView Load(IMultiStreamSource input) 754var data = GetData(_host, null, input); 780private readonly IDataView _view; 783public LegacyLoader(SvmLightLoader loader, IDataView view)
SvmLight\SvmLightLoaderSaverCatalog.cs (6)
56/// Load a <see cref="IDataView"/> from a text file using <see cref="SvmLightLoader"/>. 65public static IDataView LoadFromSvmLightFile(this DataOperationsCatalog catalog, 83/// Load a <see cref="IDataView"/> from a text file containing features specified by feature names, 89public static IDataView LoadFromSvmLightFileWithFeatureNames(this DataOperationsCatalog catalog, 105/// Save the <see cref="IDataView"/> in SVM-light format. Four columns can be saved: a label and a features column, 121IDataView data,
SvmLight\SvmLightSaver.cs (1)
87public void SaveData(Stream stream, IDataView data, params int[] cols)
Text\LdaTransform.cs (5)
690internal static LatentDirichletAllocationTransformer TrainLdaTransformer(IHostEnvironment env, IDataView inputData, params LatentDirichletAllocationEstimator.ColumnOptions[] columns) 713private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 721private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 822private static List<VBuffer<ReadOnlyMemory<char>>> Train(IHostEnvironment env, IChannel ch, IDataView inputData, LdaState[] states, params LatentDirichletAllocationEstimator.ColumnOptions[] columns) 1340public LatentDirichletAllocationTransformer Fit(IDataView input)
Text\NgramHashingTransformer.cs (4)
191internal NgramHashingTransformer(IHostEnvironment env, IDataView input, params NgramHashingEstimator.ColumnOptions[] columns) : 270private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 332private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 1237public NgramHashingTransformer Fit(IDataView input) => new NgramHashingTransformer(_host, input, _columns);
Text\NgramTransform.cs (5)
207internal NgramExtractingTransformer(IHostEnvironment env, IDataView input, NgramExtractingEstimator.ColumnOptions[] columns) 221private static SequencePool[] Train(IHostEnvironment env, NgramExtractingEstimator.ColumnOptions[] columns, ImmutableArray<TransformInfo> transformInfos, IDataView trainingData, out double[][] invDocFreqs) 372private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 409internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 956public NgramExtractingTransformer Fit(IDataView input) => new NgramExtractingTransformer(_host, input, _columns);
Text\SentimentAnalyzingTransform.cs (8)
52internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) 118private static IDataView AliasIfNeeded(IHostEnvironment env, IDataView input, string[] colNames, out KeyValuePair<string, string>[] hiddenNames) 137private static IDataView UnaliasIfNeeded(IHostEnvironment env, IDataView input, KeyValuePair<string, string>[] hiddenNames) 146private static IDataView LoadTransforms(IHostEnvironment env, IDataView input, string modelFile) 148var view = input;
Text\StopWordsRemovingTransformer.cs (7)
52internal interface IStopWordsRemoverFactory : IComponentFactory<IDataView, OneToOneColumn[], ITransformer> { } 58public ITransformer CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] columns) 254internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 275private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 735public ITransformer CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] column) 1030internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 1052private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Text\TextFeaturizingEstimator.cs (7)
435public ITransformer Fit(IDataView input) 447IDataView view = input; 609private static TransformerChain<ITransformer> AddToChainAndTransform(TransformerChain<ITransformer> chain, ITransformer transformer, ref IDataView view) 661internal static IDataTransform Create(IHostEnvironment env, Options args, IDataView data) 694public IDataView Transform(IDataView input) 730IDataView data = loader;
Text\TextNormalizing.cs (2)
172private static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 189private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input)
Text\TokenizingByCharacters.cs (2)
138private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 166internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input)
Text\WordBagTransform.cs (7)
173internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) => 259private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 514IDataView keyData = null; 541internal static IDataTransform CreateDataTransform(IHostEnvironment env, Options options, IDataView input, 622ITransformer Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols); 647public ITransformer Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols) 669public ITransformer Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols)
Text\WordEmbeddingsExtractor.cs (3)
219internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) 278private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 950public WordEmbeddingTransformer Fit(IDataView input)
Text\WordHashBagProducingTransform.cs (5)
86internal static ITransformer CreateTransformer(IHostEnvironment env, Options options, IDataView input) 100IDataView view = input; 159internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input) => 322internal static ITransformer Create(IHostEnvironment env, Options options, IDataView input) 378internal static ITransformer Create(NgramHashExtractorArguments extractorArgs, IHostEnvironment env, IDataView input,
Text\WordTokenizing.cs (2)
147private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 176internal static IDataTransform Create(IHostEnvironment env, Options options, IDataView input)
Text\WrappedTextTransformers.cs (2)
191public ITransformer Fit(IDataView input) 375public ITransformer Fit(IDataView input)
UngroupTransform.cs (6)
101/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> 104public UngroupTransform(IHostEnvironment env, IDataView input, UngroupMode mode, params string[] columns) 109public UngroupTransform(IHostEnvironment env, Options options, IDataView input) 120public static UngroupTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 130private UngroupTransform(IHost host, ModelLoadContext ctx, IDataView input) 256/// Columns contained in <see cref="IDataView"/> passed in <see cref="UngroupTransform"/>.
Microsoft.ML.Vision (17)
DnnRetrainTransform.cs (9)
156internal static IDataTransform Create(IHostEnvironment env, DnnRetrainEstimator.Options options, IDataView input) 167internal DnnRetrainTransformer(IHostEnvironment env, DnnRetrainEstimator.Options options, IDataView input) 172internal DnnRetrainTransformer(IHostEnvironment env, DnnRetrainEstimator.Options options, ML.TensorFlow.TensorFlowSessionWrapper tensorFlowModel, IDataView input, IDataView validationSet = null) 275private void TrainCore(DnnRetrainEstimator.Options options, IDataView input, IDataView validationSet) 496private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) 1138/// The name of the label column in <see cref="IDataView"/> that will be mapped to label node in TensorFlow model. 1281public DnnRetrainTransformer Fit(IDataView input)
ImageClassificationTrainer.cs (6)
430public IDataView ValidationSet; 510IDataView validationSet = null) 598private void InitializeTrainingGraph(IDataView input) 815private void CacheFeaturizedImagesToDisk(IDataView input, string labelColumnName, string imageColumnName, 1342IDataView trainData, IDataView validationData) => TrainTransformer(trainData, validationData);
VisionCatalog.cs (2)
36/// The value of <paramref name="labelColumnName"/> from <see cref="IDataView"/> is fed to this node.</param> 127IDataView validationSet = null)