1 write to Weight
Microsoft.ML.Core (1)
Data\RoleMappedSchema.cs (1)
186Weight = cols[0];
66 references to Weight
Microsoft.ML.Data (31)
Evaluators\BinaryClassifierEvaluator.cs (3)
169return new Aggregator(Host, classNames, schema.Weight != null, _aucCount, _auPrcCount, _threshold, _useRaw, _prCount, stratName); 640Host.Assert((schema.Weight != null) == Weighted); 642_weightGetter = row.GetGetter<Single>(schema.Weight.Value);
Evaluators\ClusteringEvaluator.cs (3)
142return new Aggregator(Host, schema.Feature, numClusters, _calculateDbi, schema.Weight != null, stratName); 509if (schema.Weight.HasValue) 510_weightGetter = row.GetGetter<Single>(schema.Weight.Value);
Evaluators\EvaluatorBase.cs (3)
51if (schema.Weight.HasValue) 52EvaluateUtils.CheckWeightType(Host, schema.Weight.Value.Type); 95int weight = schema.Weight?.Index ?? -1;
Evaluators\MamlEvaluator.cs (2)
145string weight = EvaluateUtils.GetColName(WeightCol, schema.Weight, null); 257if (perInst.Schema.Weight?.Name is string weightName)
Evaluators\MulticlassClassificationEvaluator.cs (3)
93return new Aggregator(Host, classNames, numClasses, schema.Weight != null, _outputTopKAcc, stratName); 424if (schema.Weight.HasValue) 425_weightGetter = row.GetGetter<float>(schema.Weight.Value);
Evaluators\MultiOutputRegressionEvaluator.cs (3)
75return new Aggregator(Host, LossFunction, vectorSize, schema.Weight != null, stratName); 314if (schema.Weight.HasValue) 315_weightGetter = row.GetGetter<float>(schema.Weight.Value);
Evaluators\QuantileRegressionEvaluator.cs (1)
77return new Aggregator(Host, LossFunction, schema.Weight != null, scoreType.Size, in slotNames, stratName);
Evaluators\RankingEvaluator.cs (3)
131return new Aggregator(Host, _labelGains, _truncationLevel, _groupSummary, schema.Weight != null, stratName); 463if (schema.Weight.HasValue) 464_weightGetter = row.GetGetter<Single>(schema.Weight.Value);
Evaluators\RegressionEvaluator.cs (1)
69return new Aggregator(Host, LossFunction, schema.Weight != null, stratName);
Evaluators\RegressionEvaluatorBase.cs (2)
212if (schema.Weight.HasValue) 213_weightGetter = row.GetGetter<float>(schema.Weight.Value);
Prediction\Calibrator.cs (1)
1024return TrainCalibrator(env, ch, caliTrainer, scored, data.Schema.Label.Value.Name, DefaultColumnNames.Score, data.Schema.Weight?.Name, maxRows);
Training\TrainerUtils.cs (6)
203if (!data.Schema.Weight.HasValue) 205var col = data.Schema.Weight.Value; 237if ((opt & CursOpt.Weight) != 0 && data.Schema.Weight.HasValue) 238columns.Add(data.Schema.Weight.Value); 314var col = schema.Weight; 433if (tschema.Weight?.Name is string wname && wname != DefaultColumnNames.Weight)
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (2)
178if (!Mappers[i].InputRoleMappedSchema.Weight.HasValue) 184var weightCol = Mappers[i].InputRoleMappedSchema.Weight.Value;
Microsoft.ML.FastTree (5)
FastTree.cs (3)
1367int weightIdx = AddColumnIfNeeded(examples.Schema.Weight, toTranspose); 1771_weights = data.Schema.Weight != null ? new List<double>() : null; 1835if (_data.Schema.Weight.HasValue)
RandomForestClassification.cs (1)
227if (!trainData.Schema.Weight.HasValue && MLContext.OneDalDispatchingEnabled)
RandomForestRegression.cs (1)
366if (!trainData.Schema.Weight.HasValue && MLContext.OneDalDispatchingEnabled)
Microsoft.ML.KMeansClustering (1)
KMeansPlusPlusTrainer.cs (1)
230if (data.Schema.Weight.HasValue)
Microsoft.ML.LightGbm (2)
LightGbmTrainerBase.cs (2)
557if (data.Schema.Weight.HasValue) 771bool hasWeights = factory.Data.Schema.Weight != null;
Microsoft.ML.Mkl.Components (3)
OlsLinearRegression.cs (1)
173if (examples.Schema.Weight.HasValue)
SymSgdClassificationTrainer.cs (2)
210if (examples.Schema.Weight.HasValue) 211ch.Assert(examplesToFeedTrain.Schema.Weight.HasValue);
Microsoft.ML.PCA (1)
PcaTrainer.cs (1)
231if (data.Schema.Weight.HasValue)
Microsoft.ML.StandardTrainers (21)
FactorizationMachine\FactorizationMachineTrainer.cs (7)
374if (data.Schema.Weight != null) 375columns.Add(data.Schema.Weight.Value); 380var weightGetter = data.Schema.Weight.HasValue ? cursor.GetGetter<float>(data.Schema.Weight.Value) : null; 480if (data.Schema.Weight != null) 481columns.Add(data.Schema.Weight.Value); 492var weightGetter = data.Schema.Weight?.Index is int weightIdx ? RowCursorUtils.GetGetterAs<float>(NumberDataViewType.Single, cursor, weightIdx) : null;
Standard\LogisticRegression\LbfgsPredictorBase.cs (3)
481if (data.Schema.Weight.HasValue) 587if (data.Schema.Weight != null) 592if (data.Schema.Weight.HasValue)
Standard\Online\OnlineLinear.cs (1)
324if (data.Schema.Weight.HasValue)
Standard\SdcaBinary.cs (4)
121if (examples.Schema.Weight.HasValue) 122ch.Assert(examplesToFeedTrain.Schema.Weight.HasValue); 331if (data.Schema.Weight.HasValue) 2029if (data.Schema.Weight.HasValue)
Standard\Simple\SimpleTrainers.cs (4)
263if (data.Schema.Weight?.Type == NumberDataViewType.Single) 264colWeight = data.Schema.Weight.Value.Index; 266var cols = colWeight > -1 ? new DataViewSchema.Column[] { labelCol, data.Schema.Weight.Value } : new DataViewSchema.Column[] { labelCol }; 271var getWeight = colWeight >= 0 ? cursor.GetGetter<float>(data.Schema.Weight.Value) : null;
Standard\StochasticTrainerBase.cs (2)
85if (examples.Schema.Weight.HasValue) 86ch.Assert(examplesToFeedTrain.Schema.Weight.HasValue);