73 references to VBuffer
Microsoft.ML.Core (1)
Utilities\VBufferUtils.cs (1)
70
return new
VBuffer
<T>(length, 0, null, null);
Microsoft.ML.Core.Tests (14)
UnitTests\TestVBuffer.cs (14)
36
var buffer = new
VBuffer
<float>(10, 3, new[] { 0.5f, 1.2f, -3.8f }, new[] { 1, 5, 8 });
190
var vbufMultExpected = new
VBuffer
<float>(5, 2, multResExpected, new int[2] { 3, 4 });
211
var vbufMultExpected = new
VBuffer
<float>(5, 4, multResExpected, new int[4] { 0, 1, 3, 4 });
223
var a = new
VBuffer
<float>(7, 6, new float[6] { 10, 20, 40, 50, 60, -70 },
239
var vbufMultExpected = new
VBuffer
<float>(7, 3, multResExpected, new int[3] { 4, 5, 6 });
252
var a = new
VBuffer
<float>(7, 6, new float[6] { 100, 20, 40, 50, 60, 70 },
254
var b = new
VBuffer
<float>(7, 6, new float[6] { 100, 20, 30, 40, 50, 70 },
265
var vbufMultExpected = new
VBuffer
<float>(7, 2, multResExpected, new int[2] { 0, 6 });
340
b = new
VBuffer
<T2>(a.Length, indices.Length, values, indices);
382
b = new
VBuffer
<T2>(a.Length, indices.Length, values, indices);
478
dst = new
VBuffer
<TDst>(a.Length, indices.Count, values, indices.ToArray());
514
dst = new
VBuffer
<TDst>(a.Length, indices.Length, values, indices);
935
var expectedVector = new
VBuffer
<float>(Math.Max(1, expectedLength),
991
dst = new
VBuffer
<float>(len, count, values, indices);
Microsoft.ML.Data (7)
DataLoadSave\FakeSchema.cs (1)
61
ValueGetter<VBuffer<TValue>> getter = (ref VBuffer<TValue> value) => value = new
VBuffer
<TValue>(AllVectorSizes, 0, null, null);
DataView\Transposer.cs (3)
407
cached = new
VBuffer
<T>(len, count, values, count == len ? null : indices);
409
(new
VBuffer
<T>(len, count, values, indices)).CopyToDense(ref cached);
662
var temp = new
VBuffer
<T>(_len, count, values, indices);
Evaluators\QuantileRegressionEvaluator.cs (2)
225
Score = new
VBuffer
<float>(size, 0, null, null);
226
Loss = new
VBuffer
<Double>(size, 0, null, null);
Transforms\InvertHashUtils.cs (1)
253
return new
VBuffer
<ReadOnlyMemory<char>>((int)_slots, count, values, indices);
Microsoft.ML.DataView (2)
VBufferEditor.cs (2)
136
return new
VBuffer
<T>(_logicalLength, Values.Length, _values, _indices);
163
return new
VBuffer
<T>(_logicalLength, physicalValuesCount, _values, _indices);
Microsoft.ML.Mkl.Components (1)
ComputeLRTrainingStdThroughHal.cs (1)
92
return new
VBuffer
<float>(currentWeightsCount, numSelectedParams, stdErrorValues, weightIndices);
Microsoft.ML.Predictor.Tests (3)
TestTransposer.cs (3)
133
vecs[r] = new
VBuffer
<T>(slotCount, indices.Count, vals, indices.ToArray());
160
dataA[rowCount / 2] = new
VBuffer
<int>(50, 0, null, null); // Coverage for the null vbuffer case.
226
dataA[rowCount / 2] = new
VBuffer
<int>(50, 0, null, null); // Coverage for the null vbuffer case.
Microsoft.ML.StandardTrainers (4)
Optimizer\DifferentiableFunction.cs (3)
214
VBuffer<float> dir = new
VBuffer
<float>(x.Length, values.Count, values.ToArray(), indices.ToArray());
262
VBuffer<float> dir = new
VBuffer
<float>(x.Length, 1, new float[] { 1 }, new int[] { 0 });
301
VBuffer<float> dir = new
VBuffer
<float>(x.Length, 1, new float[] { 1 }, new int[] { 0 });
Standard\ModelStatistics.cs (1)
287
_coeffStdError = new
VBuffer
<float>(length, ParametersCount, stdErrorValues, stdErrorIndices);
Microsoft.ML.TestFramework (4)
DataPipe\TestDataPipe.cs (2)
27
private static VBuffer<Single> _dataFloatSparse = new
VBuffer
<Single>(5, 3, new float[] { -0.0f, 0, 1 }, new[] { 0, 3, 4 });
34
private static VBuffer<Double> _dataDoubleSparse = new
VBuffer
<Double>(5, 3, new double[] { -0.0, 0, 1 }, new[] { 0, 3, 4 });
TestSparseDataView.cs (2)
47
new SparseExample<T>() { X = new
VBuffer
<T> (5, 3, v1, new int[] { 0, 2, 4 }) },
48
new SparseExample<T>() { X = new
VBuffer
<T> (5, 3, v2, new int[] { 0, 1, 3 }) }
Microsoft.ML.Tests (36)
FeatureContributionTests.cs (2)
278
vb = new
VBuffer
<float>(4, 3, new float[] { rand.Next(1000), rand.Next(1000), rand.Next(1000) }, new int[] { 0, 2, 3 });
282
vb = new
VBuffer
<float>(4, 4, new float[] { rand.Next(1000), rand.Next(1000), rand.Next(1000), rand.Next(1000) }, new int[] { 0, 1, 2, 3 });
PermutationFeatureImportanceTests.cs (2)
902
vb = new
VBuffer
<float>(4, 3, new float[] { rand.Next(1000), rand.Next(1000), rand.Next(1000) }, new int[] { 0, 2, 3 });
906
vb = new
VBuffer
<float>(4, 4, new float[] { rand.Next(1000), rand.Next(1000), rand.Next(1000), rand.Next(1000) }, new int[] { 0, 1, 2, 3 });
SvmLightTests.cs (32)
79
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(5, 2, new[] { 3f, 6f }, new[] { 0, 3 }) },
80
new SvmLightOutput() { Label = -1, Weight = 5, Features = new
VBuffer
<float>(5, 2, new[] { 4f, 7f }, new[] { 1, 3 }) },
81
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(5, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
82
new SvmLightOutput() { Label = 1, Weight = 0.5f, Features = new
VBuffer
<float>(5, 1, new[] { 3.14159f }, new[] { 1 }) },
107
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(5, 2, new[] { 3f, 6f }, new[] { 1, 4 }) },
108
new SvmLightOutput() { Label = -1, Weight = 5, Features = new
VBuffer
<float>(5, 2, new[] { 4f, 7f }, new[] { 2, 4 }) },
109
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(5, 0, new float[0], new int[0]), Comment = " A comment! 2:3".AsMemory() },
110
new SvmLightOutput() { Label = 1, Weight = 0.5f, Features = new
VBuffer
<float>(5, 1, new[] { 3.14159f }, new[] { 2 }) },
136
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 2, new[] { 3f, 6f }, new[] { 0, 3 }) },
137
new SvmLightOutput() { Label = -1, Weight = 5, Features = new
VBuffer
<float>(6, 3, new[] { 4f, 7f, -1f }, new[] { 1, 3, 5 }) },
138
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
139
new SvmLightOutput() { Label = 1, Weight = 0.5f, Features = new
VBuffer
<float>(6, 1, new[] { 3.14159f }, new[] { 1 }) },
166
new SvmLightOutput() { Label = 1, Weight = 1, GroupId = 1, Features = new
VBuffer
<float>(3, 2, new[] { 3.14159f, 123f }, new[] { 0, 1 }) },
167
new SvmLightOutput() { Label = -1, Weight = 1, GroupId = 5, Features = new
VBuffer
<float>(3, 2, new[] { 345f, -21f }, new[] { 1, 2 }) },
190
new SvmLightOutput() { Label = -1, Weight = 1, Features = new
VBuffer
<float>(3, 2, new[] { 1f, 2f }, new[] { 0, 2 }) },
191
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(3, 1, new[] { 3f }, new[] { 2 }) },
214
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(1, 1, new[] { 2f }, new[] { 0 }) },
309
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 2, new[] { 3f, 6f }, new[] { 0, 3 }) },
310
new SvmLightOutput() { Label = -1, Weight = 5, Features = new
VBuffer
<float>(6, 3, new[] { 4f, 7f, -1f }, new[] { 1, 3, 5 }) },
311
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
312
new SvmLightOutput() { Label = 1, Weight = 0.5f, Features = new
VBuffer
<float>(6, 1, new[] { 3.14159f }, new[] { 1 }) },
313
new SvmLightOutput() { Label = -1, Weight = 1, Features = new
VBuffer
<float>(6, 1, new[] { 2f }, new[] { 2 }) },
466
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 2, new[] { 3f, 6f }, new[] { 0, 3 }) },
467
new SvmLightOutput() { Label = -1, Weight = 5, Features = new
VBuffer
<float>(6, 3, new[] { 4f, 7f, -1f }, new[] { 1, 3, 5 }) },
468
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
469
new SvmLightOutput() { Label = 1, Weight = 0.5f, Features = new
VBuffer
<float>(6, 1, new[] { 3.14159f }, new[] { 1 }) },
470
new SvmLightOutput() { Label = -1, Weight = 1, Features = new
VBuffer
<float>(6, 1, new[] { 5f }, new[] { 1 }) }
493
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 2, new[] { 3f, 6f }, new[] { 0, 3 }) },
494
new SvmLightOutput() { Label = -1, Weight = 5, Features = new
VBuffer
<float>(6, 3, new[] { 4f, 7f, -1f }, new[] { 1, 3, 5 }) },
495
new SvmLightOutput() { Label = 1, Weight = 1, Features = new
VBuffer
<float>(6, 1, new[] { -2f }, new[] { 4 }), Comment = " A comment! 2:3".AsMemory() },
496
new SvmLightOutput() { Label = 1, Weight = 0.5f, Features = new
VBuffer
<float>(6, 1, new[] { 3.14159f }, new[] { 1 }) },
497
new SvmLightOutput() { Label = -1, Weight = 1, Features = new
VBuffer
<float>(6, 1, new[] { 5f }, new[] { 1 }) }
Microsoft.ML.Transforms (1)
PermutationFeatureImportance.cs (1)
105
weights = new
VBuffer
<float>(numSlots, count, values, indexes);