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)
317new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 318new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 319new 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)
188new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 189new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 190new 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)
383new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 384new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
RandomForestRegression.cs (1)
509new 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)
317new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 323new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.LightGbm (7)
LightGbmBinaryTrainer.cs (3)
292new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 293new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 294new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmMulticlassTrainer.cs (2)
378var metadata = LightGbmTrainerOptions.LightGbmModel == null ? new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues).Concat(AnnotationUtils.GetTrainerOutputAnnotation())) : new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()); 381new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))),
LightGbmRankingTrainer.cs (1)
305new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmRegressionTrainer.cs (1)
251new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.Mkl.Components (5)
OlsLinearRegression.cs (1)
141new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
SymSgdClassificationTrainer.cs (3)
284new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 285new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 286new 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)
1087return new SchemaShape(resultDic.Values);
Microsoft.ML.PCA (3)
PcaTrainer.cs (2)
396new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 402new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
PcaTransformer.cs (1)
831return new SchemaShape(result.Values);
Microsoft.ML.Recommender (2)
MatrixFactorizationTrainer.cs (2)
598return new SchemaShape(outColumns.Values); 608new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Microsoft.ML.StandardTrainers (42)
FactorizationMachine\FactorizationMachineTrainer.cs (4)
661return new SchemaShape(outColumns.Values); 671new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 672new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 673new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LdSvm\LdSvmTrainer.cs (2)
195new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 196new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\LogisticRegression.cs (3)
175new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 176new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 177new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
379new 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)
202new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 203new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\LinearSvm.cs (2)
326new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 327new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\OnlineGradientDescent.cs (1)
173new 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)
1632new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 1638new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 1644new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 1729new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()) 1736new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 1787new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()) 1794new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 1805new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true)))); 2305new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2306new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2307new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2394new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2395new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2448new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2449new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2450new 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)
195new 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)
479NumberDataViewType.UInt32, true, new SchemaShape(metadata.ToArray())); 485NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 488return new SchemaShape(outColumns.Values); 562var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 583NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 585return new SchemaShape(outColumns.Values);
NasBert\NasBertTrainer.cs (7)
358NumberDataViewType.UInt32, true, new SchemaShape(metadata.ToArray())); 361NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))); 373NumberDataViewType.UInt32, true, new SchemaShape(metadata.ToArray())); 381return new SchemaShape(outColumns.Values); 459var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 466NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelAnnotationsColumn))); 474return new SchemaShape(outColumns.Values);
Roberta\QATrainer.cs (4)
530NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 532return new SchemaShape(outColumns.Values); 617NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 619return 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)
660new SchemaShape(metadata)); 668return 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)
1274return new SchemaShape(resultDic.Values);
ImageClassificationTrainer.cs (1)
668NumberDataViewType.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)
313private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 317new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 318new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 319new 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)
184private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 188new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 189new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 190new 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)
183SchemaShape.Column label, 209private 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)
379private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 383new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 384new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
RandomForestRegression.cs (4)
505private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 509new 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)
309private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 313new SchemaShape.Column(DefaultColumnNames.Score, 314SchemaShape.Column.VectorKind.Vector, 319new SchemaShape.Column(DefaultColumnNames.PredictedLabel, 320SchemaShape.Column.VectorKind.Scalar,
Microsoft.ML.LightGbm (32)
LightGbmBinaryTrainer.cs (9)
255new SchemaShape.Column()) 288private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 292new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 293new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 294new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmMulticlassTrainer.cs (9)
194new SchemaShape.Column()) 369private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 371SchemaShape.Column labelCol = default; 378var metadata = LightGbmTrainerOptions.LightGbmModel == null ? new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues).Concat(AnnotationUtils.GetTrainerOutputAnnotation())) : new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()); 381new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 382new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true, metadata)
LightGbmRankingTrainer.cs (7)
238new SchemaShape.Column()) 271private protected override void CheckLabelCompatible(SchemaShape.Column labelCol) 278if (labelCol.Kind != SchemaShape.Column.VectorKind.Scalar) 301private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 305new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmRegressionTrainer.cs (5)
213new SchemaShape.Column()) 247private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 251new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmTrainerBase.cs (2)
367SchemaShape.Column labelColumn, 390private protected LightGbmTrainerBase(IHostEnvironment env, string name, TOptions options, SchemaShape.Column label)
Microsoft.ML.Mkl.Components (16)
OlsLinearRegression.cs (4)
137private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 141new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
SymSgdClassificationTrainer.cs (8)
280private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 284new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 285new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 286new 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)
1043/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1046public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 1082resultDic[Transformer.Outputs[i]] = new SchemaShape.Column(Transformer.Outputs[i], 1083Transformer.OutputTypes[i].IsKnownSizeVector() ? SchemaShape.Column.VectorKind.Vector 1084: 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)
214private static SchemaShape.Column MakeWeightColumn(string weightColumn) 218return new SchemaShape.Column(weightColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 221private static SchemaShape.Column MakeFeatureColumn(string featureColumn) 223return new SchemaShape.Column(featureColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 388private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 392new SchemaShape.Column(DefaultColumnNames.Score, 393SchemaShape.Column.VectorKind.Scalar, 398new SchemaShape.Column(DefaultColumnNames.PredictedLabel, 399SchemaShape.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)
567public SchemaShape GetOutputSchema(SchemaShape inputSchema) 571void CheckColumnsCompatible(SchemaShape.Column cachedColumn, string columnRole) 582var labelColumn = new SchemaShape.Column(LabelName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 586var matrixColumnIndexColumn = new SchemaShape.Column(MatrixColumnIndexName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true); 587var matrixRowIndexColumn = new SchemaShape.Column(MatrixRowIndexName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true); 601private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 608new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Microsoft.ML.StandardTrainers (181)
FactorizationMachine\FactorizationMachineTrainer.cs (30)
195internal readonly SchemaShape.Column[] FeatureColumns; 201internal readonly SchemaShape.Column LabelColumn; 207internal readonly SchemaShape.Column WeightColumn; 240FeatureColumns = new SchemaShape.Column[1 + extraColumnLength]; 243FeatureColumns[0] = new SchemaShape.Column(options.FeatureColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 247FeatureColumns[i + 1] = new SchemaShape.Column(options.ExtraFeatureColumns[i], SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 249LabelColumn = new SchemaShape.Column(options.LabelColumnName, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false); 250WeightColumn = options.ExampleWeightColumnName != null ? new SchemaShape.Column(options.ExampleWeightColumnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) : default; 273FeatureColumns = new SchemaShape.Column[featureColumnNames.Length]; 276FeatureColumns[i] = new SchemaShape.Column(featureColumnNames[i], SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 278LabelColumn = new SchemaShape.Column(labelColumnName, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false); 279WeightColumn = exampleWeightColumnName != null ? new SchemaShape.Column(exampleWeightColumnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) : default; 631public SchemaShape GetOutputSchema(SchemaShape inputSchema) 636void CheckColumnsCompatible(SchemaShape.Column column, string columnRole) 664private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 671new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 672new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 673new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LdSvm\LdSvmTrainer.cs (6)
191private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 195new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 196new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\LbfgsPredictorBase.cs (3)
215SchemaShape.Column labelColumn, 239SchemaShape.Column labelColumn, 294private static TOptions ArgsInit(string featureColumn, SchemaShape.Column labelColumn,
Standard\LogisticRegression\LogisticRegression.cs (8)
171private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 175new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 176new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 177new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\MulticlassLogisticRegression.cs (7)
370private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 375var metadata = new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues) 379new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 380new 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)
310private protected AveragedLinearTrainer(AveragedLinearOptions options, IHostEnvironment env, string name, SchemaShape.Column label)
Standard\Online\AveragedPerceptron.cs (6)
197private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 202new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 203new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\LinearSvm.cs (6)
322private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 326new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 327new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\OnlineGradientDescent.cs (4)
169private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 173new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\OnlineLinear.cs (1)
263private 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, 293private static TOptions ArgsInit(string featureColumnName, SchemaShape.Column labelColumn) 302internal SdcaTrainerBase(IHostEnvironment env, string featureColumnName, SchemaShape.Column labelColumn, 303SchemaShape.Column weight = default, float? l2Const = null, 309internal SdcaTrainerBase(IHostEnvironment env, TOptions options, SchemaShape.Column label, SchemaShape.Column weight = default, 1456private readonly SchemaShape.Column[] _outputColumns; 1458private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) => _outputColumns; 1526private protected abstract SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape(); 1623private protected override SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape() 1625return new SchemaShape.Column[] 1627new SchemaShape.Column( 1629SchemaShape.Column.VectorKind.Scalar, 1633new SchemaShape.Column( 1635SchemaShape.Column.VectorKind.Scalar, 1639new SchemaShape.Column( 1641SchemaShape.Column.VectorKind.Scalar, 1720private protected override SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape() 1722return new SchemaShape.Column[] 1724new SchemaShape.Column( 1726SchemaShape.Column.VectorKind.Scalar, 1731new SchemaShape.Column( 1733SchemaShape.Column.VectorKind.Scalar, 1778private protected override SchemaShape.Column[] ComputeSdcaBinaryClassifierSchemaShape() 1780var outCols = new List<SchemaShape.Column>() 1782new SchemaShape.Column( 1784SchemaShape.Column.VectorKind.Scalar, 1789new SchemaShape.Column( 1791SchemaShape.Column.VectorKind.Scalar, 1800outCols.Insert(1, new SchemaShape.Column( 1802SchemaShape.Column.VectorKind.Scalar, 2301private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 2305new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2306new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2307new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2390private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 2394new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2395new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2444private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 2448new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2449new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2450new 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)
191private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 195new 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 (8)
DataPipe\TestDataPipeBase.cs (8)
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)
171CheckInputSchema(SchemaShape.Create(input.Schema)); 452public SchemaShape GetOutputSchema(SchemaShape inputSchema) 460var metadata = new List<SchemaShape.Column>(); 461metadata.Add(new SchemaShape.Column(Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 464var scoreMetadata = new List<SchemaShape.Column>(); 466scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 468scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 470scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 472scoreMetadata.Add(new SchemaShape.Column(Kinds.TrainingLabelValues, SchemaShape.Column.VectorKind.Vector, 478outColumns[Option.PredictedLabelColumnName] = new SchemaShape.Column(Option.PredictedLabelColumnName, SchemaShape.Column.VectorKind.VariableVector, 481outColumns[Option.PredictedBoundingBoxColumnName] = new SchemaShape.Column(Option.PredictedBoundingBoxColumnName, SchemaShape.Column.VectorKind.VariableVector, 484outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 491private void CheckInputSchema(SchemaShape inputSchema) 496if (labelCol.Kind != SchemaShape.Column.VectorKind.VariableVector || labelCol.ItemType.RawType != typeof(UInt32)) 502if (boundingBoxCol.Kind != SchemaShape.Column.VectorKind.VariableVector || boundingBoxCol.ItemType.RawType != typeof(Single)) 520public readonly SchemaShape.Column PredictedLabelColumnName; 521public readonly SchemaShape.Column PredictedBoundingBoxColumn; 522public readonly SchemaShape.Column ConfidenceColumn; 542PredictedLabelColumnName = new SchemaShape.Column(Options.PredictedLabelColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.UInt32, false); 543PredictedBoundingBoxColumn = new SchemaShape.Column(Options.PredictedBoundingBoxColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 544ConfidenceColumn = new SchemaShape.Column(Options.ScoreColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 553public SchemaShape GetOutputSchema(SchemaShape inputSchema) 561var labelAnnotationsColumn = new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, LabelColumn.Annotations.Schema[AnnotationUtils.Kinds.SlotNames].Type, false); 562var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 565var scoreMetadata = new List<SchemaShape.Column>(); 567scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 569scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 571scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 573scoreMetadata.Add(new SchemaShape.Column(Kinds.TrainingLabelValues, SchemaShape.Column.VectorKind.Vector, 576outColumns[Options.PredictedLabelColumnName] = new SchemaShape.Column(Options.PredictedLabelColumnName, SchemaShape.Column.VectorKind.VariableVector, 579outColumns[Options.PredictedBoundingBoxColumnName] = new SchemaShape.Column(Options.PredictedBoundingBoxColumnName, SchemaShape.Column.VectorKind.VariableVector, 582outColumns[Options.ScoreColumnName] = new SchemaShape.Column(Options.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 588private void CheckInputSchema(SchemaShape inputSchema)
NasBert\NasBertTrainer.cs (36)
339public override SchemaShape GetOutputSchema(SchemaShape inputSchema) 350var metadata = new List<SchemaShape.Column>(); 351metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 357outColumns[Option.PredictionColumnName] = new SchemaShape.Column(Option.PredictionColumnName, SchemaShape.Column.VectorKind.Scalar, 360outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.Vector, 365var metadata = new List<SchemaShape.Column>(); 366metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 372outColumns[Option.PredictionColumnName] = new SchemaShape.Column(Option.PredictionColumnName, SchemaShape.Column.VectorKind.VariableVector, 377outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.Scalar, 384private protected override void CheckInputSchema(SchemaShape inputSchema) 438public readonly SchemaShape.Column SentenceColumn; 439public readonly SchemaShape.Column SentenceColumn2; 445SentenceColumn = new SchemaShape.Column(options.Sentence1ColumnName, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false); 446SentenceColumn2 = options.Sentence2ColumnName == default ? default : new SchemaShape.Column(options.Sentence2ColumnName, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false); 449private protected override SchemaShape GetOutputSchemaCore(SchemaShape inputSchema) 458var labelAnnotationsColumn = new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, LabelColumn.Annotations.Schema[AnnotationUtils.Kinds.SlotNames].Type, false); 459var predLabelMetadata = new SchemaShape(new SchemaShape.Column[] { labelAnnotationsColumn } 462outColumns[Options.PredictionColumnName] = new SchemaShape.Column(Options.PredictionColumnName, SchemaShape.Column.VectorKind.Scalar, 465outColumns[ScoreColumnName] = new SchemaShape.Column(ScoreColumnName, SchemaShape.Column.VectorKind.Vector, 470outColumns[ScoreColumnName] = new SchemaShape.Column(ScoreColumnName, SchemaShape.Column.VectorKind.Scalar, 477private protected override void CheckInputSchema(SchemaShape inputSchema)
Roberta\QATrainer.cs (33)
153CheckInputSchema(SchemaShape.Create(input.Schema)); 509public SchemaShape GetOutputSchema(SchemaShape inputSchema) 517var scoreMetadata = new List<SchemaShape.Column>(); 519scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 521scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 523scoreMetadata.Add(new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 526outColumns[Option.PredictedAnswerColumnName] = new SchemaShape.Column(Option.PredictedAnswerColumnName, SchemaShape.Column.VectorKind.VariableVector, 529outColumns[Option.ScoreColumnName] = new SchemaShape.Column(Option.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 535private void CheckInputSchema(SchemaShape inputSchema) 540if (contextCol.Kind != SchemaShape.Column.VectorKind.Scalar || contextCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 546if (questionCol.Kind != SchemaShape.Column.VectorKind.Scalar || questionCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 552if (answerCol.Kind != SchemaShape.Column.VectorKind.Scalar || answerCol.ItemType.RawType != typeof(ReadOnlyMemory<char>)) 558if (answerIndexCol.Kind != SchemaShape.Column.VectorKind.Scalar || answerIndexCol.ItemType.RawType != typeof(int)) 595public SchemaShape GetOutputSchema(SchemaShape inputSchema) 603var scoreMetadata = new List<SchemaShape.Column> 605new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, 607new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, 609new SchemaShape.Column(Kinds.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, 613outColumns[Options.PredictedAnswerColumnName] = new SchemaShape.Column(Options.PredictedAnswerColumnName, SchemaShape.Column.VectorKind.VariableVector, 616outColumns[Options.ScoreColumnName] = new SchemaShape.Column(Options.ScoreColumnName, SchemaShape.Column.VectorKind.VariableVector, 622private void CheckInputSchema(SchemaShape inputSchema)
TorchSharpBaseTrainer.cs (9)
26public abstract SchemaShape GetOutputSchema(SchemaShape inputSchema); 110CheckInputSchema(SchemaShape.Create(input.Schema)); 139private protected abstract void CheckInputSchema(SchemaShape inputSchema); 414public SchemaShape GetOutputSchema(SchemaShape inputSchema) 423private protected abstract void CheckInputSchema(SchemaShape inputSchema); 424private 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)
637/// Returns the <see cref="SchemaShape"/> of the schema that will be produced by the transformer. 642public SchemaShape GetOutputSchema(SchemaShape inputSchema) 654var metadata = new List<SchemaShape.Column>(2); 655metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 657metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 659result[OutputColumn] = new SchemaShape.Column(OutputColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, 665result[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)
1249/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer. 1252public SchemaShape GetOutputSchema(SchemaShape inputSchema) 1262if (!(col.Kind == SchemaShape.Column.VectorKind.Vector)) 1270resultDic[_options.OutputColumns[i]] = new SchemaShape.Column(_options.OutputColumns[i], 1271_outputTypes[i].IsKnownSizeVector() ? SchemaShape.Column.VectorKind.Vector 1272: SchemaShape.Column.VectorKind.VariableVector, _outputTypes[i].GetItemType(), false);
ImageClassificationTrainer.cs (11)
550new SchemaShape.Column(options.FeatureColumnName, SchemaShape.Column.VectorKind.VariableVector, 655private protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) 659var metadata = new List<SchemaShape.Column>(); 660metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, 665new SchemaShape.Column(_options.ScoreColumnName, SchemaShape.Column.VectorKind.Vector, 667new SchemaShape.Column(_options.PredictedLabelColumnName, SchemaShape.Column.VectorKind.Scalar,