Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob
Merge requests
!245
[docs] remove unused bits
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[docs] remove unused bits
sphinx-fix
into
master
Overview
0
Commits
1
Pipelines
1
Changes
3
Merged
Amir MOHAMMADI
requested to merge
sphinx-fix
into
master
5 years ago
Overview
0
Commits
1
Pipelines
1
Changes
3
Expand
Should fix the nightlies
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
662b9823
1 commit,
5 years ago
3 files
+
1
−
84
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
doc/plot/iris_lda.py deleted
100644 → 0
+
0
−
37
Options
#!/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
"
)
Loading