Wolfram.com
WolframAlpha.com
WolframCloud.com
Wolfram Language
Example Repository
Ready-to-use examples for the Wolfram Language
Primary Navigation
Categories
Astronomy
Audio Processing
Calculus
Cellular Automata
Chemistry
Complex Systems
Computer Science
Computer Vision
Control Systems
Creative Arts
Data Science
Engineering
Finance & Economics
Finite Element Method
Food & Nutrition
Geography
Geometry
Graphs & Networks
Image Processing
Life Sciences
Machine Learning
Mathematics
Optimization
Physics
Puzzles and Recreation
Quantum Computation
Signal Processing
Social Sciences
System Modeling
Text & Language Processing
Time-Related Computation
Video Processing
Visualization & Graphics
Alphabetical List
Submit a New Resource
Learn More about
Wolfram Language
Related Pages
Related Symbols
Classify
ClassifierMeasurements
ComputeUncertainty
Information
RandomSample
ExampleData
Related Categories
Machine Learning
Train a Classifier on the UCILetter Dataset
Example Notebook
Open in Cloud
Download Notebook
Get the
"
U
C
I
L
e
t
t
e
r
"
data:
I
n
[
1
]
:
=
d
a
t
a
=
E
x
a
m
p
l
e
D
a
t
a
[
{
"
M
a
c
h
i
n
e
L
e
a
r
n
i
n
g
"
,
"
U
C
I
L
e
t
t
e
r
"
}
,
"
T
r
a
i
n
i
n
g
D
a
t
a
"
]
;
Examine a sample of the data:
I
n
[
2
]
:
=
R
a
n
d
o
m
S
a
m
p
l
e
[
d
a
t
a
,
5
]
O
u
t
[
2
]
=
{
{
2
,
2
,
2
,
3
,
2
,
7
,
8
,
5
,
9
,
6
,
6
,
9
,
1
,
9
,
7
,
8
}
Z
,
{
3
,
4
,
5
,
2
,
2
,
7
,
8
,
1
,
8
,
1
0
,
7
,
8
,
2
,
8
,
3
,
7
}
X
,
{
2
,
5
,
4
,
3
,
1
,
9
,
6
,
3
,
6
,
1
4
,
5
,
1
0
,
1
,
6
,
1
,
7
}
J
,
{
4
,
8
,
6
,
6
,
5
,
6
,
8
,
7
,
7
,
8
,
7
,
8
,
3
,
1
0
,
6
,
9
}
T
,
{
3
,
7
,
5
,
5
,
3
,
1
1
,
2
,
2
,
2
,
8
,
3
,
9
,
3
,
5
,
3
,
8
}
A
}
Apply
C
l
a
s
s
i
f
y
on the data to create a ClassifierFunction:
I
n
[
3
]
:
=
c
=
C
l
a
s
s
i
f
y
[
d
a
t
a
]
O
u
t
[
3
]
=
C
l
a
s
s
i
f
i
e
r
F
u
n
c
t
i
o
n
I
n
p
u
t
t
y
p
e
:
M
i
x
e
d
(
n
u
m
b
e
r
:
1
6
)
N
u
m
b
e
r
o
f
c
l
a
s
s
e
s
:
2
6
D
a
t
a
n
o
t
i
n
n
o
t
e
b
o
o
k
.
S
t
o
r
e
n
o
w
Use the classifier on a new example:
I
n
[
4
]
:
=
c
[
{
4
,
1
0
,
6
,
7
,
9
,
9
,
6
,
4
,
3
,
6
,
7
,
7
,
9
,
8
,
5
,
6
}
,
"
T
o
p
P
r
o
b
a
b
i
l
i
t
i
e
s
"
]
O
u
t
[
4
]
=
{
U
0
.
7
3
0
9
3
7
,
H
0
.
1
8
5
1
3
1
}
Obtain general information about the classifier and the training procedure:
I
n
[
5
]
:
=
I
n
f
o
r
m
a
t
i
o
n
[
c
]
O
u
t
[
5
]
=
Get specific information on method options:
I
n
[
6
]
:
=
I
n
f
o
r
m
a
t
i
o
n
[
c
,
"
M
e
t
h
o
d
O
p
t
i
o
n
"
]
O
u
t
[
6
]
=
M
e
t
h
o
d
{
N
e
a
r
e
s
t
N
e
i
g
h
b
o
r
s
,
N
e
i
g
h
b
o
r
s
N
u
m
b
e
r
5
,
D
i
s
t
r
i
b
u
t
i
o
n
S
m
o
o
t
h
i
n
g
0
.
5
,
N
e
a
r
e
s
t
M
e
t
h
o
d
S
c
a
n
}
Visualize the learning curve of each method used by the automatic training procedure:
I
n
[
7
]
:
=
I
n
f
o
r
m
a
t
i
o
n
[
c
,
"
L
e
a
r
n
i
n
g
C
u
r
v
e
"
]
O
u
t
[
7
]
=
Obtain the accuracy estimated by the training procedure:
I
n
[
8
]
:
=
I
n
f
o
r
m
a
t
i
o
n
[
c
,
"
A
c
c
u
r
a
c
y
"
]
O
u
t
[
8
]
=
0
.
9
4
9
±
0
.
0
1
1
Get the test data portion of the
"
U
C
I
L
e
t
t
e
r
"
dataset:
I
n
[
9
]
:
=
t
e
s
t
=
E
x
a
m
p
l
e
D
a
t
a
[
{
"
M
a
c
h
i
n
e
L
e
a
r
n
i
n
g
"
,
"
U
C
I
L
e
t
t
e
r
"
}
,
"
T
e
s
t
D
a
t
a
"
]
;
Compare with the accuracy measured on a test set:
I
n
[
1
0
]
:
=
C
l
a
s
s
i
f
i
e
r
M
e
a
s
u
r
e
m
e
n
t
s
[
c
,
t
e
s
t
,
"
A
c
c
u
r
a
c
y
"
,
C
o
m
p
u
t
e
U
n
c
e
r
t
a
i
n
t
y
T
r
u
e
]
O
u
t
[
1
0
]
=
0
.
9
4
7
±
0
.
0
0
4
Retrain the classifier while specifying a training time of 2 minutes:
I
n
[
1
1
]
:
=
c
l
o
n
g
=
C
l
a
s
s
i
f
y
[
d
a
t
a
,
T
i
m
e
G
o
a
l
2
m
i
n
]
O
u
t
[
1
1
]
=
C
l
a
s
s
i
f
i
e
r
F
u
n
c
t
i
o
n
I
n
p
u
t
t
y
p
e
:
M
i
x
e
d
(
n
u
m
b
e
r
:
1
6
)
N
u
m
b
e
r
o
f
c
l
a
s
s
e
s
:
2
6
D
a
t
a
n
o
t
i
n
n
o
t
e
b
o
o
k
.
S
t
o
r
e
n
o
w
Compare the learning curves with previous ones:
I
n
[
1
2
]
:
=
I
n
f
o
r
m
a
t
i
o
n
[
c
l
o
n
g
,
"
L
e
a
r
n
i
n
g
C
u
r
v
e
"
]
O
u
t
[
1
2
]
=
Related Symbols
Classify
ClassifierMeasurements
ComputeUncertainty
Information
RandomSample
ExampleData
Publisher Information
Contributed by:
Wolfram Staff