Categories

Versions

You are viewing the RapidMiner Studio documentation for version 9.4 - Check here for latest version

Flatten Collection (RapidMiner Studio Core)

Synopsis

This operator receives a 'collection of collections' and unions all content into a single collection.

Description

The Flatten Collection operator receives a 'collection of collections' and unions the content of each collection into a single collection. For example, if your collection object contains three collections which contain 5 objects each; this operator will return a single collection with 15 objects. Operators like the Collect operator can produce collections and 'collections of collections'. In the Process View, collections are indicated by double lines.

Collections can be useful when you want to apply the same operations on a number of objects. The Collect operator allows you to collect the required objects into a single collection, the Loop Collection operator allows you to iterate over all collections and finally you can separate the input objects from a collection by individually selecting the required element by using the Select operator.

Input

  • collection (Collection)

    This port expects a collection object. This operator can be useful when this object is a collection of collections.

Output

  • flat (Collection)

    The given collection object is flattened and delivered through this port.

Tutorial Processes

Introduction to Flatten Collection operator

This Example Process starts with the Subprocess operator which delivers a collection of collections. A breakpoint is inserted here so that you can have a look at this object. You can see that this object has two collections. These collections have 3 ExampleSets each. The Flatten Collection operator is applied on this object to flatten the collection into a single collection of 6 ExampleSets. The resultant flattened collection object can be seen in the Results Workspace.