From 48baa7837b18aed0968e83432130d32a196e2922 Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Fri, 14 Feb 2020 14:27:05 +0100
Subject: [PATCH] Improve the LDA plot

---
 doc/example.rst          |  6 +++---
 doc/install.rst          |  4 ++--
 doc/plot/iris_lda_roc.py | 10 +++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/doc/example.rst b/doc/example.rst
index 9dfe886..4cbd3f2 100644
--- a/doc/example.rst
+++ b/doc/example.rst
@@ -46,7 +46,7 @@ linear discriminant model to distinguish the species from each other.
 
 
 Training a :py:class:`bob.learn.linear.Machine` with LDA
----------------------------------------------------------
+========================================================
 
 Creating a :py:class:`bob.learn.linear.Machine` to perform Linear Discriminant Analysis on the Iris dataset involves using the :py:class:`bob.learn.linear.FisherLDATrainer`:
 
@@ -72,7 +72,7 @@ A few things should be noted:
    For this example, we just discard this information.
 
 Looking at the first LDA component
-----------------------------------
+==================================
 
 To reproduce Fisher's results, we must pass the data through the created machine:
 
@@ -117,7 +117,7 @@ You should see an image like this:
 
 
 Measuring performance
----------------------
+=====================
 
 You can measure the performance of the system on classifying, say, *Iris Virginica* as compared to the other two variants.
 We can use the functions in :ref:`bob.measure <bob.measure>` for that purpose.
diff --git a/doc/install.rst b/doc/install.rst
index 653bc97..d60baf2 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -1,8 +1,8 @@
 .. _bob.install:
 
-***************************
+===========================
  Installation instructions
-***************************
+===========================
 
 By now you should know that Bob is made of several :ref:`bob.packages`. There is no single
 package that installs all Bob packages because that would just take too much space.
diff --git a/doc/plot/iris_lda_roc.py b/doc/plot/iris_lda_roc.py
index f5aecce..bd352e8 100644
--- a/doc/plot/iris_lda_roc.py
+++ b/doc/plot/iris_lda_roc.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Andre Anjos <andre.anjos@idiap.ch>
-# Sat 24 Mar 2012 18:51:21 CET 
+# Sat 24 Mar 2012 18:51:21 CET
 
 """Computes an ROC curve for the Iris Flower Recognition using Linear Discriminant Analysis and Bob.
 """
@@ -18,11 +18,12 @@ machine, eigen_values = trainer.train(data.values())
 
 # A simple way to forward the data
 output = {}
-for key in data.keys(): output[key] = machine(data[key])
+for key, value in data.items():
+    output[key] = machine(value)
 
 # Performance
-negatives = numpy.vstack([output['setosa'], output['versicolor']])[:,0]
-positives = output['virginica'][:,0]
+negatives = numpy.vstack([output["setosa"], output["versicolor"]])[:, 0]
+positives = output["virginica"][:, 0]
 
 # Plot ROC curve
 bob.measure.plot.roc(negatives, positives)
@@ -30,4 +31,3 @@ pyplot.xlabel("False Virginica Acceptance (%)")
 pyplot.ylabel("False Virginica Rejection (%)")
 pyplot.title("ROC Curve for Virginica Classification")
 pyplot.grid()
-pyplot.axis([0, 5, 0, 15]) #xmin, xmax, ymin, ymax
-- 
GitLab