171 instantiations of SchemaShape
Microsoft.ML.Core (3)
Data\IEstimator.cs (3)
22private static readonly SchemaShape _empty = new SchemaShape(Enumerable.Empty<Column>()); 194var annotations = mCols.Count > 0 ? new SchemaShape(mCols) : _empty; 200return new SchemaShape(cols);
Microsoft.ML.Data (22)
Prediction\CalibratorCatalog.cs (2)
128false, new SchemaShape(annotations)); 130return new SchemaShape(outColumns.Values);
Training\TrainerEstimatorBase.cs (1)
89return new SchemaShape(outColumns.Values);
Transforms\ColumnConcatenatingEstimator.cs (2)
138return new SchemaShape.Column(name, vecKind, itemType, false, new SchemaShape(meta)); 150return new SchemaShape(result.Values);
Transforms\ColumnCopying.cs (1)
84return new SchemaShape(resultDic.Values);
Transforms\ColumnSelecting.cs (1)
143return new SchemaShape(columns);
Transforms\FeatureContributionCalculationTransformer.cs (2)
356DefaultColumnNames.FeatureContributions, col.Kind, col.ItemType, false, new SchemaShape(featContributionMetadata)); 358return new SchemaShape(result.Values);
Transforms\Hashing.cs (2)
1969NumberDataViewType.UInt32, true, new SchemaShape(metadata)); 1971return new SchemaShape(result.Values);
Transforms\KeyToValue.cs (2)
650metadata = new SchemaShape(new[] { slotCol }); 655return new SchemaShape(result.Values);
Transforms\KeyToVector.cs (2)
840NumberDataViewType.Single, false, new SchemaShape(metadata)); 843return new SchemaShape(result.Values);
Transforms\Normalizer.cs (2)
364var meta = new SchemaShape(newMetadataKinds); 368return new SchemaShape(result.Values);
Transforms\TypeConverting.cs (1)
648return new SchemaShape(result.Values);
Transforms\ValueMapping.cs (1)
131return new SchemaShape(resultDic.Values);
Transforms\ValueToKeyMappingEstimator.cs (3)
201metadata = new SchemaShape(new[] { slotMeta, kv }); 203metadata = new SchemaShape(new[] { kv }); 207return new SchemaShape(result.Values);
Microsoft.ML.FastTree (14)
FastTreeClassification.cs (3)
316new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 317new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 318new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeRanking.cs (1)
489new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeRegression.cs (1)
205new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeTweedie.cs (1)
364new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
GamClassification.cs (3)
187new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 188new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 189new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
GamRegression.cs (1)
139new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
RandomForestClassification.cs (2)
379new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 380new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
RandomForestRegression.cs (1)
508new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
TreeEnsembleFeaturizationEstimator.cs (1)
148return new SchemaShape(result.Values);
Microsoft.ML.ImageAnalytics (5)
ImageGrayscale.cs (1)
260return new SchemaShape(result.Values);
ImageLoader.cs (1)
454return new SchemaShape(result.Values);
ImagePixelExtractor.cs (1)
824return new SchemaShape(result.Values);
ImageResizer.cs (1)
523return new SchemaShape(result.Values);
VectorToImageTransform.cs (1)
758return new SchemaShape(result.Values);
Microsoft.ML.KMeansClustering (2)
KMeansPlusPlusTrainer.cs (2)
311new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 317new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.LightGbm (7)
LightGbmBinaryTrainer.cs (3)
286new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 287new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 288new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmMulticlassTrainer.cs (2)
367var metadata = LightGbmTrainerOptions.LightGbmModel == null ? new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues).Concat(AnnotationUtils.GetTrainerOutputAnnotation())) : new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()); 370new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))),
LightGbmRankingTrainer.cs (1)
302new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmRegressionTrainer.cs (1)
250new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.Mkl.Components (5)
OlsLinearRegression.cs (1)
138new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
SymSgdClassificationTrainer.cs (3)
276new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 277new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 278new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
VectorWhitening.cs (1)
903return new SchemaShape(result.Values);
Microsoft.ML.OnnxTransformer (1)
OnnxTransform.cs (1)
1090return new SchemaShape(resultDic.Values);
Microsoft.ML.PCA (3)
PcaTrainer.cs (2)
380new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 386new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
PcaTransformer.cs (1)
831return new SchemaShape(result.Values);
Microsoft.ML.Recommender (2)
MatrixFactorizationTrainer.cs (2)
585return new SchemaShape(outColumns.Values); 595new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Microsoft.ML.StandardTrainers (42)
FactorizationMachine\FactorizationMachineTrainer.cs (4)
651return new SchemaShape(outColumns.Values); 661new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 662new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 663new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LdSvm\LdSvmTrainer.cs (2)
184new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 185new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\LogisticRegression.cs (3)
173new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 174new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 175new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
378new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))),
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (3)
158return new SchemaShape(outColumns.Values); 178false, new SchemaShape(scoreAnnotationCols)), 180true, new SchemaShape(predictedLabelAnnotationCols))
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (1)
124new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))),
Standard\Online\AveragedPerceptron.cs (2)
201new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 202new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\LinearSvm.cs (2)
309new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 310new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\OnlineGradientDescent.cs (1)
172new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\PoissonRegression\PoissonRegression.cs (1)
123new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\SdcaBinary.cs (16)
1629new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 1635new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 1641new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 1728new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()) 1735new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 1786new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()) 1793new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 1804new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true)))); 2303new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2304new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2305new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2392new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2393new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2446new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2447new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2448new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\SdcaMulticlass.cs (1)
168new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))),
Standard\SdcaRegression.cs (1)
197new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Simple\SimpleTrainers.cs (4)
318new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 319new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 320new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 325return new SchemaShape(outColumns.Values);
Microsoft.ML.TensorFlow (1)
TensorflowTransform.cs (1)
1050return new SchemaShape(resultDic.Values);
Microsoft.ML.TimeSeries (11)
IidChangePointDetector.cs (2)
276Transformer.InternalTransform.OutputColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata)); 278return new SchemaShape(resultDic.Values);
IidSpikeDetector.cs (2)
251Transformer.InternalTransform.OutputColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata)); 253return new SchemaShape(resultDic.Values);
SRCNNAnomalyDetector.cs (2)
283Transformer.InternalTransform.OutputColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata)); 285return new SchemaShape(resultDic.Values);
SsaChangePointDetector.cs (2)
311_options.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata)); 313return new SchemaShape(resultDic.Values);
SSaForecasting.cs (1)
354return new SchemaShape(resultDic.Values);
SsaSpikeDetector.cs (2)
290_options.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata)); 292return new SchemaShape(resultDic.Values);
Microsoft.ML.TorchSharp (17)
AutoFormerV2\ObjectDetectionTrainer.cs (6)
465NumberDataViewType.UInt32, true, new SchemaShape(metadata.ToArray())); 471NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 474return new SchemaShape(outColumns.Values); 548var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 569NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 571return new SchemaShape(outColumns.Values);
NasBert\NasBertTrainer.cs (7)
336NumberDataViewType.UInt32, true, new SchemaShape(metadata.ToArray())); 339NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))); 351NumberDataViewType.UInt32, true, new SchemaShape(metadata.ToArray())); 359return new SchemaShape(outColumns.Values); 437var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 444NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelAnnotationsColumn))); 452return new SchemaShape(outColumns.Values);
Roberta\QATrainer.cs (4)
523NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 525return new SchemaShape(outColumns.Values); 610NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 612return new SchemaShape(outColumns.Values);
Microsoft.ML.Transforms (34)
CountFeatureSelection.cs (2)
183result[colPair.Name] = new SchemaShape.Column(colPair.Name, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray())); 185return new SchemaShape(result.Values);
CustomMappingTransformer.cs (1)
279return new SchemaShape(result.Values);
Dracula\CountTableTransformer.cs (2)
344var meta = new SchemaShape(newMetadataKinds); 348return new SchemaShape(result.Values);
ExpressionTransformer.cs (2)
205var outputSchemaShapeColumn = new SchemaShape.Column(_columns[i].Name, outputVectorKind, typeRes, false, new SchemaShape(metadata)); 208return new SchemaShape(columnDictionary.Values);
GcnTransform.cs (2)
924result[colPair.Name] = new SchemaShape.Column(colPair.Name, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray())); 926return new SchemaShape(result.Values);
KeyToVectorMapping.cs (2)
486NumberDataViewType.Single, false, new SchemaShape(metadata)); 489return new SchemaShape(result.Values);
MissingValueDroppingTransformer.cs (1)
54return new SchemaShape(resultDic.Values);
MissingValueIndicatorTransformer.cs (2)
549result[colPair.outputColumnName] = new SchemaShape.Column(colPair.outputColumnName, col.Kind, type, false, new SchemaShape(metadata.ToArray())); 551return new SchemaShape(result.Values);
MissingValueReplacing.cs (2)
1053result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, col.Kind, type, false, new SchemaShape(metadata.ToArray())); 1055return new SchemaShape(result.Values);
MutualInformationFeatureSelection.cs (2)
250result[colPair.outputColumnName] = new SchemaShape.Column(colPair.outputColumnName, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray())); 252return new SchemaShape(result.Values);
RandomFourierFeaturizing.cs (1)
736return new SchemaShape(result.Values);
StatefulCustomMappingTransformer.cs (1)
412return new SchemaShape(result.Values);
Text\LdaTransform.cs (1)
1334return new SchemaShape(result.Values);
Text\NgramHashingTransformer.cs (2)
1229result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(metadata)); 1231return new SchemaShape(result.Values);
Text\NgramTransform.cs (2)
1090result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(metadata)); 1092return new SchemaShape(result.Values);
Text\StopWordsRemovingTransformer.cs (2)
681return new SchemaShape(result.Values); 1249return new SchemaShape(result.Values);
Text\TextFeaturizingEstimator.cs (2)
649new SchemaShape(metadata)); 657return new SchemaShape(result.Values);
Text\TextNormalizing.cs (1)
590return new SchemaShape(result.Values);
Text\TokenizingByCharacters.cs (2)
696result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, SchemaShape.Column.VectorKind.VariableVector, NumberDataViewType.UInt16, true, new SchemaShape(metadata.ToArray())); 699return new SchemaShape(result.Values);
Text\WordEmbeddingsExtractor.cs (1)
944return new SchemaShape(result.Values);
Text\WordTokenizing.cs (1)
543return new SchemaShape(result.Values);
Microsoft.ML.Vision (2)
DnnRetrainTransform.cs (1)
1275return new SchemaShape(resultDic.Values);
ImageClassificationTrainer.cs (1)
645NumberDataViewType.UInt32, true, new SchemaShape(metadata.ToArray()))
1048 references to SchemaShape
Microsoft.ML.Core (36)
Data\AnnotationUtils.cs (25)
310public static bool NeedsSlotNames(this SchemaShape.Column col) 313&& metaCol.Kind == SchemaShape.Column.VectorKind.Vector 324public static bool IsNormalized(this SchemaShape.Column column) 328&& metaCol.Kind == SchemaShape.Column.VectorKind.Scalar && !metaCol.IsKey 339public static bool HasSlotNames(this SchemaShape.Column col) 342return col.Kind == SchemaShape.Column.VectorKind.Vector 344&& metaCol.Kind == SchemaShape.Column.VectorKind.Vector && !metaCol.IsKey 425public static IEnumerable<SchemaShape.Column> GetTrainerOutputAnnotation(bool isNormalized = false) 427var cols = new List<SchemaShape.Column>(); 428cols.Add(new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true)); 429cols.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false)); 430cols.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false)); 432cols.Add(new SchemaShape.Column(Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 441public static IEnumerable<SchemaShape.Column> AnnotationsForMulticlassScoreColumn(SchemaShape.Column? labelColumn = null) 443var cols = new List<SchemaShape.Column>(); 447metaCol.Kind == SchemaShape.Column.VectorKind.Vector) 450cols.Add(new SchemaShape.Column(Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 451cols.Add(new SchemaShape.Column(Kinds.TrainingLabelValues, SchemaShape.Column.VectorKind.Vector, metaCol.ItemType, false));
Data\IEstimator.cs (11)
18public sealed class SchemaShape : IReadOnlyList<SchemaShape.Column> 22private static readonly SchemaShape _empty = new SchemaShape(Enumerable.Empty<Column>()); 59public readonly SchemaShape Annotations; 62internal Column(string name, VectorKind vecKind, DataViewType itemType, bool isKey, SchemaShape annotations = null) 138/// as a <see cref="SchemaShape"/>'s column type. 178internal static SchemaShape Create(DataViewSchema schema) 194var annotations = mCols.Count > 0 ? new SchemaShape(mCols) : _empty; 260SchemaShape GetOutputSchema(); 306/// It also provides the 'schema propagation' like transformers do, but over <see cref="SchemaShape"/> instead of <see cref="DataViewSchema"/>. 320SchemaShape GetOutputSchema(SchemaShape inputSchema);
Microsoft.ML.Data (183)
DataLoadSave\CompositeLoaderEstimator.cs (2)
40public SchemaShape GetOutputSchema() 42var shape = _start.GetOutputSchema();
DataLoadSave\EstimatorChain.cs (4)
61GetOutputSchema(SchemaShape.Create(input.Schema)); 83public SchemaShape GetOutputSchema(SchemaShape inputSchema) 85var s = inputSchema;
DataLoadSave\EstimatorExtensions.cs (2)
119public SchemaShape GetOutputSchema(SchemaShape inputSchema)
DataLoadSave\FakeSchema.cs (5)
24public static DataViewSchema Create(SchemaShape shape) 31var partialAnnotations = shape[i].Annotations; 47private static DataViewType MakeColumnType(SchemaShape.Column column) 52if (column.Kind == SchemaShape.Column.VectorKind.VariableVector) 54else if (column.Kind == SchemaShape.Column.VectorKind.Vector)
DataLoadSave\TransformWrapper.cs (3)
76public SchemaShape GetOutputSchema(SchemaShape inputSchema) 82return SchemaShape.Create(transformer.GetOutputSchema(fakeSchema));
DataLoadSave\TrivialEstimator.cs (2)
42public abstract SchemaShape GetOutputSchema(SchemaShape inputSchema);
DataLoadSave\TrivialLoaderEstimator.cs (2)
22public SchemaShape GetOutputSchema() => SchemaShape.Create(Loader.GetOutputSchema());
Prediction\CalibratorCatalog.cs (17)
53private protected readonly SchemaShape.Column ScoreColumn; 55private protected readonly SchemaShape.Column LabelColumn; 57private protected readonly SchemaShape.Column WeightColumn; 59private protected readonly SchemaShape.Column PredictedLabel; 79/// Gets the output <see cref="SchemaShape"/> of the <see cref="IDataView"/> after fitting the calibrator. 84/// <param name="inputSchema">The input <see cref="SchemaShape"/>.</param> 85SchemaShape IEstimator<CalibratorTransformer<TICalibrator>>.GetOutputSchema(SchemaShape inputSchema) 87Action<SchemaShape.Column, string> checkColumnValid = (SchemaShape.Column column, string columnRole) => 105const SchemaShape.Column.VectorKind scalar = SchemaShape.Column.VectorKind.Scalar; 107var annotations = new List<SchemaShape.Column>(); 108annotations.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, 109SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 125outColumns[DefaultColumnNames.Probability] = new SchemaShape.Column(DefaultColumnNames.Probability, 126SchemaShape.Column.VectorKind.Scalar,
Training\TrainerEstimatorBase.cs (19)
30public readonly SchemaShape.Column FeatureColumn; 36public readonly SchemaShape.Column LabelColumn; 42public readonly SchemaShape.Column WeightColumn; 59SchemaShape.Column feature, 60SchemaShape.Column label, 61SchemaShape.Column weight = default) 79public SchemaShape GetOutputSchema(SchemaShape inputSchema) 95private protected abstract SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema); 105private void CheckInputSchema(SchemaShape inputSchema) 133private protected virtual void CheckLabelCompatible(SchemaShape.Column labelCol) 147CheckInputSchema(SchemaShape.Create(trainSet.Schema)); 153CheckInputSchema(SchemaShape.Create(validationSet.Schema)); 184public readonly SchemaShape.Column GroupIdColumn; 188SchemaShape.Column feature, 189SchemaShape.Column label, 190SchemaShape.Column weight = default, 191SchemaShape.Column groupId = default)
Training\TrainerUtils.cs (20)
348/// The <see cref="SchemaShape.Column"/> for the label column for binary classification tasks. 351public static SchemaShape.Column MakeBoolScalarLabel(string labelColumn) 352=> new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false); 355/// The <see cref="SchemaShape.Column"/> for the float type columns. 358public static SchemaShape.Column MakeR4ScalarColumn(string columnName) 359=> new SchemaShape.Column(columnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 362/// The <see cref="SchemaShape.Column"/> for the label column for regression tasks. 365public static SchemaShape.Column MakeU4ScalarColumn(string columnName) 370return new SchemaShape.Column(columnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true); 374/// The <see cref="SchemaShape.Column"/> for the feature column. 377public static SchemaShape.Column MakeR4VecFeature(string featureColumn) 378=> new SchemaShape.Column(featureColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 381/// The <see cref="SchemaShape.Column"/> for the weight column. 384public static SchemaShape.Column MakeR4ScalarWeightColumn(string weightColumn) 388return new SchemaShape.Column(weightColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false);
Transforms\ColumnConcatenatingEstimator.cs (21)
75private bool HasCategoricals(SchemaShape.Column col) 82return mcol.Kind == SchemaShape.Column.VectorKind.Vector 86private SchemaShape.Column CheckInputsAndMakeColumn( 87SchemaShape inputSchema, string name, string[] sources) 91var cols = new SchemaShape.Column[sources.Length]; 122varVector |= col.Kind == SchemaShape.Column.VectorKind.VariableVector; 125hasSlotNames |= col.Kind == SchemaShape.Column.VectorKind.Scalar || col.HasSlotNames(); 127var vecKind = varVector ? SchemaShape.Column.VectorKind.VariableVector : 128SchemaShape.Column.VectorKind.Vector; 130List<SchemaShape.Column> meta = new List<SchemaShape.Column>(); 132meta.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 134meta.Add(new SchemaShape.Column(AnnotationUtils.Kinds.CategoricalSlotRanges, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Int32, false)); 136meta.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 138return new SchemaShape.Column(name, vecKind, itemType, false, new SchemaShape(meta)); 142/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 145public SchemaShape GetOutputSchema(SchemaShape inputSchema)
Transforms\ColumnCopying.cs (4)
69/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 72public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 81var col = new SchemaShape.Column(outputColumnName, originalColumn.Kind, originalColumn.ItemType, originalColumn.IsKey, originalColumn.Annotations);
Transforms\ColumnSelecting.cs (3)
129/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 132public override SchemaShape GetOutputSchema(SchemaShape inputSchema)
Transforms\FeatureContributionCalculationTransformer.cs (6)
335/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 338public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 345if (col.ItemType != NumberDataViewType.Single || col.Kind != SchemaShape.Column.VectorKind.Vector) 352var featContributionMetadata = new List<SchemaShape.Column>(); 355result[DefaultColumnNames.FeatureContributions] = new SchemaShape.Column(
Transforms\Hashing.cs (8)
1950/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1953public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1963var metadata = new List<SchemaShape.Column>(); 1967metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 1968result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, colInfo.Combine ? SchemaShape.Column.VectorKind.Scalar : col.Kind,
Transforms\KeyToValue.cs (5)
631/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 634public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 648SchemaShape metadata = null; 652result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, col.Kind, keyMetaCol.ItemType, keyMetaCol.IsKey, metadata);
Transforms\KeyToVector.cs (18)
815/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 818public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 829var metadata = new List<SchemaShape.Column>(); 831if (((colInfo.OutputCountVector && col.IsKey) || col.Kind != SchemaShape.Column.VectorKind.VariableVector) && keyMeta.ItemType is TextDataViewType) 832metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, keyMeta.ItemType, false)); 833if (!colInfo.OutputCountVector && (col.Kind == SchemaShape.Column.VectorKind.Scalar || col.Kind == SchemaShape.Column.VectorKind.Vector)) 834metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.CategoricalSlotRanges, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Int32, false)); 835if (!colInfo.OutputCountVector || (col.Kind == SchemaShape.Column.VectorKind.Scalar)) 836metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 838result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, 839col.Kind == SchemaShape.Column.VectorKind.VariableVector && !colInfo.OutputCountVector ? SchemaShape.Column.VectorKind.VariableVector : SchemaShape.Column.VectorKind.Vector,
Transforms\Normalizer.cs (9)
341/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 344public SchemaShape GetOutputSchema(SchemaShape inputSchema) 353if (col.Kind == SchemaShape.Column.VectorKind.VariableVector) 359var isNormalizedMeta = new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, 361var newMetadataKinds = new List<SchemaShape.Column> { isNormalizedMeta }; 364var meta = new SchemaShape(newMetadataKinds); 365result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, col.Kind, col.ItemType, col.IsKey, meta);
Transforms\TypeConverting.cs (14)
619/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 622public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 634var metadata = new List<SchemaShape.Column>(); 636metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 638if (col.Kind == SchemaShape.Column.VectorKind.Vector) 639metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, slotMeta.ItemType, false)); 642metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, keyMeta.ItemType, false)); 645metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, normMeta.ItemType, false)); 646result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, col.Kind, newType, false, col.Annotations);
Transforms\ValueMapping.cs (11)
86/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 89public sealed override SchemaShape GetOutputSchema(SchemaShape inputSchema) 97var vectorKind = SchemaShape.Column.VectorKind.Scalar; 100vectorKind = SchemaShape.Column.VectorKind.Vector; 102vectorKind = SchemaShape.Column.VectorKind.VariableVector; 111var metadataShape = SchemaShape.Create(Transformer.ValueColumnMetadata.Schema); 117if (originalColumn.Kind == SchemaShape.Column.VectorKind.VariableVector || 118originalColumn.Kind == SchemaShape.Column.VectorKind.Vector) 128var col = new SchemaShape.Column(outputColumnName, vectorKind, columnType, isKey, metadataShape);
Transforms\ValueToKeyMappingEstimator.cs (8)
175/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 178public SchemaShape GetOutputSchema(SchemaShape inputSchema) 189SchemaShape metadata; 193if (!col.IsKey || !col.Annotations.TryFindColumn(AnnotationUtils.Kinds.KeyValues, out var kv) || kv.Kind != SchemaShape.Column.VectorKind.Vector) 195kv = new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 204result[colInfo.OutputColumnName] = new SchemaShape.Column(colInfo.OutputColumnName, col.Kind, NumberDataViewType.UInt32, true, metadata);
Microsoft.ML.FastTree (68)
BoostingFastTree.cs (2)
16private protected BoostingFastTreeTrainerBase(IHostEnvironment env, TOptions options, SchemaShape.Column label) : base(env, options, label) 21SchemaShape.Column label,
FastTree.cs (2)
104SchemaShape.Column label, 142private protected FastTreeTrainerBase(IHostEnvironment env, TOptions options, SchemaShape.Column label)
FastTreeClassification.cs (8)
312private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 316new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 317new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 318new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeRanking.cs (6)
120private protected override void CheckLabelCompatible(SchemaShape.Column labelCol) 127if (labelCol.Kind != SchemaShape.Column.VectorKind.Scalar) 485private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 489new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeRegression.cs (7)
141private static SchemaShape.Column MakeLabelColumn(string labelColumn) 143return new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 201private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 205new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeTweedie.cs (7)
77private SchemaShape.Column[] _outputColumns; 211new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) 360private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 364new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
GamClassification.cs (8)
183private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 187new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 188new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 189new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
GamRegression.cs (4)
135private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 139new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
GamTrainer.cs (2)
170SchemaShape.Column label, 196private protected GamTrainerBase(IHostEnvironment env, TOptions options, string name, SchemaShape.Column label)
RandomForest.cs (2)
19private protected RandomForestTrainerBase(IHostEnvironment env, TOptions options, SchemaShape.Column label, bool quantileEnabled = false) 29SchemaShape.Column label,
RandomForestClassification.cs (6)
375private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 379new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 380new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
RandomForestRegression.cs (4)
504private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 508new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
TreeEnsembleFeaturizationEstimator.cs (10)
15/// All tree-based featurizers share the same output schema computed by <see cref="GetOutputSchema(SchemaShape)"/>. All tree-based featurizers 126/// <returns>Output <see cref="SchemaShape"/> produced by <see cref="PretrainedTreeFeaturizationEstimator"/>.</returns> 127public SchemaShape GetOutputSchema(SchemaShape inputSchema) 137result[TreesColumnName] = new SchemaShape.Column(TreesColumnName, 138SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 141result[LeavesColumnName] = new SchemaShape.Column(LeavesColumnName, 142SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 145result[PathsColumnName] = new SchemaShape.Column(PathsColumnName, 146SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
Microsoft.ML.ImageAnalytics (31)
ImageGrayscale.cs (5)
243/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 246public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 254if (!(col.ItemType is ImageDataViewType) || col.Kind != SchemaShape.Column.VectorKind.Scalar) 257result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, col.Kind, col.ItemType, col.IsKey, col.Annotations);
ImageLoader.cs (8)
434/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 437public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 445if (!(col.ItemType is TextDataViewType) || col.Kind != SchemaShape.Column.VectorKind.Scalar) 449result[outputColumnName] = new SchemaShape.Column(outputColumnName, SchemaShape.Column.VectorKind.Scalar, new ImageDataViewType(), false); 451result[outputColumnName] = new SchemaShape.Column(outputColumnName, SchemaShape.Column.VectorKind.VariableVector, NumberDataViewType.Byte, false);
ImagePixelExtractor.cs (6)
806/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 809public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 817if (!(col.ItemType is ImageDataViewType) || col.Kind != SchemaShape.Column.VectorKind.Scalar) 821result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, itemType, false);
ImageResizer.cs (6)
506/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 509public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 517if (!(col.ItemType is ImageDataViewType) || col.Kind != SchemaShape.Column.VectorKind.Scalar) 520result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Scalar, colInfo.Type, false);
VectorToImageTransform.cs (6)
740/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 743public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 751if (col.Kind != SchemaShape.Column.VectorKind.Vector || (col.ItemType != NumberDataViewType.Single && col.ItemType != NumberDataViewType.Double && col.ItemType != NumberDataViewType.Byte)) 755result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Scalar, itemType, false);
Microsoft.ML.KMeansClustering (6)
KMeansPlusPlusTrainer.cs (6)
303private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 307new SchemaShape.Column(DefaultColumnNames.Score, 308SchemaShape.Column.VectorKind.Vector, 313new SchemaShape.Column(DefaultColumnNames.PredictedLabel, 314SchemaShape.Column.VectorKind.Scalar,
Microsoft.ML.LightGbm (31)
LightGbmBinaryTrainer.cs (9)
249new SchemaShape.Column()) 282private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 286new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 287new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 288new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmMulticlassTrainer.cs (8)
190new SchemaShape.Column()) 358private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 360SchemaShape.Column labelCol = default; 370new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 371new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true, metadata)
LightGbmRankingTrainer.cs (7)
235new SchemaShape.Column()) 268private protected override void CheckLabelCompatible(SchemaShape.Column labelCol) 275if (labelCol.Kind != SchemaShape.Column.VectorKind.Scalar) 298private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 302new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmRegressionTrainer.cs (5)
212new SchemaShape.Column()) 246private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 250new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmTrainerBase.cs (2)
319SchemaShape.Column labelColumn, 342private protected LightGbmTrainerBase(IHostEnvironment env, string name, TOptions options, SchemaShape.Column label)
Microsoft.ML.Mkl.Components (16)
OlsLinearRegression.cs (4)
134private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 138new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
SymSgdClassificationTrainer.cs (8)
272private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 276new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 277new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 278new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
VectorWhitening.cs (4)
887/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 890public SchemaShape GetOutputSchema(SchemaShape inputSchema) 901result[colPair.Name] = new SchemaShape.Column(colPair.Name, col.Kind, col.ItemType, col.IsKey, null);
Microsoft.ML.OnnxTransformer (8)
DnnImageFeaturizerTransform.cs (2)
112public SchemaShape GetOutputSchema(SchemaShape inputSchema)
OnnxTransform.cs (6)
1046/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1049public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 1085resultDic[Transformer.Outputs[i]] = new SchemaShape.Column(Transformer.Outputs[i], 1086Transformer.OutputTypes[i].IsKnownSizeVector() ? SchemaShape.Column.VectorKind.Vector 1087: SchemaShape.Column.VectorKind.VariableVector, Transformer.OutputTypes[i].GetItemType(), false);
Microsoft.ML.OnnxTransformerTest (2)
DnnImageFeaturizerTest.cs (1)
85pipe.GetOutputSchema(SchemaShape.Create(invalidDataWrongVectorSize.Schema));
OnnxTransformTests.cs (1)
166pipe.GetOutputSchema(SchemaShape.Create(invalidDataWrongVectorSize.Schema));
Microsoft.ML.PCA (18)
PcaTrainer.cs (12)
198private static SchemaShape.Column MakeWeightColumn(string weightColumn) 202return new SchemaShape.Column(weightColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 205private static SchemaShape.Column MakeFeatureColumn(string featureColumn) 207return new SchemaShape.Column(featureColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 372private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 376new SchemaShape.Column(DefaultColumnNames.Score, 377SchemaShape.Column.VectorKind.Scalar, 382new SchemaShape.Column(DefaultColumnNames.PredictedLabel, 383SchemaShape.Column.VectorKind.Scalar,
PcaTransformer.cs (6)
812/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 815public SchemaShape GetOutputSchema(SchemaShape inputSchema) 824if (col.Kind != SchemaShape.Column.VectorKind.Vector || !col.ItemType.Equals(NumberDataViewType.Single)) 827result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, 828SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
Microsoft.ML.Recommender (13)
MatrixFactorizationTrainer.cs (13)
554public SchemaShape GetOutputSchema(SchemaShape inputSchema) 558void CheckColumnsCompatible(SchemaShape.Column cachedColumn, string columnRole) 569var labelColumn = new SchemaShape.Column(LabelName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 573var matrixColumnIndexColumn = new SchemaShape.Column(MatrixColumnIndexName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true); 574var matrixRowIndexColumn = new SchemaShape.Column(MatrixRowIndexName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true); 588private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 595new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Microsoft.ML.StandardTrainers (181)
FactorizationMachine\FactorizationMachineTrainer.cs (30)
185internal readonly SchemaShape.Column[] FeatureColumns; 191internal readonly SchemaShape.Column LabelColumn; 197internal readonly SchemaShape.Column WeightColumn; 230FeatureColumns = new SchemaShape.Column[1 + extraColumnLength]; 233FeatureColumns[0] = new SchemaShape.Column(options.FeatureColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 237FeatureColumns[i + 1] = new SchemaShape.Column(options.ExtraFeatureColumns[i], SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 239LabelColumn = new SchemaShape.Column(options.LabelColumnName, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false); 240WeightColumn = options.ExampleWeightColumnName != null ? new SchemaShape.Column(options.ExampleWeightColumnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) : default; 263FeatureColumns = new SchemaShape.Column[featureColumnNames.Length]; 266FeatureColumns[i] = new SchemaShape.Column(featureColumnNames[i], SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 268LabelColumn = new SchemaShape.Column(labelColumnName, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false); 269WeightColumn = exampleWeightColumnName != null ? new SchemaShape.Column(exampleWeightColumnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) : default; 621public SchemaShape GetOutputSchema(SchemaShape inputSchema) 626void CheckColumnsCompatible(SchemaShape.Column column, string columnRole) 654private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 661new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 662new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 663new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LdSvm\LdSvmTrainer.cs (6)
180private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 184new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 185new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\LbfgsPredictorBase.cs (3)
206SchemaShape.Column labelColumn, 230SchemaShape.Column labelColumn, 285private static TOptions ArgsInit(string featureColumn, SchemaShape.Column labelColumn,
Standard\LogisticRegression\LogisticRegression.cs (8)
169private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 173new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 174new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 175new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\MulticlassLogisticRegression.cs (7)
369private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 374var metadata = new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues) 378new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 379new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true, metadata)
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (14)
40private protected readonly SchemaShape.Column LabelColumn; 50private protected SchemaShape.Column[] OutputColumns; 71LabelColumn = new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true); 140/// <returns>The output <see cref="SchemaShape"/></returns> 141public SchemaShape GetOutputSchema(SchemaShape inputSchema) 161private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 163SchemaShape.Column? labelCol = null; 177new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, 179new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32,
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (7)
114private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 119var predLabelMetadata = new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues) 124new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 125new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true, predLabelMetadata)
Standard\Online\AveragedLinear.cs (1)
306private protected AveragedLinearTrainer(AveragedLinearOptions options, IHostEnvironment env, string name, SchemaShape.Column label)
Standard\Online\AveragedPerceptron.cs (6)
196private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 201new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 202new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\LinearSvm.cs (6)
305private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 309new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 310new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\OnlineGradientDescent.cs (4)
168private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 172new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\OnlineLinear.cs (1)
261private protected OnlineLinearTrainer(OnlineLinearOptions options, IHostEnvironment env, string name, SchemaShape.Column label)
Standard\PoissonRegression\PoissonRegression.cs (4)
119private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 123new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\SdcaBinary.cs (54)
62private protected LinearTrainerBase(IHostEnvironment env, string featureColumn, SchemaShape.Column labelColumn, 290private static TOptions ArgsInit(string featureColumnName, SchemaShape.Column labelColumn) 299internal SdcaTrainerBase(IHostEnvironment env, string featureColumnName, SchemaShape.Column labelColumn, 300SchemaShape.Column weight = default, float? l2Const = null, 306internal SdcaTrainerBase(IHostEnvironment env, TOptions options, SchemaShape.Column label, SchemaShape.Column weight = default, 1453private readonly SchemaShape.Column[] _outputColumns; 1455private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) => _outputColumns; 1523private protected abstract SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape(); 1620private protected override SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape() 1622return new SchemaShape.Column[] 1624new SchemaShape.Column( 1626SchemaShape.Column.VectorKind.Scalar, 1630new SchemaShape.Column( 1632SchemaShape.Column.VectorKind.Scalar, 1636new SchemaShape.Column( 1638SchemaShape.Column.VectorKind.Scalar, 1719private protected override SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape() 1721return new SchemaShape.Column[] 1723new SchemaShape.Column( 1725SchemaShape.Column.VectorKind.Scalar, 1730new SchemaShape.Column( 1732SchemaShape.Column.VectorKind.Scalar, 1777private protected override SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape() 1779var outCols = new List<SchemaShape.Column>() 1781new SchemaShape.Column( 1783SchemaShape.Column.VectorKind.Scalar, 1788new SchemaShape.Column( 1790SchemaShape.Column.VectorKind.Scalar, 1799outCols.Insert(1, new SchemaShape.Column( 1801SchemaShape.Column.VectorKind.Scalar, 2299private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 2303new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2304new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2305new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2388private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 2392new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2393new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2442private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 2446new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2447new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2448new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\SdcaMulticlass.cs (7)
159private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 164var metadata = new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues) 168new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 169new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true, metadata)
Standard\SdcaRegression.cs (4)
193private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 197new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Simple\SimpleTrainers.cs (16)
300private static SchemaShape.Column MakeFeatureColumn(string featureColumn) 301=> new SchemaShape.Column(featureColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 303private static SchemaShape.Column MakeLabelColumn(string labelColumn) 304=> new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 307/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 310public SchemaShape GetOutputSchema(SchemaShape inputSchema) 318new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 319new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 320new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 322foreach (SchemaShape.Column column in newColumns)
Standard\StochasticTrainerBase.cs (3)
17public StochasticTrainerBase(IHost host, SchemaShape.Column feature, SchemaShape.Column label, SchemaShape.Column weight = default)
Microsoft.ML.TensorFlow (6)
TensorflowTransform.cs (6)
1027/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1030public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1046resultDic[_options.OutputColumns[i]] = new SchemaShape.Column(_options.OutputColumns[i], 1047_outputTypes[i].IsKnownSizeVector() ? SchemaShape.Column.VectorKind.Vector 1048: SchemaShape.Column.VectorKind.VariableVector, _outputTypes[i].GetItemType(), false);
Microsoft.ML.TensorFlow.Tests (1)
TensorFlowEstimatorTests.cs (1)
90pipe.GetOutputSchema(SchemaShape.Create(invalidDataWrongVectorSize.Schema));
Microsoft.ML.TestFramework (9)
DataPipe\TestDataPipeBase.cs (9)
61var outSchemaShape = estimator.GetOutputSchema(SchemaShape.Create(validFitInput.Schema)); 64mustFail(() => estimator.GetOutputSchema(SchemaShape.Create(validTransformInput.Schema))); 70mustFail(() => estimator.GetOutputSchema(SchemaShape.Create(invalidInput.Schema))); 76estimator.GetOutputSchema(SchemaShape.Create(validForFitNotValidForTransformInput.Schema)); 148var scoredTrainSchemaShape = SchemaShape.Create(transformer.GetOutputSchema(validFitInput.Schema)); 154private void CheckSameSchemaShape(SchemaShape promised, SchemaShape delivered)
Microsoft.ML.Tests (26)
FakeSchemaTest.cs (2)
30var shape = SchemaShape.Create(schemaBuilder.ToSchema());
ImagesTests.cs (1)
79pipe.GetOutputSchema(SchemaShape.Create(data.Schema));
Transformers\CustomMappingTests.cs (3)
104est.GetOutputSchema(SchemaShape.Create(data.Schema)); 109est.GetOutputSchema(SchemaShape.Create(badData1.Schema)); 117est.GetOutputSchema(SchemaShape.Create(badData2.Schema));
Transformers\FeatureSelectionTests.cs (6)
240var model = pipeline.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 248var model = pipeline.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 256var model = pipeline.GetOutputSchema(SchemaShape.Create(dataView.Schema));
Transformers\ValueMappingTests.cs (14)
109var schema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 111Assert.Equal(SchemaShape.Column.VectorKind.VariableVector, originalColumn.Kind); 189var schema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 193Assert.Equal(SchemaShape.Column.VectorKind.VariableVector, originalColumn.Kind); 373var outputSchema = est.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 376Assert.True(outputSchema.TryFindColumn("D", out SchemaShape.Column dColumn)); 377Assert.True(outputSchema.TryFindColumn("E", out SchemaShape.Column eColumn)); 378Assert.True(outputSchema.TryFindColumn("F", out SchemaShape.Column fColumn)); 405var outputSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 407Assert.True(outputSchema.TryFindColumn("D", out SchemaShape.Column dColumn)); 408Assert.True(outputSchema.TryFindColumn("E", out SchemaShape.Column eColumn)); 409Assert.True(outputSchema.TryFindColumn("F", out SchemaShape.Column fColumn));
Microsoft.ML.TimeSeries (44)
IidChangePointDetector.cs (8)
258/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 261public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 270var metadata = new List<SchemaShape.Column>() { 271new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false) 275resultDic[Transformer.InternalTransform.OutputColumnName] = new SchemaShape.Column( 276Transformer.InternalTransform.OutputColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata));
IidSpikeDetector.cs (7)
237public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 246var metadata = new List<SchemaShape.Column>() { 247new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false) 250resultDic[Transformer.InternalTransform.OutputColumnName] = new SchemaShape.Column( 251Transformer.InternalTransform.OutputColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata));
SRCNNAnomalyDetector.cs (7)
269public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 278var metadata = new List<SchemaShape.Column>() { 279new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false) 282resultDic[Transformer.InternalTransform.OutputColumnName] = new SchemaShape.Column( 283Transformer.InternalTransform.OutputColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata));
SsaChangePointDetector.cs (7)
297public SchemaShape GetOutputSchema(SchemaShape inputSchema) 306var metadata = new List<SchemaShape.Column>() { 307new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false) 310resultDic[_options.Name] = new SchemaShape.Column( 311_options.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata));
SSaForecasting.cs (8)
330public SchemaShape GetOutputSchema(SchemaShape inputSchema) 340resultDic[_options.Name] = new SchemaShape.Column( 341_options.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 345resultDic[_options.ConfidenceLowerBoundColumn] = new SchemaShape.Column( 346_options.ConfidenceLowerBoundColumn, SchemaShape.Column.VectorKind.Vector, 349resultDic[_options.ConfidenceUpperBoundColumn] = new SchemaShape.Column( 350_options.ConfidenceUpperBoundColumn, SchemaShape.Column.VectorKind.Vector,
SsaSpikeDetector.cs (7)
276public SchemaShape GetOutputSchema(SchemaShape inputSchema) 285var metadata = new List<SchemaShape.Column>() { 286new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false) 289resultDic[_options.Name] = new SchemaShape.Column( 290_options.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Double, false, new SchemaShape(metadata));
Microsoft.ML.TorchSharp (133)
AutoFormerV2\ObjectDetectionTrainer.cs (55)
157CheckInputSchema(SchemaShape.Create(input.Schema)); 438public SchemaShape GetOutputSchema(SchemaShape inputSchema) 446var metadata = new List<SchemaShape.Column>(); 447metadata.Add(new SchemaShape.Column(Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 450var scoreMetadata = new List<SchemaShape.Column>(); 452scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 454scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 456scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 458scoreMetadata.Add(new SchemaShape.Column(Kinds.TrainingLabelValues, SchemaShape.Column.VectorKind.Vector, 464outColumns[Option.PredictedLabelColumnName] = new SchemaShape.Column(Option.PredictedLabelColumnName, SchemaShape.Column.VectorKind.VariableVector, 467outColumns[Option.PredictedBoundingBoxColumnName] = new SchemaShape.Column(Option.PredictedBoundingBoxColumnName, SchemaShape.Column.VectorKind.VariableVector, 470outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 477private void CheckInputSchema(SchemaShape inputSchema) 482if (labelCol.Kind != SchemaShape.Column.VectorKind.VariableVector || labelCol.ItemType.RawType != typeof(UInt32)) 488if (boundingBoxCol.Kind != SchemaShape.Column.VectorKind.VariableVector || boundingBoxCol.ItemType.RawType != typeof(Single)) 506public readonly SchemaShape.Column PredictedLabelColumnName; 507public readonly SchemaShape.Column PredictedBoundingBoxColumn; 508public readonly SchemaShape.Column ConfidenceColumn; 528PredictedLabelColumnName = new SchemaShape.Column(Options.PredictedLabelColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.UInt32, false); 529PredictedBoundingBoxColumn = new SchemaShape.Column(Options.PredictedBoundingBoxColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 530ConfidenceColumn = new SchemaShape.Column(Options.ScoreColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 539public SchemaShape GetOutputSchema(SchemaShape inputSchema) 547var labelAnnotationsColumn = new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, LabelColumn.Annotations.Schema[AnnotationUtils.Kinds.SlotNames].Type, false); 548var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 551var scoreMetadata = new List<SchemaShape.Column>(); 553scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 555scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 557scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 559scoreMetadata.Add(new SchemaShape.Column(Kinds.TrainingLabelValues, SchemaShape.Column.VectorKind.Vector, 562outColumns[Options.PredictedLabelColumnName] = new SchemaShape.Column(Options.PredictedLabelColumnName, SchemaShape.Column.VectorKind.VariableVector, 565outColumns[Options.PredictedBoundingBoxColumnName] = new SchemaShape.Column(Options.PredictedBoundingBoxColumnName, SchemaShape.Column.VectorKind.VariableVector, 568outColumns[Options.ScoreColumnName] = new SchemaShape.Column(Options.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 574private void CheckInputSchema(SchemaShape inputSchema)
NasBert\NasBertTrainer.cs (36)
317public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 328var metadata = new List<SchemaShape.Column>(); 329metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 335outColumns[Option.PredictionColumnName] = new SchemaShape.Column(Option.PredictionColumnName, SchemaShape.Column.VectorKind.Scalar, 338outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.Vector, 343var metadata = new List<SchemaShape.Column>(); 344metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 350outColumns[Option.PredictionColumnName] = new SchemaShape.Column(Option.PredictionColumnName, SchemaShape.Column.VectorKind.VariableVector, 355outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.Scalar, 362private protected override void CheckInputSchema(SchemaShape inputSchema) 416public readonly SchemaShape.Column SentenceColumn; 417public readonly SchemaShape.Column SentenceColumn2; 423SentenceColumn = new SchemaShape.Column(options.Sentence1ColumnName, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false); 424SentenceColumn2 = options.Sentence2ColumnName == default ? default : new SchemaShape.Column(options.Sentence2ColumnName, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false); 427private protected override SchemaShape GetOutputSchemaCore(SchemaShape inputSchema) 436var labelAnnotationsColumn = new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, LabelColumn.Annotations.Schema[AnnotationUtils.Kinds.SlotNames].Type, false); 437var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 440outColumns[Options.PredictionColumnName] = new SchemaShape.Column(Options.PredictionColumnName, SchemaShape.Column.VectorKind.Scalar, 443outColumns[ScoreColumnName] = new SchemaShape.Column(ScoreColumnName, SchemaShape.Column.VectorKind.Vector, 448outColumns[ScoreColumnName] = new SchemaShape.Column(ScoreColumnName, SchemaShape.Column.VectorKind.Scalar, 455private protected override void CheckInputSchema(SchemaShape inputSchema)
Roberta\QATrainer.cs (33)
146CheckInputSchema(SchemaShape.Create(input.Schema)); 502public SchemaShape GetOutputSchema(SchemaShape inputSchema) 510var scoreMetadata = new List<SchemaShape.Column>(); 512scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 514scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 516scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 519outColumns[Option.PredictedAnswerColumnName] = new SchemaShape.Column(Option.PredictedAnswerColumnName, SchemaShape.Column.VectorKind.VariableVector, 522outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 528private void CheckInputSchema(SchemaShape inputSchema) 533if (contextCol.Kind != SchemaShape.Column.VectorKind.Scalar || contextCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 539if (questionCol.Kind != SchemaShape.Column.VectorKind.Scalar || questionCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 545if (answerCol.Kind != SchemaShape.Column.VectorKind.Scalar || answerCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 551if (answerIndexCol.Kind != SchemaShape.Column.VectorKind.Scalar || answerIndexCol.ItemType.RawType != typeof(int)) 588public SchemaShape GetOutputSchema(SchemaShape inputSchema) 596var scoreMetadata = new List<SchemaShape.Column> 598new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 600new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 602new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 606outColumns[Options.PredictedAnswerColumnName] = new SchemaShape.Column(Options.PredictedAnswerColumnName, SchemaShape.Column.VectorKind.VariableVector, 609outColumns[Options.ScoreColumnName] = new SchemaShape.Column(Options.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 615private void CheckInputSchema(SchemaShape inputSchema)
TorchSharpBaseTrainer.cs (9)
26public abstract SchemaShape GetOutputSchema(SchemaShape inputSchema); 99CheckInputSchema(SchemaShape.Create(input.Schema)); 128private protected abstract void CheckInputSchema(SchemaShape inputSchema); 403public SchemaShape GetOutputSchema(SchemaShape inputSchema) 412private protected abstract void CheckInputSchema(SchemaShape inputSchema); 413private protected abstract SchemaShape GetOutputSchemaCore(SchemaShape inputSchema);
Microsoft.ML.TorchSharp.Tests (16)
NerTests.cs (6)
74var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 153var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 227var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema));
QATests.cs (2)
45var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema));
TextClassificationTests.cs (8)
102var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 240var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema)); 324var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(preppedData.Schema)); 390var estimatorSchema = estimator.GetOutputSchema(SchemaShape.Create(dataView.Schema));
Microsoft.ML.Transforms (202)
CountFeatureSelection.cs (6)
161/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 164public SchemaShape GetOutputSchema(SchemaShape inputSchema) 174if (col.Kind == SchemaShape.Column.VectorKind.VariableVector) 176var metadata = new List<SchemaShape.Column>(); 183result[colPair.Name] = new SchemaShape.Column(colPair.Name, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray()));
CustomMappingTransformer.cs (12)
250/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 253public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 256var addedSchemaShape = SchemaShape.Create(SchemaExtensions.MakeSchema(addedCols)); 265SchemaShape.GetColumnTypeShape(col.ColumnType, out var vecKind, out var itemType, out var isKey); 268|| vecKind == SchemaShape.Column.VectorKind.Scalar && column.Kind != SchemaShape.Column.VectorKind.Scalar 269|| vecKind == SchemaShape.Column.VectorKind.Vector && column.Kind != SchemaShape.Column.VectorKind.Vector 270|| vecKind == SchemaShape.Column.VectorKind.VariableVector && column.Kind == SchemaShape.Column.VectorKind.Scalar)
Dracula\CountTableTransformer.cs (10)
320public SchemaShape GetOutputSchema(SchemaShape inputSchema) 332if (col.Kind == SchemaShape.Column.VectorKind.VariableVector) 339var newMetadataKinds = new List<SchemaShape.Column>(); 340if (col.Kind == SchemaShape.Column.VectorKind.Scalar) 341newMetadataKinds.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 344var meta = new SchemaShape(newMetadataKinds); 345result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, meta);
Dracula\CountTargetEncodingTransformer.cs (3)
295public SchemaShape GetOutputSchema(SchemaShape inputSchema) 297var hashingOutputSchema = _hashingEstimator.GetOutputSchema(inputSchema);
ExpressionTransformer.cs (8)
114private static int FindVectorInputColumn(IHostEnvironment env, IReadOnlyList<string> inputColumnNames, SchemaShape inputSchema, DataViewType[] inputTypes) 122if (col.Kind != SchemaShape.Column.VectorKind.Scalar) 169public SchemaShape GetOutputSchema(SchemaShape inputSchema) 190SchemaShape.Column.VectorKind outputVectorKind; 191var metadata = new List<SchemaShape.Column>(); 193outputVectorKind = SchemaShape.Column.VectorKind.Scalar; 205var outputSchemaShapeColumn = new SchemaShape.Column(_columns[i].Name, outputVectorKind, typeRes, false, new SchemaShape(metadata));
GcnTransform.cs (9)
897internal static bool IsSchemaColumnValid(SchemaShape.Column col) 899if (col.Kind != SchemaShape.Column.VectorKind.Vector) 907/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 910public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 920var metadata = new List<SchemaShape.Column>(); 923metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 924result[colPair.Name] = new SchemaShape.Column(colPair.Name, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray()));
KeyToVectorMapping.cs (14)
464/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 467public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 478var metadata = new List<SchemaShape.Column>(); 480if (col.Kind != SchemaShape.Column.VectorKind.VariableVector && keyMeta.ItemType is TextDataViewType) 481metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, keyMeta.ItemType, false)); 482if (col.Kind == SchemaShape.Column.VectorKind.Scalar) 483metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 484result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, 485col.Kind == SchemaShape.Column.VectorKind.VariableVector ? SchemaShape.Column.VectorKind.VariableVector : SchemaShape.Column.VectorKind.Vector,
MissingValueDroppingTransformer.cs (5)
38public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 47if (originalColumn.Kind == SchemaShape.Column.VectorKind.Scalar) 51var col = new SchemaShape.Column(outputColumnName, SchemaShape.Column.VectorKind.VariableVector, originalColumn.ItemType, originalColumn.IsKey, originalColumn.Annotations);
MissingValueIndicatorTransformer.cs (7)
531/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 534public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 542var metadata = new List<SchemaShape.Column>(); 545metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 549result[colPair.outputColumnName] = new SchemaShape.Column(colPair.outputColumnName, col.Kind, type, false, new SchemaShape(metadata.ToArray()));
MissingValueReplacing.cs (5)
1031/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1034public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1045var metadata = new List<SchemaShape.Column>(); 1053result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, col.Kind, type, false, new SchemaShape(metadata.ToArray()));
MutualInformationFeatureSelection.cs (6)
216/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 219public SchemaShape GetOutputSchema(SchemaShape inputSchema) 241if (col.Kind == SchemaShape.Column.VectorKind.VariableVector) 243var metadata = new List<SchemaShape.Column>(); 250result[colPair.outputColumnName] = new SchemaShape.Column(colPair.outputColumnName, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray()));
OneHotEncoding.cs (3)
325/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 328public SchemaShape GetOutputSchema(SchemaShape inputSchema)
OneHotHashEncoding.cs (3)
376/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 379public SchemaShape GetOutputSchema(SchemaShape inputSchema)
RandomFourierFeaturizing.cs (6)
719/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 722public SchemaShape GetOutputSchema(SchemaShape inputSchema) 730if (col.ItemType.RawType != typeof(float) || col.Kind != SchemaShape.Column.VectorKind.Vector) 733result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
StatefulCustomMappingTransformer.cs (12)
383/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 386public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 389var addedSchemaShape = SchemaShape.Create(SchemaExtensions.MakeSchema(addedCols)); 398SchemaShape.GetColumnTypeShape(col.ColumnType, out var vecKind, out var itemType, out var isKey); 401|| vecKind == SchemaShape.Column.VectorKind.Scalar && column.Kind != SchemaShape.Column.VectorKind.Scalar 402|| vecKind == SchemaShape.Column.VectorKind.Vector && column.Kind != SchemaShape.Column.VectorKind.Vector 403|| vecKind == SchemaShape.Column.VectorKind.VariableVector && column.Kind == SchemaShape.Column.VectorKind.Scalar)
Text\LdaTransform.cs (6)
1317/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1320public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1328if (col.ItemType.RawType != typeof(float) || col.Kind == SchemaShape.Column.VectorKind.Scalar) 1331result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
Text\NgramHashingTransformer.cs (10)
1194internal static bool IsSchemaColumnValid(SchemaShape.Column col) 1196if (col.Kind == SchemaShape.Column.VectorKind.Scalar) 1209/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1212public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1225var metadata = new List<SchemaShape.Column>(); 1228metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 1229result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(metadata));
Text\NgramTransform.cs (10)
970internal static bool IsSchemaColumnValid(SchemaShape.Column col) 972if (col.Kind == SchemaShape.Column.VectorKind.Scalar) 1074/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1077public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1087var metadata = new List<SchemaShape.Column>(); 1089metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 1090result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(metadata));
Text\StopWordsRemovingTransformer.cs (12)
666/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 669public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 677if (col.Kind == SchemaShape.Column.VectorKind.Scalar || !(col.ItemType is TextDataViewType)) 679result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.VariableVector, TextDataViewType.Instance, false); 1234/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1237public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 1245if (col.Kind == SchemaShape.Column.VectorKind.Scalar || !(col.ItemType is TextDataViewType)) 1247result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, SchemaShape.Column.VectorKind.VariableVector, TextDataViewType.Instance, false);
Text\TextFeaturizingEstimator.cs (12)
628/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 631public SchemaShape GetOutputSchema(SchemaShape inputSchema) 643var metadata = new List<SchemaShape.Column>(2); 644metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 646metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 648result[OutputColumn] = new SchemaShape.Column(OutputColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, 654result[name] = new SchemaShape.Column(name, SchemaShape.Column.VectorKind.VariableVector, TextDataViewType.Instance, false);
Text\TextNormalizing.cs (7)
575/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 578public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 588result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, col.Kind == SchemaShape.Column.VectorKind.Scalar ? SchemaShape.Column.VectorKind.Scalar : SchemaShape.Column.VectorKind.VariableVector, col.ItemType, false);
Text\TokenizingByCharacters.cs (10)
679/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 682public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 692var metadata = new List<SchemaShape.Column>(); 694metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, slotMeta.ItemType, false)); 695metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 696result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, SchemaShape.Column.VectorKind.VariableVector, NumberDataViewType.UInt16, true, new SchemaShape(metadata.ToArray()));
Text\WordBagTransform.cs (8)
110internal static IEstimator<ITransformer> CreateEstimator(IHostEnvironment env, Options options, SchemaShape inputSchema) 174(IDataTransform)CreateEstimator(env, options, SchemaShape.Create(input.Schema)).Fit(input).Transform(input); 188public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 191if (!inputSchema.TryFindColumn(_columnName, out SchemaShape.Column outCol) && outCol.ItemType != TextDataViewType.Instance) 457internal static IEstimator<ITransformer> CreateEstimator(IHostEnvironment env, Options options, SchemaShape inputSchema, TermLoaderArguments termLoaderArgs = null) 546return CreateEstimator(env, options, SchemaShape.Create(input.Schema), termLoaderArgs).Fit(input).Transform(input)/* Create(env, options, input, termLoaderArgs).Transform(input) */as IDataTransform; 650return NgramExtractorTransform.CreateEstimator(env, options, SchemaShape.Create(input.Schema), _termLoaderArgs).Fit(input);
Text\WordEmbeddingsExtractor.cs (7)
927/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 930public SchemaShape GetOutputSchema(SchemaShape inputSchema) 938if (!(col.ItemType is TextDataViewType) || (col.Kind != SchemaShape.Column.VectorKind.VariableVector && col.Kind != SchemaShape.Column.VectorKind.Vector)) 941result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
Text\WordTokenizing.cs (5)
527/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 530public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 540result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.VariableVector, col.ItemType, false);
Text\WrappedTextTransformers.cs (6)
193var estimator = WordBagBuildingTransformer.CreateEstimator(_host, CreateOptions(), SchemaShape.Create(input.Schema)); 216public SchemaShape GetOutputSchema(SchemaShape inputSchema) 397public SchemaShape GetOutputSchema(SchemaShape inputSchema) 403return SchemaShape.Create(transformer.GetOutputSchema(fakeSchema));
Microsoft.ML.Vision (18)
DnnRetrainTransform.cs (7)
1250/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1253public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1263if (!(col.Kind == SchemaShape.Column.VectorKind.Vector)) 1271resultDic[_options.OutputColumns[i]] = new SchemaShape.Column(_options.OutputColumns[i], 1272_outputTypes[i].IsKnownSizeVector() ? SchemaShape.Column.VectorKind.Vector 1273: SchemaShape.Column.VectorKind.VariableVector, _outputTypes[i].GetItemType(), false);
ImageClassificationTrainer.cs (11)
527new SchemaShape.Column(options.FeatureColumnName, SchemaShape.Column.VectorKind.VariableVector, 632private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 636var metadata = new List<SchemaShape.Column>(); 637metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 642new SchemaShape.Column(_options.ScoreColumnName, SchemaShape.Column.VectorKind.Vector, 644new SchemaShape.Column(_options.PredictedLabelColumnName, SchemaShape.Column.VectorKind.Scalar,