4 writes to Weights
Microsoft.ML.StandardTrainers (4)
Standard\LogisticRegression\MulticlassLogisticRegression.cs (4)
472
Weights
= new VBuffer<float>[NumberOfClasses];
511
Weights
= new VBuffer<float>[NumberOfClasses];
568
Weights
= new VBuffer<float>[NumberOfClasses];
597
Weights
= new VBuffer<float>[NumberOfClasses];
39 references to Weights
Microsoft.ML.StandardTrainers (39)
Standard\LogisticRegression\MulticlassLogisticRegression.cs (39)
473
for (int i = 0; i <
Weights
.Length; i++)
474
weights.CopyTo(ref
Weights
[i], NumberOfClasses + i * NumberOfFeatures, NumberOfFeatures);
475
if (
Weights
.All(v => v.IsDense))
476
_weightsDense =
Weights
;
516
weights[iClass].CopyTo(ref
Weights
[iClass]);
520
if (
Weights
.All(v => v.IsDense))
521
_weightsDense =
Weights
;
569
for (int i = 0; i <
Weights
.Length; i++)
572
Weights
[i] = new VBuffer<float>(NumberOfFeatures, w);
574
_weightsDense =
Weights
;
598
for (int i = 0; i <
Weights
.Length; i++)
601
Weights
[i] = new VBuffer<float>(NumberOfFeatures, Utils.Size(values), values, indices[i]);
630
Host.Assert(Biases.Length ==
Weights
.Length);
632
foreach (var fw in
Weights
)
657
if (
Weights
== _weightsDense)
661
ctx.Writer.Write(NumberOfFeatures *
Weights
.Length);
662
foreach (var fv in
Weights
)
676
for (int i = 0; i <
Weights
.Length; i++)
685
numIndices += NonZeroCount(in
Weights
[i]);
693
foreach (var fw in
Weights
)
721
foreach (var fw in
Weights
)
785
var weights =
Weights
;
801
lock (
Weights
)
806
for (int i = 0; i <
Weights
.Length; i++)
810
var w =
Weights
[i];
827
/// by using inner product of the i-th linear coefficient vector <see cref="
Weights
"/>[i] and the input feature vector (plus bias).
848
for (int classNumber = 0; classNumber <
Weights
.Length; classNumber++)
850
var orderedWeights =
Weights
[classNumber].Items().OrderByDescending(kv => Math.Abs(kv.Value));
914
in
Weights
[i],
956
predictor["coeff"] = new JArray(
Weights
.Select(w => new JArray(w.DenseValues())));
994
node.AddAttribute("coefficients",
Weights
.SelectMany(w => w.DenseValues()));
1034
Weights
[i].CopyTo(ref weights[i]);
1047
Contracts.Assert(
Weights
.Length == Biases.Length);
1049
int featuresCount =
Weights
[0].Length;
1050
for (var i = 0; i <
Weights
.Length; i++)
1052
Host.Assert(featuresCount ==
Weights
[i].Length);
1053
foreach (var weight in
Weights
[i].Items(all: true))
1104
bldr.AddColumn("Weights", getSlotNames, NumberDataViewType.Single,
Weights
);
1120
AnnotationUtils.GetSlotNames(schema, RoleMappedSchema.ColumnRole.Feature,
Weights
.Length, ref names);