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