Package smile.data
Interface Collectors
public interface Collectors
Stream collectors for Dataset, DataFrame, and Matrix.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptiontoDataFrame
(Class<T> clazz) Returns a stream collector that accumulates objects into a DataFrame.toDataFrame
(StructType schema) Returns a stream collector that accumulates tuples into a DataFrame.static <D,
T> Collector <SampleInstance<D, T>, List<SampleInstance<D, T>>, Dataset<D, T>> Returns a stream collector that accumulates elements into a Dataset.toMatrix()
Returns a stream collector that accumulates tuples into a Matrix.
-
Method Details
-
toDataset
Returns a stream collector that accumulates elements into a Dataset.- Type Parameters:
D
- the data type.T
- the target type.- Returns:
- the stream collector.
-
toDataFrame
Returns a stream collector that accumulates objects into a DataFrame.- Type Parameters:
T
- the type of input elements to the reduction operation- Parameters:
clazz
- The class type of elements.- Returns:
- the stream collector.
-
toDataFrame
Returns a stream collector that accumulates tuples into a DataFrame.- Returns:
- the stream collector.
-
toMatrix
Returns a stream collector that accumulates tuples into a Matrix.- Returns:
- the stream collector.
-