Knime 简明教程

KNIME - Workbench

当你启动 KNIME 时,你将看到以下屏幕 -

When KNIME starts, you will see the following screen −

workbench

正如屏幕截图中标记的那样,工作台包含多个视图。我们立即可以使用的视图已在屏幕截图中标记,并列在下面 -

As has been marked in the screenshot, the workbench consists of several views. The views which are of immediate use to us are marked in the screenshot and listed below −

  1. Workspace

  2. Outline

  3. Nodes Repository

  4. KNIME Explorer

  5. Console

  6. Description

随着我们在本章中向前推进,让我们详细了解这些视图。

As we move ahead in this chapter, let us learn these views each in detail.

Workspace View

对我们来说,最重要的视图是 Workspace 视图。这就是你创建机器学习模型的地方。工作空间视图在下面的屏幕截图中突出显示 -

The most important view for us is the Workspace view. This is where you would create your machine learning model. The workspace view is highlighted in the screenshot below −

workspace view

屏幕截图显示了一个打开的工作空间。你很快就会学会如何打开现有工作空间。

The screenshot shows an opened workspace. You will soon learn how to open an existing workspace.

每个工作空间包含一个或多个节点。你将在本教程的后面部分了解这些节点的重要性。这些节点通过箭头连接。通常,程序流是从左到右定义的,尽管这不是必需的。你可以在工作空间中的任何位置自由移动每个节点。两个之间的连接线会适当地移动以保持节点之间的连接。你可以在任何时候添加/删除节点之间的连接。对于每个节点,可以选择添加一小段描述。

Each workspace contains one or more nodes. You will learn the significance of these nodes later in the tutorial. The nodes are connected using arrows. Generally, the program flow is defined from left to right, though this is not required. You may freely move each node anywhere in the workspace. The connecting lines between the two would move appropriately to maintain the connection between the nodes. You may add/remove connections between nodes at any time. For each node a small description may be optionally added.

Outline View

工作空间视图可能无法一次向你显示整个工作流。这就是提供了轮廓视图的原因。

The workspace view may not be able to show you the entire workflow at a time. That is the reason, the outline view is provided.

outline view

轮廓视图显示整个工作空间的微型视图。此视图中有一个缩放窗口,你可以将其滑动以查看 Workspace 视图中工作流的不同部分。

The outline view shows a miniature view of the entire workspace. There is a zoom window inside this view that you can slide to see the different portions of the workflow in the Workspace view.

Node Repository

这是工作台中下一个重要的视图。节点存储库列出可用于你的分析的各种节点。整个存储库根据节点功能进行了很好的分类。你会发现如下类别 -

This is the next important view in the workbench. The Node repository lists the various nodes available for your analytics. The entire repository is nicely categorized based on the node functions. You will find categories such as −

  1. IO

  2. Views

  3. Analytics

node repository

在每个类别下,你会发现几个选项。只需展开每个类别视图即可查看你拥有的内容。在 IO 类别下,你会找到以各种文件格式(如 ARFF、CSV、PMML、XLS 等)读取数据的节点。

Under each category you would find several options. Just expand each category view to see what you have there. Under the IO category, you will find nodes to read your data in various file formats, such as ARFF, CSV, PMML, XLS, etc.

node repository io

根据你的输入源数据格式,你将选择相应的节点来读取你的数据集。

Depending on your input source data format, you will select the appropriate node for reading your dataset.

到目前为止,你可能已经理解了节点的目的。节点定义了你可以在工作流中以可视方式包含的特定功能。

By this time, probably you have understood the purpose of a node. A node defines a certain kind of functionality that you can visually include in your workflow.

Analytics 节点定义了各种机器学习算法,例如贝叶斯、聚类、决策树、集成学习等等。

The Analytics node defines the various machine learning algorithms, such as Bayes, Clustering, Decision Tree, Ensemble Learning, and so on.

node repository analytics

这些不同的 ML 算法的实现都在这些节点中提供。要在你的分析中应用任何算法,只需从存储库中选取所需的节点并将其添加到你的工作空间即可。将 Data reader 节点的输出连接到此 ML 节点的输入,然后你的工作流就创建好了。

The implementation of these various ML algorithms is provided in these nodes. To apply any algorithm in your analytics, simply pick up the desired node from the repository and add it to your workspace. Connect the output of the Data reader node to the input of this ML node and your workflow is created.

我们建议您浏览存储库中提供/可用的各种节点。

We suggest you to explore the various nodes available in the repository.

KNIME Explorer

工作台中下一个重要的视图是 Explorer 视图,如下面的截图所示 −

The next important view in the workbench is the Explorer view as shown in the screenshot below −

explorer

前两个类别列出了在 KNIME 服务器上定义的工作空间。第三个选项 LOCAL 用于存储您在本地计算机上创建的所有工作空间。尝试展开这些选项卡以查看各种预定义的工作空间。特别是展开 EXAMPLES 选项卡。

The first two categories list the workspaces defined on the KNIME server. The third option LOCAL is used for storing all the workspaces that you create on your local machine. Try expanding these tabs to see the various predefined workspaces. Especially, expand EXAMPLES tab.

knime explorer

KNIME 提供了多个示例,可帮助您入门该平台。在下一章中,您将使用其中一个示例来熟悉该平台。

KNIME provides several examples to get you started with the platform. In the next chapter, you will be using one of these examples to get yourself acquainted with the platform.

Console View

顾名思义, Console 视图在执行工作流时提供了各种控制台消息的视图。

As the name indicates, the Console view provides a view of the various console messages while executing your workflow.

console view

Console 视图有助于诊断工作流和检查分析结果。

The Console view is useful in diagnosing the workflow and examining the analytics results.

Description View

我们立即需要关心的最后一个重要视图是 Description 视图。此视图提供了工作空间中所选项目的描述。典型的视图如下图所示 −

The last important view that is of immediate relevance to us is the Description view. This view provides a description of a selected item in the workspace. A typical view is shown in the screenshot below −

description view

上图显示了 File Reader 节点的描述。当您选择工作空间中的 File Reader 节点时,您将在该视图中看到其描述。单击任何其他节点将显示所选节点的描述。因此,在学习的初始阶段,当您不确切了解工作空间中各个节点的目的和/或节点存储库时,此视图非常有用。

The above view shows the description of a File Reader node. When you select the File Reader node in your workspace, you will see its description in this view. Clicking on any other node shows the description of the selected node. Thus, this view becomes very useful in the initial stages of learning when you do not precisely know the purpose of the various nodes in the workspace and/or the nodes repository.

Toolbar

除了上述视图外,工作台还有其他视图,如工具栏。工具栏包含各种图标,可以快速执行操作。这些图标会根据上下文启用/禁用。您可以将鼠标悬停在图标上,以查看每个图标执行的操作。以下屏幕显示了 Configure 图标执行的操作。

Besides the above described views, the workbench has other views such as toolbar. The toolbar contains various icons that facilitate a quick action. The icons are enabled/disabled depending on the context. You can see the action that each icon performs by hovering mouse on it. The following screen shows the action taken by Configure icon.

toolbar

Enabling/Disabling Views

到目前为止,您看到的各种视图可以轻松打开/关闭。单击视图中的关闭图标,将 close 该视图。要恢复视图,请转到 View 菜单选项并选择所需视图。选定的视图将添加到工作台。

The various views that you have seen so far can be turned on/off easily. Clicking the Close icon in the view will close the view. To reinstate the view, go to the View menu option and select the desired view. The selected view will be added to the workbench.

enabling disabling views

现在,当您熟悉工作台后,我将向您展示如何运行工作流并研究它执行的分析。

Now, as you have been acquainted with the workbench, I will show you how to run a workflow and study the analytics performed by it.