# Step 3. Preprocess the dataset

## :gear: Cleaning data with the Data Processor

#### Having uploaded our iris dataset, next we will be able to clean it thanks to the SmartPredict *Data Processor* .

1. To access it, first , click on *“Applications”*  in the left pane's menu.&#x20;
2. Then click on *''Dataset Processing and Visualization".*

A new dashboard  expands. It is very similar to the first one (seen in the dataset application) except that this time, data are filtered here by date of creation and size.

&#x20;                                             &#x20;

![Dataset Processing and Visualization are located in the Application menu.](https://1833277725-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lyc1OXsKqB2S62LxsOR%2F-LyxYXVB_xZUn72wTD4e%2F-LyxZK6G4vIM05aywgoz%2FSmartPredict_Process%26Visu.gif?alt=media\&token=15d5746f-8692-4b84-b127-537180abeb59)

{% hint style="info" %}
From this new dashboard, we might also add new datasets by clicking on the round yellow + button as an alternative to uploading them directly from the dataset table.
{% endhint %}

![Uploading datasets from the Dataprocessor is possible.](https://1833277725-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lyc1OXsKqB2S62LxsOR%2F-LyxaQKXvzySOJQuHmL3%2F-LyxbSMPVzpTXJBfFU0-%2FSmartapp%20-%20Data%20processing_Processor.gif?alt=media\&token=1e501c75-8c82-443e-877c-00563a9ce639)

## :gear: Handling missing values

From wherever on the platform we may retrieve a dataset, clicking on the **processor' s cog** icon leads to the ‘**Dataset Processor’**’s console.

The *Dataset Processor* allows to  **sample, filter** and **download datasets**.

Flaws in ‘dirty dataset’ are highlighted, just like here where *missing items* are set in red.\
For dealing with these data impurities, we are able to choose the kind of processing we want  .&#x20;

As a strategy, dropping the rows is systematic here for rows *(*&#x61;nd columns) with missing values.                                                 To do so, we just need to specify it  in the processor type, then as a *"Strategy"* , choose *Drop.*

1. Click on the + button to add a processing step.
2. As we are asked to select a processor , scroll until '*Handle missing values*'.&#x20;
3. Click on it.

![The Dataset Processor handles missing values well.](https://1833277725-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lyc1OXsKqB2S62LxsOR%2F-LyxJOVbu1tpnNPNBLiQ%2F-LyxKa8-UB-AZQdrBU6F%2FSmartapp%20-%20Data%20processing_Missingvalues.gif?alt=media\&token=dde77339-8339-4fd8-89b2-6aaf886c559a)

{% hint style="info" %}
We can pursue with further data cleansing /processing by clicking once more on the + button.
{% endhint %}

:black\_joker: Let us also, for instance,  initiate the **sorting process** . We shall recapitulate the same steps as  in '*handling missing values*', except that for this time, we shall choose '*Sort*'  instead.

1. So, click on the + sign to *add processor step*&#x20;
2. Scroll until '*Sort*' and select it.   &#x20;
3. &#x20;In choosing column, select 'Variety' for it is the scrambled one.&#x20;
4. Validate.&#x20;

The table shows that the processor took into account the steps we wanted it to apply as the quality of our data has obviously increased.

![To pursue further cleansing, we can initiate a sorting process.](https://1833277725-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lyc1OXsKqB2S62LxsOR%2F-LyxLRQVQADBXF_3L6Zm%2F-LyxM3uv9kIWVqPuRB0s%2FSmartapp%20-%20Data%20processing_SortingProcess.gif?alt=media\&token=739224e1-c939-4516-8fdb-acd3ab76c8f4)

{% hint style="success" %}
Now that we have obtained a clean dataset, let us just keep in mind that our main aim is to produce a processing pipeline : this is our next step from here.
{% endhint %}

.

## :gear: The Processing pipeline

The ***processing pipeline*** ***pane*** appears on the right side of the Dataset processor . It can fold and unfold and contains its own set of functions.

#### :arrow\_up: Exporting  the processing pipeline into SmartPredict

Once we have finished the cleaning operation&#x73;**,** we are able to utilize the new dataset for our *Processing pipeline ,* the list of which is located on the right sidebar next to the Data Processor's dashboard .

1. Look for the exporting icon (3rd icon from the left ) on the menu below the right pane . The tooltip shows its label'' **Export processing pipeline to SmartPredict" .**
2. Click on it.&#x20;
3. Then, click on *"Export"*.

{% hint style="info" %}
We are allowed to choose which processing steps we want to include in a processing pipeline.                  If we do not want some steps to be included, we can intentionally delete them on their own after having ticked the check-box placed next to them .
{% endhint %}

![Processing pipeline can be exported through the export function.](https://1833277725-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lyc1OXsKqB2S62LxsOR%2F-LyyT_iRoKDi1TaNipuI%2F-LyyURLVEjeBYQUzvwE4%2FSmartapp%20-%20Data%20processing.gif?alt=media\&token=ff3a54fe-610c-4824-97f9-a9781f4eb1c2)

#### :bulb: Finding the processing pipeline in the right sidebar

Now let us get back to our **workspace,** enter through the flowchart icon on the left to switch to project view. From the right sidebar, as we click on the third button  named ‘*Processing pipelines*’,  we see the pipeline we have just configured before displaying there.&#x20;

{% hint style="danger" %}
We might need to note the name under which we exported the pipeline we want to use in the  build, to avoid ending up using another later as the number of builds grows.&#x20;
{% endhint %}

![The processing pipeline module.](https://lh5.googleusercontent.com/nh-aD31exDwmldjxSGTB-4lTcnBCIhguLvatv83Zw-S1jCB4UGDzVJaR879vtk44ehGZPepFpRHpiv7UYQfQn9vdaxDnE4_7wW6IQE7rhpGF-eTXMrTEIkFzUHlPPYdoHwjF8l_s0Zk)

Just like any other module, we can drag and drop it into the layout now, in order to attach it to the flowchart .

<br>
