3 writes to Weight
Microsoft.ML.StandardTrainers (3)
Standard\LinearModelParameters.cs (3)
126
Weight
= weights;
198
Weight
= VBufferUtils.CreateEmpty<float>(len);
200
Weight
= new VBuffer<float>(len, Utils.Size(weights), weights, indices);
39 references to Weight
Microsoft.ML.StandardTrainers (39)
Standard\LinearModelParameters.cs (39)
67
public int Count => _pred.
Weight
.Length;
75
_pred.
Weight
.GetItemOrDefault(index, ref value);
88
return _pred.
Weight
.Items(all: true).Select(iv => iv.Value).GetEnumerator();
128
_inputType = new VectorDataViewType(NumberDataViewType.Single,
Weight
.Length);
130
if (
Weight
.IsDense)
131
_weightsDense =
Weight
;
150
node.AddAttribute("coefficients",
Weight
.DenseValues());
202
_inputType = new VectorDataViewType(NumberDataViewType.Single,
Weight
.Length);
205
if (
Weight
.IsDense)
206
_weightsDense =
Weight
;
226
ctx.Writer.Write(
Weight
.Length);
227
ctx.Writer.WriteIntArray(
Weight
.GetIndices());
228
ctx.Writer.WriteSingleArray(
Weight
.GetValues());
251
predictor["coeff"] = new JArray(
Weight
.DenseValues());
268
var weights =
Weight
;
277
if (features.Length !=
Weight
.Length)
278
throw Contracts.Except("Input is of length {0} does not match expected length of weights {1}", features.Length,
Weight
.Length);
280
var weights =
Weight
;
288
if (_weightsDense.Length == 0 &&
Weight
.Length > 0)
293
if (_weightsDense.Length == 0 &&
Weight
.Length > 0)
294
Weight
.CopyToDense(ref _weightsDense);
317
if (src.Length !=
Weight
.Length)
318
throw Contracts.Except("Input is of length {0}, but predictor expected length {1}", src.Length,
Weight
.Length);
335
first.
Weight
.CopyTo(ref weights);
344
var subweights = sub.
Weight
;
365
var weights =
Weight
;
377
AnnotationUtils.GetSlotNames(schema, RoleMappedSchema.ColumnRole.Feature,
Weight
.Length, ref names);
379
subBuilder.AddSlotNames(
Weight
.Length, (ref VBuffer<ReadOnlyMemory<char>> dst) => names.CopyTo(ref dst));
380
var colType = new VectorDataViewType(NumberDataViewType.Single,
Weight
.Length);
383
builder.Add("Weights", colType, (ref VBuffer<float> dst) =>
Weight
.CopyTo(ref dst), subBuilder.ToAnnotations());
399
Weight
.CopyTo(ref weights);
528
var weights =
Weight
;
540
var weights =
Weight
;
552
AnnotationUtils.GetSlotNames(schema, RoleMappedSchema.ColumnRole.Feature,
Weight
.Length, ref names);
563
var weights =
Weight
;
600
var weights =
Weight
;
664
var weights =
Weight
;
685
var weights =
Weight
;
765
var weights =
Weight
;