Commit 662b9823 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[docs] remove unused bits

parent 93b2c43c
Pipeline #39050 passed with stage
in 109 minutes and 36 seconds
......@@ -19,14 +19,11 @@ extensions = [
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.graphviz',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.mathjax',
'matplotlib.sphinxext.plot_directive'
]
......@@ -52,16 +49,6 @@ if os.path.exists('nitpick-exceptions.txt'):
# Always includes todos
todo_include_todos = False
# Generates auto-summary automatically
autosummary_generate = False
# Create numbers on figures with captions
numfig = True
# If we are on OSX, the 'dvipng' path maybe different
dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng'
if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
......@@ -103,7 +90,7 @@ release = distribution.version
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['**/links.rst', '**/README.rst', '**/bob.db.atnt/doc/py_api', '**/plot.detection_identification_curve']
exclude_patterns = ['**/links.rst', '**/README.rst']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
......
#!/usr/bin/env python
# Andre Anjos <andre.anjos@idiap.ch>
# Sat 24 Mar 2012 18:51:21 CET
"""The Iris Flower Recognition using Linear Discriminant Analysis and Bob.
"""
import bob.db.iris
import bob.learn.linear
import bob.measure
import numpy
from matplotlib import pyplot
# Training is a 3-step thing
data = bob.db.iris.data()
trainer = bob.learn.linear.FisherLDATrainer()
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])
# Here starts the plotting
pyplot.hist(output['setosa'][:,0], bins=8,
color='green', label='Setosa', alpha=0.5)
pyplot.hist(output['versicolor'][:,0], bins=8,
color='blue', label='Versicolor', alpha=0.5)
pyplot.hist(output['virginica'][:,0], bins=8,
color='red', label='Virginica', alpha=0.5)
# This is just some decoration...
pyplot.legend()
pyplot.grid(True)
pyplot.axis([-3,+3,0,20])
pyplot.title("Iris Plants / 1st. LDA component")
pyplot.xlabel("LDA[0]")
pyplot.ylabel("Count")
#!/usr/bin/env python
# Andre Anjos <andre.anjos@idiap.ch>
# Sat 24 Mar 2012 18:51:21 CET
"""Computes an ROC curve for the Iris Flower Recognition using Linear Discriminant Analysis and Bob.
"""
import bob.db.iris
import bob.learn.linear
import bob.measure
import numpy
from matplotlib import pyplot
# Training is a 3-step thing
data = bob.db.iris.data()
trainer = bob.learn.linear.FisherLDATrainer()
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])
# Performance
negatives = numpy.vstack([output['setosa'], output['versicolor']])[:,0]
positives = output['virginica'][:,0]
# Plot ROC curve
bob.measure.plot.roc(negatives, positives)
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment