- Use Cases
Below are some example workflows that cover some of KNIME's key features. You may download these example workflows and load them into your personal workspace in KNIME. (To do so, first download the attachments at the end of this article, then launch KNIME, right-click within the Workflow Projects view, and select Import KNIME Workflow...)
This workflow introduces the concept of predictive models inside KNIME. Models are passed from node to node within KNIME via connections between so-called Model Ports. These connections are readily indentifiable by the blue connector lines between a learner and an accompanying predictor node. As seen in this example, the Scorer node reports a confusion matrix and the accompanying quality measures in its view. The Color Manager node at the beginning of this example workflow colors rows according to their class values. The colors assigned by the Color Manager are subsequently visible in all successive views, such as the Scatter Plotter node's view.
The stability of a trained model is commonly verified by cross validation. KNIME offers a special type of meta node for this purpose. The Cross Validation node encapsulates an inner workflow which is executed several times; the results of each iteration are collected and presented in aggregate through the output ports of the Cross Validation meta node. The first output port reports the predicted class values for each row while the second output port reports the error rates for each iteration.
KNIME supports the preprocessing and handling of data from various data sources. Data from several databases and file sources can be read in, preprocessed, combined, aggregated, etc.
The screenshot shows a flow where data from a database is retrieved, filtered and imported into KNIME. The subflow above reads in data from a file, and filters some columns. The results from the files and from the database are joined. A group by operation is executed on the joined result. At the end the data is written to a file - writing back to a database is, of course, also possible.
The following screenshot displays a typical R analysis flow. The File Reader reads in the data and provides it for the R Learner node, which builds an r-part (decision tree) model and returns a special out-port at this node. The R Predictor is able to understand this model and can apply unknown data to the previously generated model. Other R nodes such as R Snippet and R View nodes are also available to run arbitrary R script on the input of this nodes. The result of the R Snippet node is then returned at the node's output. The R View node executes a view command and visualizes the generated view content in the node's specific view.