1 write to Values
Microsoft.ML.DataView (1)
VBufferEditor.cs (1)
122Values = _values.AsSpan(0, physicalValuesCount);
459 references to Values
Microsoft.ML.AutoML.Tests (1)
Util.cs (1)
31editor.Values[i] = colNames.ElementAt(i).AsMemory();
Microsoft.ML.Core (65)
Utilities\VBufferUtils.cs (65)
246editor.Values.Clear(); 277for (int i = 0; i < editor.Values.Length; i++) 278manip(i, ref editor.Values[i]); 283for (int i = 0; i < editor.Values.Length; i++) 284manip(dstIndices[i], ref editor.Values[i]); 309int dstValuesCount = editor.Values.Length; 313manip(slot, ref editor.Values[slot]); 320manip(slot, ref editor.Values[idx]); 343editor.Values.Slice(idx, sliceLength).CopyTo(editor.Values.Slice(idx + 1)); 347editor.Values[idx] = value; 371editor.Values[indices[i]] = values[i]; 374editor.Values.Clear(); 380editor.Values.Slice(min, indices[ii] - min).Clear(); 383editor.Values.Slice(min, dst.Length - min).Clear(); 390editor.Values[indices[i]] = values[i]; 418newIndicesEditor.Values.Clear(); 433editor.Values.Slice(lim, sliceLength).CopyTo(editor.Values.Slice(denseCount)); 438editor.Values[ii] = i >= 0 && dstIndices[i] == ii ? dstValues[i--] : default(T); 482editor.Values[j] = srcValues[i]; 632manip(i, default(TSrc), ref editor.Values[i]); 637manip(dstIndices[i], default(TSrc), ref editor.Values[i]); 653manip(i, srcValues[i], ref editor.Values[i]); 669manip(i, srcValues[sI], ref editor.Values[i]); 673manip(i, default(TSrc), ref editor.Values[i]); 679manip(srcIndices[i], srcValues[i], ref editor.Values[srcIndices[i]]); 692editor.Values.Clear(); 694manip(editor.Indices[i] = srcIndices[i], srcValues[i], ref editor.Values[i]); 751var values = editor.Values; 801manip(srcIndices[i], srcValues[i], ref editor.Values[i]); 816manip(sIndex, srcValues[sI], ref editor.Values[i]); 820manip(dstIndices[i], default(TSrc), ref editor.Values[i]); 831manip(sIndex, srcValues[sI], ref editor.Values[dI++]); 862manip(srcIndices[sI], srcValues[sI], ref editor.Values[sI]); 897manip(i, srcValues[i], default(TDst), ref editor.Values[i]); 912manip(i, srcValues[ii], default(TDst), ref editor.Values[ii]); 926manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); 932editor.Values[j] = dstValues[j]; 940manip(i, srcValues[i], dstValues[i], ref editor.Values[i]); 959manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); 963manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); 973manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); 977editor.Values[j] = dstValues[j]; 998manip(j, default(TSrc), dstValues[jj], ref editor.Values[jj]); 1006editor.Values[jj] = dstValues[jj]; 1021manip(i, srcValues[i], dstValues[jj], ref editor.Values[i]); 1025manip(i, srcValues[i], default(TDst), ref editor.Values[i]); 1082manip(i, srcValues[ii], dstValues[jj], ref editor.Values[kk]); 1090manip(i, srcValues[ii], default(TDst), ref editor.Values[kk]); 1100manip(j, default(TSrc), dstValues[jj], ref editor.Values[kk]); 1102editor.Values[kk] = dstValues[jj]; 1142Span<TDst> values = editor.Values; 1208editor.Values[i] = func(i, aVal, bValues[i]); 1218editor.Values[i] = func(i, aValues[i], bVal); 1225editor.Values[i] = func(i, aValues[i], bValues[i]); 1265editor.Values[aI] = func(aIndices[aI], aValues[aI], bValues[aI]); 1277editor.Values[bI] = func(bIndices[bI], aVal, bValues[bI]); 1280editor.Values[bI] = func(bIndices[bI], default(TSrc1), bValues[bI]); 1292editor.Values[aI] = func(aIndices[aI], aValues[aI], bVal); 1295editor.Values[aI] = func(aIndices[aI], aValues[aI], default(TSrc2)); 1327editor.Values[newI] = func(index, aVal, bVal); 1334editor.Values[newI] = func(index, aValues[aI], default(TSrc2)); 1341editor.Values[newI] = func(index, default(TSrc1), bValues[bI]); 1360editor.Values[i] = src[i];
Microsoft.ML.Core.Tests (5)
UnitTests\ScoreSchemaTest.cs (1)
27bufferEditor.Values[i] = string.Format($"Key-{i}").AsMemory();
UnitTests\TestVBuffer.cs (4)
124for (int i = 0; i < editor.Values.Length; ++i) 125editor.Values[i] *= d; 1016var values = editor.Values; 1129for (int i = 0; i < bEditor.Values.Length; ++i)
Microsoft.ML.Data (144)
Data\BufferBuilder.cs (2)
454_values.AsSpan(0, _length).CopyTo(editor.Values); 461_values.AsSpan(0, _count).CopyTo(editor.Values);
Data\RowCursorUtils.cs (3)
286conv(in srcValues[i], ref editor.Values[i]); 441editor.Values[kv.Key] = kv.Value - 1; 443editor.Values[kv.Key] = Single.NaN;
DataLoadSave\Binary\Codecs.cs (2)
1097.CopyTo(editor.Values); 1108.CopyTo(editor.Values);
DataLoadSave\Database\DatabaseLoaderCursor.cs (26)
389editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetBoolean(columnIndex); 395editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetBoolean(columnIndex); 419editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetByte(columnIndex); 425editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetByte(columnIndex); 449editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetDateTime(columnIndex); 455editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetDateTime(columnIndex); 479editor.Values[i] = DataReader.IsDBNull(columnIndex) ? double.NaN : DataReader.GetDouble(columnIndex); 485editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? double.NaN : DataReader.GetDouble(columnIndex); 509editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetInt16(columnIndex); 515editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetInt16(columnIndex); 539editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetInt32(columnIndex); 545editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetInt32(columnIndex); 569editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetInt64(columnIndex); 575editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetInt64(columnIndex); 599editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : (sbyte)DataReader.GetByte(columnIndex); 605editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : (sbyte)DataReader.GetByte(columnIndex); 629editor.Values[i] = DataReader.IsDBNull(columnIndex) ? float.NaN : DataReader.GetFloat(columnIndex); 635editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? float.NaN : DataReader.GetFloat(columnIndex); 659editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetString(columnIndex).AsMemory(); 665editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : DataReader.GetString(columnIndex).AsMemory(); 689editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : (ushort)DataReader.GetInt16(columnIndex); 695editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : (ushort)DataReader.GetInt16(columnIndex); 719editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : (uint)DataReader.GetInt32(columnIndex); 725editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : (uint)DataReader.GetInt32(columnIndex); 749editor.Values[i] = DataReader.IsDBNull(columnIndex) ? default : (ulong)DataReader.GetInt64(columnIndex); 755editor.Values[i++] = DataReader.IsDBNull(columnIndex) ? default : (ulong)DataReader.GetInt64(columnIndex);
DataLoadSave\Text\TextLoaderParser.cs (1)
426_values.AsSpan(0, _count).CopyTo(editor.Values);
DataView\CacheDataView.cs (1)
1403_values.CopyTo(_valueBoundaries[idx], editor.Values, valueCount);
DataView\DataViewConstructionUtils.cs (4)
319dstEditor.Values[i] = convert(buf[i]); 347buf.AsSpan(0, n).CopyTo(dstEditor.Values); 986dstEditor.Values[i] = value[i].AsMemory(); 999value.AsSpan(0, n).CopyTo(dstEditor.Values);
DataView\Transposer.cs (2)
1191_inputValue.GetValues().Slice(min, len).CopyTo(editor.Values); 1217_inputValue.GetValues().Slice(smin, scount).CopyTo(editor.Values);
Deprecated\Instances\HeaderSchema.cs (1)
59nameList.CopyTo(editor.Values);
Deprecated\Vector\VBufferMathUtils.cs (14)
90CpuMathUtils.Scale(c, editor.Values); 92editor.Values.Clear(); 119editor.Values.Clear(); 121CpuMathUtils.Scale(c, srcValues, editor.Values, length); 129editor.Values.Clear(); 131CpuMathUtils.Scale(c, srcValues, editor.Values, count); 151CpuMathUtils.Add(srcValues, editor.Values, src.Length); 153CpuMathUtils.Add(srcValues, src.GetIndices(), editor.Values, srcValues.Length); 179CpuMathUtils.AddScale(c, srcValues, editor.Values, src.Length); 181CpuMathUtils.AddScale(c, srcValues, src.GetIndices(), editor.Values, srcValues.Length); 209CpuMathUtils.AddScaleCopy(c, srcValues, dst.GetValues(), editor.Values, length); 254values = editor.Values.Slice(offset); 302values = editor.Values; 394editor.Values.Clear();
Deprecated\Vector\VectorUtils.cs (7)
122aEditor.Values[count++] = pair.Value; 129aEditor.Values[count++] = pair.Value; 138var value = aEditor.Values[i]; 148aEditor.Values[i] = ratio * aEditor.Values[i]; 153GenericSpanSortHelper<int>.Sort(aEditor.Indices, aEditor.Values, 0, newCount); 167CpuMathUtils.MulElementWise(a.GetValues(), dst.GetValues(), editor.Values, a.Length);
Evaluators\ClusteringEvaluator.cs (3)
697editor.Values[i] = scores.GetItemOrDefault(sortedIndices[i]); 711editor.Values[i] = (uint)sortedIndices[i] + 1; 746editor.Values[i - 1] = $"#{i} {suffix}".AsMemory();
Evaluators\EvaluatorBase.cs (1)
215editor.Values[i] = dictionaries[i].ColName.AsMemory();
Evaluators\EvaluatorUtils.cs (8)
516editor.Values[map[kvp.Key]] = kvp.Value; 540editor.Values[map[kvp.Key]] = kvp.Value; 542editor.Values[j] = def; 704editor.Values[j] = 0; 706editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; 715editor.Values[j] = 0; 717editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; 1034editor.Values[j] = string.Format("Label_{0}", j).AsMemory();
Evaluators\MulticlassClassificationEvaluator.cs (5)
537editor.Values[i] = string.Format("(class {0})", ClassNames[i]).AsMemory(); 761editor.Values[i] = scores.GetItemOrDefault(sortedIndices[i]); 775editor.Values[i] = (uint)sortedIndices[i] + 1; 838editor.Values[i - 1] = string.Format("#{0} {1}", i, suffix).AsMemory(); 850editor.Values[i] = _classNames[i];
Evaluators\MultiOutputRegressionEvaluator.cs (2)
367editor.Values[i] = string.Format("(Label_{0})", i).AsMemory(); 606editor.Values[i] = string.Format("{0}_{1}", prefix, i).AsMemory();
Evaluators\QuantileRegressionEvaluator.cs (9)
153totalL1LossEditor.Values[i] += weightedDiff; 154totalL2LossEditor.Values[i] += diff * weightedDiff; 165totalL1LossEditor.Values[scoreIndices[i]] += weightedDiff; 166totalL2LossEditor.Values[scoreIndices[i]] += diff * weightedDiff; 181totalLossEditor.Values[i] += lossValues[i] * weight; 188totalLossEditor.Values[lossIndices[i]] += lossValues[i] * weight; 200editor.Values[i] = srcValues[i] * inv; 375editor.Values[i] = string.Format("{0} ({1})", prefix, quantiles[i]).AsMemory(); 409l1Editor.Values[s.Key] = Math.Abs(lab - s.Value);
Evaluators\RankingEvaluator.cs (4)
537editor.Values[i] = string.Format("{0}@{1}", prefix, i + 1).AsMemory(); 546editor.Values[i] = string.Format("@{0}", i + 1).AsMemory(); 685editor.Values[i] = 781src.CopyTo(editor.Values);
Scorers\FeatureContributionCalculation.cs (1)
240var values = editor.Values;
Scorers\ScoreSchemaFactory.cs (1)
95bufferEditor.Values[i] = string.Format("Quantile-{0}", quantiles[i]).AsMemory();
Transforms\ColumnConcatenatingTransformer.cs (5)
752editor.Values[count] = bufferValues[i]; 761editor.Values[count] = bufferValues[i]; 771editor.Values[count] = tmp; 791tmpBufs[j].CopyTo(editor.Values, offset); 797editor.Values[offset++] = tmp;
Transforms\Hashing.cs (18)
1051editor.Values[i] = hasher.HashCoreOld(seed, mask, srcValues[i]); 1068editor.Values[i] = hasher.HashCoreOld(seed, mask, srcValues[i]); 1077editor.Values[i] = defaultHashOld; 1081editor.Values[srcIndices[i]] = hasher.HashCoreOld(seed, mask, srcValues[i]); 1105editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); 1122editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); 1131editor.Values[i] = defaultHash; 1135editor.Values[srcIndices[i]] = hasher.HashCore(seed, mask, srcValues[i]); 1171editor.Values[i] = hasher.HashCoreOld(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1177editor.Values[i] = hasher.HashCoreOld(Hashing.MurmurRound(seed, (uint)srcIndices[i]), mask, srcValues[i]); 1194editor.Values[i] = hasher.HashCoreOld(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1204editor.Values[i] = hasher.HashCoreOld(indexSeed, mask, default(T)); 1206editor.Values[i] = hasher.HashCoreOld(indexSeed, mask, srcValues[j++]); 1235editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1241editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)srcIndices[i]), mask, srcValues[i]); 1258editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); 1268editor.Values[i] = hasher.HashCore(indexSeed, mask, default(T)); 1270editor.Values[i] = hasher.HashCore(indexSeed, mask, srcValues[j++]);
Transforms\KeyToValue.cs (4)
398MapKey(in srcValues[slot], keyValues, ref editor.Values[slot]); 426MapKey(in srcValues[islot], keyValues, ref editor.Values[slot]); 433editor.Values[slot] = _na; 451editor.Values[islotDst] = dstItem;
Transforms\KeyToVector.cs (4)
418editor.Values[slot++] = sb.ToString().AsMemory(); 490editor.Values[0] = 1; 589editor.Values[count] = 1; 602editor.Values[count] = 1;
Transforms\NormalizeColumnDbl.cs (3)
1538VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val; 1684VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = origVal; 2078VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val;
Transforms\NormalizeColumnSng.cs (3)
1701VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val; 1847VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = origVal; 2242VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val;
Transforms\ValueMapping.cs (2)
218editor.Values[i] = keys[i].ToString().AsMemory(); 926editor.Values[ich] = MapValue(values[ich]);
Transforms\ValueToKeyMappingTransformerImpl.cs (5)
660Contracts.Assert(0 <= nstr.Id && nstr.Id < editor.Values.Length); 662editor.Values[nstr.Id] = nstr.Value; 743_values.CopyTo(editor.Values); 796editor.Values[i] = sb.ToString().AsMemory(); 1140srcMeta.GetItemOrDefault((int)(convKeyVal - 1), ref editor.Values[pair.Key]);
Utilities\SlotDropper.cs (3)
137editor.Values[iDst++] = srcValues[iSrc++]; 144editor.Values[iDst++] = srcValues[iSrc++]; 181editor.Values[iiDst++] = srcValues[iiSrc++];
Microsoft.ML.DataView (13)
VBuffer.cs (7)
182CopyTo(editor.Values); 184_values.AsSpan(0, Length).CopyTo(editor.Values); 200_values.AsSpan(0, Length).CopyTo(editor.Values); 209_values.AsSpan(0, _count).CopyTo(editor.Values); 233_values.AsSpan(sourceIndex, length).CopyTo(editor.Values); 250_values.AsSpan(copyMin, copyCount).CopyTo(editor.Values); 328source.AsSpan(sourceIndex, length).CopyTo(editor.Values);
VBufferEditor.cs (6)
74/// <see cref="Values"/> (and <see cref="Indices"/> if the buffer is not dense). 99/// Gets a value indicating whether a new <see cref="Values"/> array was allocated. 130/// Commits the edits and creates a new <see cref="VBuffer{T}"/> using the current <see cref="Values"/> and <see cref="Indices"/>. 136return new VBuffer<T>(_logicalLength, Values.Length, _values, _indices); 142/// of <see cref="Values"/> and, if sparse, <see cref="Indices"/>. 159Contracts.CheckParam(physicalValuesCount <= Values.Length, nameof(physicalValuesCount),
Microsoft.ML.Ensemble (11)
EnsembleUtils.cs (3)
61editor.Values[i] = !includedIndices[i] ? defaultValue : srcValues[i]; 74editor.Values[count] = srcValues[i]; 94editor.Values[count] = srcValues[i];
OutputCombiners\BaseMultiAverager.cs (1)
40editor.Values.Clear();
OutputCombiners\BaseMultiCombiner.cs (1)
103editor.Values[i] = Single.NaN;
OutputCombiners\BaseScalarStacking.cs (1)
29src.CopyTo(editor.Values);
OutputCombiners\MultiMedian.cs (1)
93editor.Values[i] = MathUtils.GetMedianInPlace(raw, count);
OutputCombiners\MultiStacking.cs (1)
94src[i].CopyTo(editor.Values, iv);
OutputCombiners\MultiVoting.cs (3)
87editor.Values.Clear(); 95editor.Values[index]++; 102editor.Values[i] /= voteCount;
Microsoft.ML.FastTree (11)
FastTree.cs (5)
1319conv(in srcValues[i], ref editor.Values[i]); 2523_dense.CopyTo(editor.Values); 2524editor.Values.Slice(_dense.Count, length - _dense.Count).Clear(); 2527_dense.CopyTo(editor.Values, length); 2538editor.Values[i] = _sparse[i].Value;
GamModelParameters.cs (1)
429editor.Values[featureIndex] = contribution;
RandomForestRegression.cs (1)
255editor.Values[i] = qdist.GetQuantile((float)quantiles[i]);
TreeEnsembleFeaturizer.cs (4)
273editor.Values[i] = _ensemble.GetLeafValue(i, _leafIds[i]); 480editor.Values[t] = string.Format("Tree{0:000}", t).AsMemory(); 495editor.Values[i++] = string.Format("Tree{0:000}Leaf{1:000}", t, l).AsMemory(); 515editor.Values[i++] = string.Format("Tree{0:000}Node{1:000}", t, l).AsMemory();
Microsoft.ML.ImageAnalytics (3)
ImageLoader.cs (1)
320bytesread = ReadToEnd(fs, editor.Values);
ImagePixelExtractor.cs (2)
357Span<float> vf = typeof(TValue) == typeof(float) ? MemoryMarshal.Cast<TValue, float>(editor.Values) : default; 358Span<byte> vb = typeof(TValue) == typeof(byte) ? MemoryMarshal.Cast<TValue, byte>(editor.Values) : default;
Microsoft.ML.KMeansClustering (1)
KMeansModelParameters.cs (1)
158Map(in src, editor.Values);
Microsoft.ML.Mkl.Components (5)
SymSgdClassificationTrainer.cs (3)
758Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weightsEditor.Values, ref bias, numFeatures, 780Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weightsEditor.Values, ref bias, numFeatures, 802Native.MapBackWeightVector(weightsEditor.Values, stateGCHandle);
VectorWhitening.cs (2)
6911, model, length, values, 1, 0, editor.Values, 1); 702editor.Values[i] = CpuMathUtils.DotProductSparse(model.AsSpan(offs), values, indices, count);
Microsoft.ML.OnnxTransformer (3)
OnnxTransform.cs (3)
600dstEditor.Values[i] = slotsAttr.Strings[i].ToString(Encoding.UTF8).AsMemory(); 721tensor.Buffer.Span.CopyTo(editor.Values); 745editor.Values[i] = tensor.GetValue(i).AsMemory();
Microsoft.ML.PCA (1)
PcaTransformer.cs (1)
594editor.Values[i] = VectorUtils.DotProductWithOffset(transformInfo.Eigenvectors[i], 0, in src) -
Microsoft.ML.StandardTrainers (40)
LdSvm\LdSvmTrainer.cs (3)
430wInit.Values[j] = 2 * Host.Rand.NextSingle() - 1; 431thetaPrimeInit.Values[j] = 2 * Host.Rand.NextSingle() - 1; 433thetaInit.Values[j] = 2 * Host.Rand.NextSingle() - 1;
Optimizer\DifferentiableFunction.cs (2)
265VBufferEditor.CreateFromBuffer(ref dir).Values[0] = n; 304VBufferEditor.CreateFromBuffer(ref dir).Values[0] = n;
Standard\LogisticRegression\LogisticRegression.cs (2)
214Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); 215editor.Values[0] += mult;
Standard\LogisticRegression\MulticlassLogisticRegression.cs (4)
272Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); 273editor.Values[c] += mult; 791editor.Values[i] = Biases[i] + VectorUtils.DotProduct(in weights[i], in src); 793Calibrate(editor.Values);
Standard\ModelStatistics.cs (6)
378var weight = estimateEditor.Values[i - 1] = _weights.GetItemOrDefault(wi); 379var stdError = stdErrorEditor.Values[wi] = coeffStdErrorValues[i]; 380zScoreEditor.Values[i - 1] = weight / stdError; 381pValueEditor.Values[i - 1] = 1 - (float)ProbabilityFunctions.Erf(Math.Abs(zScoreEditor.Values[i - 1] / sqrt2)); 398editor.Values[i - 1] = slotNames.GetItemOrDefault(wi);
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (1)
604Span<float> labelScores = editor.Values;
Standard\MulticlassClassification\OneVersusAllTrainer.cs (3)
639buffer.CopyTo(editor.Values); 743buffer.CopyTo(editor.Values); 889buffer.CopyTo(editor.Values);
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (1)
486ComputeProbabilities(buffer, editor.Values);
Standard\PoissonRegression\PoissonRegression.cs (2)
179Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); 180editor.Values[0] += mult;
Standard\SdcaBinary.cs (6)
861VectorUtils.AddMult(in features, weightsEditor.Values, primalUpdate); 880CpuMathUtils.SdcaL1UpdateDense(primalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); 882CpuMathUtils.SdcaL1UpdateSparse(primalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); 2136VectorUtils.AddMult(in features, weightsEditor.Values, (float)(step / weightScaling));
Standard\SdcaMulticlass.cs (10)
279VectorUtils.AddMult(in features, weightsEditor.Values, -primalUpdate); 298CpuMathUtils.SdcaL1UpdateDense(-primalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); 300CpuMathUtils.SdcaL1UpdateSparse(-primalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); 314VectorUtils.AddMult(in features, weightsEditor.Values, labelPrimalUpdate); 329CpuMathUtils.SdcaL1UpdateDense(labelPrimalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); 331CpuMathUtils.SdcaL1UpdateSparse(labelPrimalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values);
Microsoft.ML.TensorFlow (3)
TensorflowTransform.cs (2)
726FetchStringData(tensor, editor.Values); 742tensor.CopyTo<T>(editor.Values);
TensorflowUtils.cs (1)
71bufferEditor.Values[i] = op.inputs[i].op.name.AsMemory();
Microsoft.ML.TimeSeries (47)
AdaptiveSingularSpectrumSequenceModeler.cs (12)
1436resEditor.Values[0] = _nextPrediction; 1440resEditor.Values[i] = _autoregressionNoiseMean + _observationNoiseMean; 1442resEditor.Values[i] += _state[j] * _alpha[k]; 1445resEditor.Values[i] += resEditor.Values[j] * _alpha[k]; 1458sdEditor.Values[0] = _autoregressionNoiseVariance + _observationNoiseVariance; 1467sdEditor.Values[i] = sdEditor.Values[i - 1] + _autoregressionNoiseVariance * temp * temp; 1471sdEditor.Values[i] = (float)Math.Sqrt(sdEditor.Values[i]); 1524upper.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset + temp); 1525lower.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset - temp);
SequentialAnomalyDetectionTransformBase.cs (24)
517editor.Values[i] = Double.NaN; 531result.Values[i] = Double.NaN; 534result.Values[1] = ComputeRawAnomalyScore(ref input, windowedBuffer, iteration); 536if (Double.IsNaN(result.Values[1])) 537result.Values[0] = 0; 543rawScore = (float)result.Values[1]; 549rawScore = (float)(-result.Values[1]); 556rawScore = (float)Math.Abs(result.Values[1]); 562result.Values[2] = ComputeKernelPValue(rawScore); 567result.Values[2] = 1 - result.Values[2]; 574result.Values[2] = Math.Min(result.Values[2], 1 - result.Values[2]); 579if (result.Values[2] < SequentialAnomalyDetectionTransformBase<TInput, TState>.MinPValue) 580result.Values[2] = SequentialAnomalyDetectionTransformBase<TInput, TState>.MinPValue; 581else if (result.Values[2] > SequentialAnomalyDetectionTransformBase<TInput, TState>.MaxPValue) 582result.Values[2] = SequentialAnomalyDetectionTransformBase<TInput, TState>.MaxPValue; 593martingaleUpdate = Parent.LogPowerMartigaleBettingFunc(result.Values[2], Parent.PowerMartingaleEpsilon); 597martingaleUpdate = Parent.LogMixtureMartigaleBettingFunc(result.Values[2]); 614result.Values[3] = Math.Exp(_logMartingaleValue); 630alert = result.Values[2] <= Parent.AlertThreshold; 633alert = (Parent.Martingale != MartingaleType.None) && (result.Values[3] >= Parent.AlertThreshold); 649result.Values[0] = Convert.ToDouble(alert);
SequentialForecastingTransformBase.cs (1)
301editor.Values[i] = float.NaN;
SlidingWindowTransformBase.cs (4)
150result.Values[i] = value; 162result.Values[i] = windowedBuffer[i]; 163result.Values[_parentSliding.WindowSize] = input; 168result.Values[i] = windowedBuffer[i];
SrCnnAnomalyDetectionBase.cs (3)
231result.Values[1] = score; 236result.Values[0] = detres; 239result.Values[2] = mag;
SrCnnEntireAnomalyDetector.cs (1)
346_results[input.Position % _batchSize].CopyTo(result.Values);
SrCnnTransformBase.cs (2)
290editor.Values[i] = 0; 300result.Values.Fill(Double.NaN);
Microsoft.ML.TorchSharp (8)
AutoFormerV2\ObjectDetectionTrainer.cs (3)
820editor.Values[i] = outputCacher.ScoresBuffer[i]; 844editor.Values[i] = outputCacher.PredictedLabelsBuffer[i]; 868editor.Values[i] = outputCacher.BoxBuffer[i];
NasBert\NerTrainer.cs (2)
176var newValues = targetEditor.Values; 396var newValues = editor.Values;
NasBert\TextClassificationTrainer.cs (1)
338editor.Values[i] = values[i];
Roberta\QATrainer.cs (2)
792editor.Values[i] = outputCacher.ScoresBuffer[i]; 819editor.Values[i] = outputCacher.PredictedAnswersBuffer[i];
Microsoft.ML.Transforms (95)
CountFeatureSelection.cs (1)
400VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = t;
Dracula\CountTableTransformer.cs (5)
663editor.Values[i * nFeatures + j] = $"{slotName}_{featureNamesValues[j]}".AsMemory(); 692featurizer.GetFeatures(iinfo, 0, rand, src, editor.Values); 715_parent.Featurizer.GetFeatures(iinfo, i, rand, srcValues[i], editor.Values.Slice(i * outputLength, outputLength)); 721editor.Values.Clear(); 725_parent.Featurizer.GetFeatures(iinfo, index, rand, srcValues[i], editor.Values.Slice(index * outputLength, outputLength));
Dracula\Featurizer.cs (3)
131editor.Values[i] = $"{classNames[i]}_Count".AsMemory(); 133editor.Values[_labelBinCount + i] = $"{classNames[i]}_LogOdds".AsMemory(); 134editor.Values[NumFeatures - 1] = "IsBackoff".AsMemory();
ExpressionTransformer.cs (20)
624editor.Values[i] = fn(src0.GetValues()[i]); 643editor.Values[i] = fn(src0.GetValues()[i]); 654editor.Values[i] = fn(src0.GetValues()[ii]); 658editor.Values[i] = dstDef; 688editor.Values[i] = fn(src0.GetValues()[i], src1); 700editor.Values[i] = fn(src0.GetValues()[i], src1); 714editor.Values[i] = fn(src0.GetValues()[ii], src1); 718editor.Values[i] = dstDef; 751editor.Values[i] = fn(src0.GetValues()[i], src1, src2); 763editor.Values[i] = fn(src0.GetValues()[i], src1, src2); 777editor.Values[i] = fn(src0.GetValues()[ii], src1, src2); 781editor.Values[i] = dstDef; 817editor.Values[i] = fn(src0.GetValues()[i], src1, src2, src3); 829editor.Values[i] = fn(src0.GetValues()[i], src1, src2, src3); 843editor.Values[i] = fn(src0.GetValues()[ii], src1, src2, src3); 847editor.Values[i] = dstDef; 886editor.Values[i] = fn(src0.GetValues()[i], src1, src2, src3, src4); 898editor.Values[i] = fn(src0.GetValues()[i], src1, src2, src3, src4); 912editor.Values[i] = fn(src0.GetValues()[ii], src1, src2, src3, src4); 916editor.Values[i] = dstDef;
GcnTransform.cs (3)
500var dstValues = editor.Values; 517CpuMathUtils.ScaleAdd(normScale, -offset, editor.Values); 519CpuMathUtils.Add(-offset, editor.Values);
GroupTransform.cs (1)
477_buffer.AsSpan(0, _size).CopyTo(editor.Values);
HashJoiningTransform.cs (2)
448dstEditor.Values[slot] = outputSlotName.ToString().AsMemory(); 561hashes.Values[i] = (Hashing.MixHash(hash) & mask) + 1; // +1 to offset from zero, which has special meaning for KeyType
KeyToVectorMapping.cs (1)
328editor.Values[slot++] = sb.ToString().AsMemory();
MissingValueDroppingTransformer.cs (3)
290editor.Values[iDst++] = srcValues[i]; 330editor.Values[iDst] = srcValues[i]; 348editor.Values[iDst] = srcValues[i];
MissingValueIndicatorTransform.cs (10)
190editor.Values[0] = columnName.AsMemory(); 191editor.Values[1] = (columnName + IndicatorSuffix).AsMemory(); 228editor.Values[slot++] = str.AsMemory().Slice(0, len); 229editor.Values[slot++] = str.AsMemory(); 281editor.Values[0] = 1; 286editor.Values[0] = input; 314editor.Values[iivDst] = 1; 319editor.Values[iivDst] = val; 342editor.Values[iivDst] = 1; 347editor.Values[iivDst] = val;
MissingValueIndicatorTransformer.cs (5)
358editor.Values[i] = true; 371editor.Values[ii] = true; 396editor.Values[iiDst] = true; 426editor.Values[i] = sense; 432editor.Values[i] = !sense;
MissingValueReplacing.cs (6)
736dstEditor.Values[ivSrc] = isNA(in srcVal) ? rep : srcVal; 758dstEditor.Values[iivDst] = srcVal; 764dstEditor.Values[iivDst] = rep; 810dstEditor.Values[ivSrc] = isNA(in srcVal) ? rep[ivSrc] : srcVal; 832dstEditor.Values[iivDst] = srcVal; 838dstEditor.Values[iivDst] = rep[iv];
MutualInformationFeatureSelection.cs (3)
571labelsEditor.Values[i] -= min; 572Contracts.Assert(labelsEditor.Values[i] < _numLabels); 898map(in val, ref editor.Values[i]);
RandomFourierFeaturizing.cs (4)
543VBufferEditor.CreateFromBuffer(ref oneDimensionalVector).Values[0] = src; 588dstEditor.Values[i] = (float)MathUtils.Cos(dotProduct + transformInfo.RotationTerms[i]) * scale; 591dstEditor.Values[2 * i] = (float)MathUtils.Cos(dotProduct) * scale; 592dstEditor.Values[2 * i + 1] = (float)MathUtils.Sin(dotProduct) * scale;
SvmLight\SvmLightLoader.cs (1)
315editor.Values[i] = index - _offset + 1;
Text\LdaTransform.cs (4)
505editor.Values[k] = float.NaN; 543editor.Values[i] = value; 550editor.Values[i] = (float)(editor.Values[i] / normalizer);
Text\NgramTransform.cs (1)
551dstEditor.Values[slot] = sb.ToString().AsMemory();
Text\TokenizingByCharacters.cs (11)
327editor.Values[i] = keyValuesStr.AsMemory().Slice(keyValuesBoundaries[i], keyValuesBoundaries[i + 1] - keyValuesBoundaries[i]); 491editor.Values[index++] = TextStartMarker; 494editor.Values[index++] = span[ich]; 496editor.Values[index++] = TextEndMarker; 539editor.Values[index++] = TextStartMarker; 542editor.Values[index++] = span[ich]; 544editor.Values[index++] = TextEndMarker; 585editor.Values[index++] = TextStartMarker; 593editor.Values[index++] = UnitSeparator; 597editor.Values[index++] = span[ich]; 601editor.Values[index++] = TextEndMarker;
Text\WordEmbeddingsExtractor.cs (9)
574editor.Values[i] = float.MaxValue; 575editor.Values[i + dimension] = 0; 576editor.Values[i + offset] = float.MinValue; 587if (editor.Values[i] > currentTerm) 588editor.Values[i] = currentTerm; 589editor.Values[dimension + i] += currentTerm; 590if (editor.Values[offset + i] < currentTerm) 591editor.Values[offset + i] = currentTerm; 598editor.Values[index + dimension] /= deno;
Text\WordTokenizing.cs (2)
268terms.CopyTo(editor.Values); 298editor.Values[i] = terms[i];
Microsoft.ML.Vision (3)
DnnRetrainTransform.cs (2)
897FetchStringData(tensor, editor.Values); 913tensor.CopyTo<T>(editor.Values);
ImageClassificationTrainer.cs (1)
1498classifier.Score(src, editor.Values);