Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
a6c9767e
"vscode:/vscode.git/clone" did not exist on "0eb82968725e204e8f2706796de13a565f63bcd1"
Commit
a6c9767e
authored
Jul 08, 2013
by
Davis King
Browse files
Minor change to made code work in python 2.6
parent
225e1c5a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python_examples/svm_struct.py
python_examples/svm_struct.py
+1
-1
No files found.
python_examples/svm_struct.py
View file @
a6c9767e
...
@@ -44,7 +44,7 @@ def main():
...
@@ -44,7 +44,7 @@ def main():
# Note that the correct label is predicted for each sample.
# Note that the correct label is predicted for each sample.
print
weights
print
weights
for
i
in
range
(
len
(
samples
)):
for
i
in
range
(
len
(
samples
)):
print
"predicted label for sample[{}]: {}"
.
format
(
i
,
predict_label
(
weights
,
samples
[
i
]))
print
"predicted label for sample[{
0
}]: {
1
}"
.
format
(
i
,
predict_label
(
weights
,
samples
[
i
]))
def
predict_label
(
weights
,
sample
):
def
predict_label
(
weights
,
sample
):
"""Given the 9-dimensional weight vector which defines a 3 class classifier, predict the
"""Given the 9-dimensional weight vector which defines a 3 class classifier, predict the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment