First let us visualize the iris dataset
1. drag and drop file widget from data palette
2. add scatter plot from data visualisation palette
3. double click file and load the iris data set.
Iris data set can be downloaded from http://orange.biolab.si/datasets.psp
4. Double click scatter plot and see the data visualization by changing the x and y parameters.
How to Change point shape?
under additional point properties, change the point shape attribute to iris
can I save the plot?
You can save the plot by using save graph. plots can be saved as a picture and matplotlib script.
Building the classification model
From the below plot, it seems easy to separate iris-setosa from other two iris species
We can write a simple logic of if petal length is less than 2.0 cm then it is iris-setosa else other two species.
How to classify based on the petal length?
1. add interactive tree builder from classify palette and rename as Iris setosa classifier
2. Double click interactive tree builder. set split selection to petal length, cut off point to 2.0 and click split. see the report.
We have successfully classified iris-setosa.
How to classify other two species?
We will separate iris-setosa from the data first. and will plot only the Iris-verginica and Iris-versicolor
identifying threshold to separate these two species is not easy as iris-setosa. we have to find a best method.
I found one simple inbuilt method to identify best threshold for the separation of these two species. I am not sure this will work for all the data.
separate Iris-setosa
1. Add select data widget from data palette
2. Double click the select data widget, select iris under attribute, equals under operator, Iris-setosa under value and check negate
3. click add button
inbuilt method to find best threshold
1. double click scatter plot(1)
2. click Vizrank under optimisation dialogs
3. Click start evaluating projections button in Vizrank Dialog
4. Click Locally optimise best projections button. (see the plots when you do this action)
5. see the results, in petal width and petal length combination best projection is achieved.
6. best projection is achieved with the default settings.
7. Now by applying the threshold of 1.65, we can separate Iris-virginica from Iris-Versicolor
8. add interactive tree builder and set petal width and cutoff as 1.65
Our Final Code
If you any problem in understanding feel free to call me.
No comments:
Post a Comment