1 write to Feature
Microsoft.ML.Core (1)
Data\RoleMappedSchema.cs (1)
177
Feature
= cols[0];
105 references to Feature
Microsoft.ML.Core (1)
Data\RoleMappedSchema.cs (1)
20
/// This class has convenience fields for several common column roles (for example, <see cref="
Feature
"/>, <see
Microsoft.ML.Data (44)
Evaluators\ClusteringEvaluator.cs (10)
116
Host.Assert(schema.
Feature
.HasValue);
117
var t = schema.
Feature
.Value.Type;
120
throw Host.ExceptSchemaMismatch(nameof(schema), "features", schema.
Feature
.Value.Name,
130
Host.Assert(!_calculateDbi || schema.
Feature
!= null);
131
return i => _calculateDbi && i == schema.
Feature
.Value.Index || pred(i);
137
Host.Assert(!_calculateDbi || schema.
Feature
?.Type.IsKnownSizeVector() == true);
142
return new Aggregator(Host, schema.
Feature
, numClusters, _calculateDbi, schema.Weight != null, stratName);
496
Host.Assert(schema.
Feature
.HasValue);
497
_featGetter = row.GetGetter<VBuffer<Single>>(schema.
Feature
.Value);
813
string feat = EvaluateUtils.GetColName(_featureCol, schema.
Feature
, DefaultColumnNames.Features);
Prediction\Calibrator.cs (1)
859
if (schema.
Feature
== null)
Scorers\FeatureContributionCalculation.cs (2)
307
private DataViewSchema.Column FeatureColumn => InputRoleMappedSchema.
Feature
.Value;
319
_env.Assert(schema.
Feature
.HasValue);
Scorers\SchemaBindablePredictorWrapper.cs (21)
127
if (schema.
Feature
?.Type is DataViewType type)
209
Contracts.Assert(schema.
Feature
.HasValue);
222
if (!InputRoleMappedSchema.
Feature
.HasValue || dependingColumns.Count() == 0)
225
return Enumerable.Repeat(InputRoleMappedSchema.
Feature
.Value, 1);
230
yield return RoleMappedSchema.ColumnRole.Feature.Bind(InputRoleMappedSchema.
Feature
.Value.Name);
242
getters[0] = _parent.GetPredictionGetter(input, InputRoleMappedSchema.
Feature
.Value.Index);
329
Contracts.Assert(schema.
Feature
.HasValue);
333
var featureToken = ctx.TokenOrNullForName(schema.
Feature
.Value.Name);
345
Contracts.Assert(schema.
Feature
.HasValue);
348
string featName = schema.
Feature
.Value.Name;
436
Contracts.Assert(schema.
Feature
.HasValue);
440
string featureToken = ctx.TokenOrNullForName(schema.
Feature
.Value.Name);
461
if (!schema.
Feature
.HasValue)
468
var featName = schema.
Feature
.Value.Name;
527
if (schema.
Feature
?.Type is DataViewType typeSrc)
542
if (dependingColumns.Count() == 0 || !InputRoleMappedSchema.
Feature
.HasValue)
545
return Enumerable.Repeat(InputRoleMappedSchema.
Feature
.Value, 1);
550
yield return (InputRoleMappedSchema.
Feature
.HasValue) ? RoleMappedSchema.ColumnRole.Feature.Bind(InputRoleMappedSchema.
Feature
?.Name) : RoleMappedSchema.ColumnRole.Label.Bind(InputRoleMappedSchema.Label?.Name);
562
var featureGetter = InputRoleMappedSchema.
Feature
.HasValue ? input.GetGetter<VBuffer<float>>(InputRoleMappedSchema.
Feature
.Value) : null;
Training\TrainerUtils.cs (10)
53
if (!data.Schema.
Feature
.HasValue)
55
var col = data.Schema.
Feature
.Value;
70
Contracts.Assert(data.Schema.
Feature
.HasValue);
71
var col = data.Schema.
Feature
.Value;
235
if ((opt & CursOpt.Features) != 0 && data.Schema.
Feature
.HasValue)
236
columns.Add(data.Schema.
Feature
.Value);
267
Contracts.CheckParam(schema.
Feature
.HasValue, nameof(schema), "Missing feature column");
269
return row.GetGetter<VBuffer<float>>(schema.
Feature
.Value);
429
if (tschema.
Feature
?.Name is string fname && fname != DefaultColumnNames.Features)
834
if ((opt & CursOpt.Features) != 0 && data.Schema.
Feature
!= null)
Microsoft.ML.Ensemble (3)
EnsembleUtils.cs (2)
22
Contracts.Assert(data.Schema.
Feature
.HasValue);
24
var featCol = data.Schema.
Feature
.Value;
Selector\FeatureSelector\RandomFeatureSelector.cs (1)
52
var type = data.Schema.
Feature
.Value.Type;
Microsoft.ML.EntryPoints (2)
PermutationFeatureImportance.cs (2)
65
Contracts.Check(roleMappedData.Schema.
Feature
!= null, "Feature column not found.");
310
schema.
Feature
.Value.GetSlotNames(ref slots);
Microsoft.ML.FastTree (26)
FastTree.cs (5)
190
AnnotationUtils.TryGetCategoricalFeatureIndices(trainData.Schema.Schema, trainData.Schema.
Feature
.Value.Index, out CategoricalFeatures);
205
Host.Assert(data.Schema.
Feature
.HasValue);
211
return itdv?.GetSlotType(data.Schema.
Feature
.Value.Index) != null;
1329
Host.Assert(examples.Schema.
Feature
.HasValue);
1364
int featIdx = AddColumnIfNeeded(examples.Schema.
Feature
, toTranspose);
FastTreeClassification.cs (1)
197
FeatureCount = trainData.Schema.
Feature
.Value.Type.GetValueCount();
FastTreeRanking.cs (1)
150
FeatureCount = trainData.Schema.
Feature
.Value.Type.GetValueCount();
FastTreeRegression.cs (1)
120
FeatureCount = trainData.Schema.
Feature
.Value.Type.GetValueCount();
FastTreeTweedie.cs (1)
130
FeatureCount = trainData.Schema.
Feature
.Value.Type.GetValueCount();
GamModelParameters.cs (1)
634
var featCol = schema.
Feature
.Value;
GamTrainer.cs (3)
233
InputLength = context.TrainingSet.Schema.
Feature
.Value.Type.GetValueCount();
270
Host.Assert(data.Schema.
Feature
.HasValue);
274
return (data.Data as ITransposeDataView)?.GetSlotType(data.Schema.
Feature
.Value.Index) != null;
RandomForestClassification.cs (1)
224
FeatureCount = trainData.Schema.
Feature
.Value.Type.GetValueCount();
RandomForestRegression.cs (1)
363
FeatureCount = trainData.Schema.
Feature
.Value.Type.GetValueCount();
TreeEnsemble\InternalTreeEnsemble.cs (2)
440
Contracts.Assert(schema.
Feature
.HasValue);
441
var feat = schema.
Feature
.Value;
TreeEnsembleFeaturizer.cs (9)
80
private DataViewSchema.Column FeatureColumn => InputRoleMappedSchema.
Feature
.Value;
110
ectx.Assert(schema.
Feature
.HasValue);
526
env.CheckParam(schema.
Feature
!= null, nameof(schema), "Need a feature column");
646
Contracts.Assert(data.Schema.
Feature
.HasValue);
655
if (vm.InputType.GetVectorSize() != data.Schema.
Feature
.Value.Type.GetVectorSize())
659
vm.InputType.GetVectorSize(), data.Schema.
Feature
.Value.Type.GetVectorSize());
716
ch.Assert(data.Schema.
Feature
.HasValue);
726
if (data != null && vm.InputType.GetVectorSize() != data.Schema.
Feature
.Value.Type.GetVectorSize())
730
vm.InputType.GetVectorSize(), data.Schema.
Feature
.Value.Type.GetVectorSize());
Microsoft.ML.LightGbm (2)
LightGbmTrainerBase.cs (2)
645
var featureCol = trainData.Schema.
Feature
.Value;
648
var colType = trainData.Schema.
Feature
.Value.Type;
Microsoft.ML.Mkl.Components (5)
OlsLinearRegression.cs (2)
157
ch.CheckParam(examples.Schema.
Feature
.HasValue, nameof(examples), "Need a feature column");
166
var typeFeat = examples.Schema.
Feature
.Value.Type as VectorDataViewType;
SymSgdClassificationTrainer.cs (3)
209
ch.Assert(examplesToFeedTrain.Schema.
Feature
.HasValue);
213
ch.Check(examplesToFeedTrain.Schema.
Feature
.Value.Type is VectorDataViewType vecType && vecType.Size > 0, "Training set has no features, aborting training.");
703
int numFeatures = data.Schema.
Feature
.Value.Type.GetVectorSize();
Microsoft.ML.StandardTrainers (16)
LdSvm\LdSvmTrainer.cs (3)
591
using (var cursor = _data.Data.GetRowCursor(_data.Data.Schema[_data.Schema.
Feature
.Value.Name]))
593
var getter = cursor.GetGetter<VBuffer<float>>(_data.Data.Schema[_data.Schema.
Feature
.Value.Name]);
632
var featureCol = _data.Data.Schema[_data.Schema.
Feature
.Value.Name];
Standard\LinearModelParameters.cs (2)
532
Statistics?.SaveText(writer, schema.
Feature
.Value, 20);
543
Statistics?.SaveSummaryInKeyValuePairs(schema.
Feature
.Value, int.MaxValue, results);
Standard\LogisticRegression\LbfgsPredictorBase.cs (1)
487
var typeFeat = data.Schema.
Feature
.Value.Type as VectorDataViewType;
Standard\LogisticRegression\LogisticRegression.cs (1)
268
var featureCol = cursorFactory.Data.Schema.
Feature
.Value;
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
883
Statistics.SaveText(writer, schema.
Feature
.Value, 20);
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (1)
141
Host.Check(data.Schema.
Feature
.HasValue, "Missing Feature column");
Standard\SdcaBinary.cs (5)
120
ch.Assert(examplesToFeedTrain.Schema.
Feature
.HasValue);
124
ch.Check(examplesToFeedTrain.Schema.
Feature
.Value.Type is VectorDataViewType vecType && vecType.Size > 0, "Training set has no features, aborting training.");
327
int numFeatures = data.Schema.
Feature
.Value.Type.GetVectorSize();
2024
Contracts.Assert(data.Schema.
Feature
.HasValue);
2026
int numFeatures = data.Schema.
Feature
.Value.Type.GetVectorSize();
Standard\StochasticTrainerBase.cs (2)
84
ch.Assert(examplesToFeedTrain.Schema.
Feature
.HasValue);
88
ch.Check(examplesToFeedTrain.Schema.
Feature
.Value.Type is VectorDataViewType vecType && vecType.Size > 0, "Training set has no features, aborting training.");
Microsoft.ML.TimeSeries (6)
AdaptiveSingularSpectrumSequenceModeler.cs (6)
1210
_host.CheckParam(data.Schema.
Feature
.HasValue, nameof(data), "Must have features column.");
1211
var featureCol = data.Schema.
Feature
.Value;
1557
if (data.Schema.
Feature
.Value.Type != NumberDataViewType.Single)
1558
throw _host.ExceptUserArg(nameof(data.Schema.
Feature
.Value.Name), "The time series input column has " +
1559
"type '{0}', but must be a float.", data.Schema.
Feature
.Value.Type);
1561
var col = data.Schema.
Feature
.Value;