public class StringIndexerAggregator extends Aggregator<Row,org.apache.spark.util.collection.OpenHashMap<String,Object>[],org.apache.spark.util.collection.OpenHashMap<String,Object>[]>
Aggregator
used by StringIndexer
to count labels in string columns during fitting.Constructor and Description |
---|
StringIndexerAggregator(int numColumns) |
Modifier and Type | Method and Description |
---|---|
Encoder<org.apache.spark.util.collection.OpenHashMap<String,Object>[]> |
bufferEncoder()
Specifies the
Encoder for the intermediate value type. |
org.apache.spark.util.collection.OpenHashMap<String,Object>[] |
finish(org.apache.spark.util.collection.OpenHashMap<String,Object>[] array)
Transform the output of the reduction.
|
org.apache.spark.util.collection.OpenHashMap<String,Object>[] |
merge(org.apache.spark.util.collection.OpenHashMap<String,Object>[] array1,
org.apache.spark.util.collection.OpenHashMap<String,Object>[] array2)
Merge two intermediate values.
|
Encoder<org.apache.spark.util.collection.OpenHashMap<String,Object>[]> |
outputEncoder()
Specifies the
Encoder for the final output value type. |
org.apache.spark.util.collection.OpenHashMap<String,Object>[] |
reduce(org.apache.spark.util.collection.OpenHashMap<String,Object>[] array,
Row row)
Combine two values to produce a new value.
|
org.apache.spark.util.collection.OpenHashMap<String,Object>[] |
zero()
A zero value for this aggregation.
|
toColumn
public Encoder<org.apache.spark.util.collection.OpenHashMap<String,Object>[]> bufferEncoder()
Aggregator
Encoder
for the intermediate value type.bufferEncoder
in class Aggregator<Row,org.apache.spark.util.collection.OpenHashMap<String,Object>[],org.apache.spark.util.collection.OpenHashMap<String,Object>[]>
public org.apache.spark.util.collection.OpenHashMap<String,Object>[] finish(org.apache.spark.util.collection.OpenHashMap<String,Object>[] array)
Aggregator
finish
in class Aggregator<Row,org.apache.spark.util.collection.OpenHashMap<String,Object>[],org.apache.spark.util.collection.OpenHashMap<String,Object>[]>
array
- (undocumented)public org.apache.spark.util.collection.OpenHashMap<String,Object>[] merge(org.apache.spark.util.collection.OpenHashMap<String,Object>[] array1, org.apache.spark.util.collection.OpenHashMap<String,Object>[] array2)
Aggregator
merge
in class Aggregator<Row,org.apache.spark.util.collection.OpenHashMap<String,Object>[],org.apache.spark.util.collection.OpenHashMap<String,Object>[]>
array1
- (undocumented)array2
- (undocumented)public Encoder<org.apache.spark.util.collection.OpenHashMap<String,Object>[]> outputEncoder()
Aggregator
Encoder
for the final output value type.outputEncoder
in class Aggregator<Row,org.apache.spark.util.collection.OpenHashMap<String,Object>[],org.apache.spark.util.collection.OpenHashMap<String,Object>[]>
public org.apache.spark.util.collection.OpenHashMap<String,Object>[] reduce(org.apache.spark.util.collection.OpenHashMap<String,Object>[] array, Row row)
Aggregator
b
and
return it instead of constructing new object for b.reduce
in class Aggregator<Row,org.apache.spark.util.collection.OpenHashMap<String,Object>[],org.apache.spark.util.collection.OpenHashMap<String,Object>[]>
array
- (undocumented)row
- (undocumented)public org.apache.spark.util.collection.OpenHashMap<String,Object>[] zero()
Aggregator
zero
in class Aggregator<Row,org.apache.spark.util.collection.OpenHashMap<String,Object>[],org.apache.spark.util.collection.OpenHashMap<String,Object>[]>