4 types derived from IntArray
Microsoft.ML.FastTree (4)
Dataset\DenseIntArray.cs (1)
23
internal abstract class DenseIntArray :
IntArray
, IIntArrayForwardIndexer
Dataset\RepeatIntArray.cs (1)
18
internal sealed class DeltaRepeatIntArray :
IntArray
Dataset\SegmentIntArray.cs (1)
20
internal sealed class SegmentIntArray :
IntArray
Dataset\SparseIntArray.cs (1)
30
internal sealed class DeltaSparseIntArray :
IntArray
99 references to IntArray
Microsoft.ML.FastTree (99)
Dataset\DatasetUtils.cs (5)
35
IntArray
ratingAsFeature =
IntArray
.New(
53
IntArray
bins =
IntArray
.New(
54
skel.NumDocs, IntArrayType.Dense,
IntArray
.NumBitsNeeded(uvalToOrder.Count),
Dataset\DenseIntArray.cs (8)
38
/// Value must be in legal range 0...((2^<see cref="
IntArray
.BitsPerItem"/>)-1).
44
public override
IntArray
Clone(IntArrayBits bitsPerItem, IntArrayType type)
56
public override
IntArray
Clone(int[] itemIndices)
58
return
IntArray
.New(itemIndices.Length, IntArrayType.Dense, BitsPerItem, itemIndices.Select(x => this[x]));
61
public override
IntArray
[] Split(int[][] assignment)
64
IntArray
[] newArrays = new
IntArray
[numParts];
68
newArrays[p] =
IntArray
.New(assignment[p].Length, IntArrayType.Dense, BitsPerItem, assignment[p].Select(x => this[x]));
Dataset\Feature.cs (15)
16
private
IntArray
_bins;
42
protected Feature(
IntArray
bins)
96
Bins =
IntArray
.New(buffer, ref position);
150
public
IntArray
Bins
199
public TsvFeature(
IntArray
bins, uint[] valueMap, string name)
298
bitsPerItem =
IntArray
.NumBitsNeeded(parts[0].ValueMap.Length);
301
IntArray
b = parts[0].Bins;
302
IntArray
newBins =
IntArray
.New(b.Length, b.Type, bitsPerItem, b);
307
bitsPerItem =
IntArray
.NumBitsNeeded(concatValueMap.Length);
308
IntArray
concatBins = ConcatBins(parts, concatValueMap);
327
private static
IntArray
ConcatBins(TsvFeature[] parts, uint[] concatValueMap)
333
IntArrayBits bitsPerItem =
IntArray
.NumBitsNeeded(concatValueMap.Length);
334
DenseIntArray concatBins = (DenseIntArray)
IntArray
.New(length, IntArrayType.Dense, bitsPerItem);
340
IntArray
bins = parts[partIndex].Bins;
Dataset\FeatureFlock.cs (5)
1081
/// <see cref="
IntArray
"/> instances.
1102
/// A base class for a feature flock that wraps a single <see cref="
IntArray
"/> that contains multiple
1104
/// that doing a <see cref="
IntArray
.Sumup"/> will accumulate sufficient statistics correctly for all
1109
where TIntArray :
IntArray
1121
/// <see cref="
IntArray
"/>, where 0 indicates that all features are in the "cold" bin
Dataset\FeatureHistogram.cs (2)
28
private readonly
IntArray
_bins;
36
public FeatureHistogram(
IntArray
bins, int numBins, bool useWeights)
Dataset\IntArray.cs (12)
88
public static
IntArray
New(int length, IntArrayType type, IntArrayBits bitsPerItem, IEnumerable<int> values)
124
public static
IntArray
New(int length, IntArrayType type, IntArrayBits bitsPerItem)
157
public static
IntArray
New(byte[] buffer, ref int position)
191
public abstract
IntArray
Clone(IntArrayBits bitsPerItem, IntArrayType type);
198
public abstract
IntArray
Clone(int[] itemIndices);
200
public abstract
IntArray
[] Split(int[][] assignment);
288
public
IntArray
Compress(uint[] workarray = null)
323
IntArrayBits classicBits =
IntArray
.NumBitsNeeded(maxval + 1);
338
if ((
IntArray
.CompatibilityLevel & 0x4) == 0)
364
IntArray
bins = null;
367
bins =
IntArray
.New(Length, bestType, classicBits, this);
378
/// Interface for objects that can index into an <see cref="
IntArray
"/>, but only with a non-decreasing sequence of indices.
Dataset\OneHotFeatureFlock.cs (3)
14
internal sealed class OneHotFeatureFlock : SinglePartitionedIntArrayFlockBase<
IntArray
>
16
public OneHotFeatureFlock(
IntArray
bins, int[] hotFeatureStarts, double[][] binUpperBounds, bool categorical)
64
/// <param name="indexer">The indexer into the "shared" <see cref="
IntArray
"/>, that we
Dataset\RepeatIntArray.cs (6)
65
_values =
IntArray
.New(tempValueList.Count, IntArrayType.Dense, bitsPerItem, tempValueList) as DenseIntArray;
87
_values =
IntArray
.New(buffer, ref position) as DenseIntArray;
111
public override
IntArray
Clone(IntArrayBits bitsPerItem, IntArrayType type)
113
return
IntArray
.New(_length, type, bitsPerItem, this);
184
public override
IntArray
Clone(int[] itemIndices)
196
public override
IntArray
[] Split(int[][] assignment)
Dataset\SegmentIntArray.cs (3)
261
public override
IntArray
Clone(IntArrayBits bitsPerItem, IntArrayType type)
303
public override
IntArray
[] Split(int[][] assignment)
317
public override
IntArray
Clone(int[] itemIndices)
Dataset\SingletonFeatureFlock.cs (2)
17
private readonly
IntArray
_bins;
22
public SingletonFeatureFlock(
IntArray
bins, double[] binUpperBounds)
Dataset\SparseIntArray.cs (15)
20
/// This <see cref="
IntArray
"/> implementation represents a sequence of values using parallel
25
/// us to represent multiple values per row. In this case, <see cref="
IntArray
.GetEnumerator"/>
26
/// and <see cref="
IntArray
.GetIndexer"/> will not have sensible values, but
27
/// <see cref="
IntArray
.Sumup"/> will work and accumulate the same target into multiple bins.
83
_values =
IntArray
.New(tempValueList.Count, IntArrayType.Dense, bitsPerItem, tempValueList) as DenseIntArray;
97
_values =
IntArray
.New(buffer, ref position) as DenseIntArray;
166
_values =
IntArray
.New(tempValueList.Count, IntArrayType.Dense, bitsPerItem, tempValueList) as DenseIntArray;
200
public override
IntArray
[] Split(int[][] assignment)
202
IntArray
[] parts = new
IntArray
[assignment.Length];
206
parts[i] =
IntArray
.New(assignment[i].Length, IntArrayType.Sparse, BitsPerItem, assignment[i].Select(x => indexer[x]));
217
public override
IntArray
Clone(int[] itemIndices)
221
return
IntArray
.New(itemIndices.Length, IntArrayType.Sparse, BitsPerItem, itemIndices.Select(x => indexer[x]));
255
public override
IntArray
Clone(IntArrayBits bitsPerItem, IntArrayType type)
266
DenseIntArray dense =
IntArray
.New(Length, IntArrayType.Dense, BitsPerItem) as DenseIntArray;
FastTree.cs (15)
261
IntArray
.CompatibilityLevel = FastTreeTrainerOptions.FeatureCompressionLevel;
1050
IntArrayBits flockBits =
IntArray
.NumBitsNeeded(hotFeatureStarts[hotFeatureStarts.Length - 1] + 1);
1101
IntArray
bins =
IntArray
.New(NumExamples, type, flockBits, binnedValues);
1126
IntArrayBits flockBits =
IntArray
.NumBitsNeeded(hotFeatureStarts[hotFeatureStarts.Length - 1] + 1);
1175
IntArray
bins =
IntArray
.New(NumExamples, type, flockBits, binnedValues);
1204
IntArray
bins = null;
1207
var numBitsNeeded =
IntArray
.NumBitsNeeded(binUpperBounds.Length);
1254
bins =
IntArray
.New(values.Length, arrayType,
IntArray
.NumBitsNeeded(binUpperBounds.Length), binnedValues);
1953
IntArrayBits flockBits =
IntArray
.NumBitsNeeded(hotFeatureStarts[hotFeatureStarts.Length - 1] + 1);
2032
var denseBins = (DenseIntArray)
IntArray
.New(values.Count, IntArrayType.Dense, flockBits, values);
2257
IntArrayBits newBits =
IntArray
.NumBitsNeeded(countBins);
2558
IntArrayBits numBitsNeeded =
IntArray
.NumBitsNeeded(binUpperBounds.Length);
FastTreeRanking.cs (1)
796
if (
IntArray
.UseFastTreeNative)
SumupPerformanceCommand.cs (6)
150
private
IntArray
[] CreateRandomIntArrays(IChannel ch)
152
IntArray
[] arrays = new
IntArray
[_count];
157
IntArrayBits bits =
IntArray
.NumBitsNeeded(_bins);
178
arrays[i] =
IntArray
.New(_len, _type, bits, createIntArray(ch, r));
271
IntArray
[] arrays = CreateRandomIntArrays(ch);
Training\DocumentPartitioning.cs (1)
245
public unsafe void Split(int leaf,
IntArray
bins, HashSet<int> categoricalIndices, int gtChildIndex)