This is the cl-libsvm-format Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:07:01 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-libsvm-format
A fast LibSVM data format reader for Common Lisp
Satoshi Imai
MIT
* Cl-Libsvm-Format
[[http://quickdocs.org/cl-libsvm-format/][http://quickdocs.org/badge/cl-libsvm-format.svg]]
[[https://travis-ci.org/masatoi/cl-libsvm-format][https://travis-ci.org/masatoi/cl-libsvm-format.svg?branch=master]]
A fast LibSVM data format reader for Common Lisp.
** Installation
#+BEGIN_SRC
ros install masatoi/cl-libsvm-format
#+END_SRC
** Usage
SVMFORMAT:PARSE-FILE returns the dataset list and the estimated number of dimensions of the data.
One datum is a list in which the first element is a class label or a target of regression, and the rest are alternate with the index and its value.
#+BEGIN_SRC lisp
(ql:quickload :cl-libsvm-format)
(multiple-value-bind (dataset dim)
(svmformat:parse-file "/home/wiz/datasets/mnist.scale")
(defparameter mnist-dataset dataset)
(defparameter mnist-dimension dim))
;;; First datum
(car mnist-dataset)
;; (5 153 0.0117647005 154 0.0705882 155 0.0705882 156 0.0705882 157 0.494118 158
;; 0.533333 159 0.686275 160 0.101961 161 0.65098 162 1.0 163 0.968627 164
;; 0.498039 177 0.117647 178 0.141176 179 0.368627 180 0.603922 181 0.666667 182
;; 0.992157 183 0.992157 184 0.992157 185 0.992157 186 0.992157 187 0.882353 188
;; 0.67451 189 0.992157 190 0.94901997 191 0.764706 192 0.25098 204 0.192157 205
;; 0.933333 206 0.992157 207 0.992157 208 0.992157 209 0.992157 210 0.992157 211
;; 0.992157 212 0.992157 213 0.992157 214 0.984314 215 0.364706 216 0.321569 217
;; 0.321569 218 0.219608 219 0.152941 232 0.0705882 233 0.858824 234 0.992157 235
;; 0.992157 236 0.992157 237 0.992157 238 0.992157 239 0.776471 240 0.713725 241
;; 0.968627 242 0.945098 261 0.313725 262 0.611765 263 0.419608 264 0.992157 265
;; 0.992157 266 0.803922 267 0.0431373 269 0.168627 270 0.603922 290 0.054902 291
;; 0.00392157 292 0.603922 293 0.992157 294 0.352941 320 0.545098 321 0.992157
;; 322 0.745098 323 0.00784314 348 0.0431373 349 0.745098 350 0.992157 351
;; 0.27451 377 0.137255 378 0.945098 379 0.882353 380 0.627451 381 0.423529 382
;; 0.00392157 406 0.317647 407 0.941176 408 0.992157 409 0.992157 410 0.466667
;; 411 0.0980392 435 0.176471 436 0.729412 437 0.992157 438 0.992157 439 0.588235
;; 440 0.105882 464 0.0627451 465 0.364706 466 0.988235 467 0.992157 468 0.733333
;; 494 0.976471 495 0.992157 496 0.976471 497 0.25098 519 0.180392 520 0.509804
;; 521 0.717647 522 0.992157 523 0.992157 524 0.811765 525 0.00784314 545
;; 0.152941 546 0.580392 547 0.898039 548 0.992157 549 0.992157 550 0.992157 551
;; 0.980392 552 0.713725 571 0.094117604 572 0.447059 573 0.866667 574 0.992157
;; 575 0.992157 576 0.992157 577 0.992157 578 0.788235 579 0.305882 597 0.0901961
;; 598 0.258824 599 0.835294 600 0.992157 601 0.992157 602 0.992157 603 0.992157
;; 604 0.776471 605 0.317647 606 0.00784314 623 0.0705882 624 0.670588 625
;; 0.858824 626 0.992157 627 0.992157 628 0.992157 629 0.992157 630 0.764706 631
;; 0.313725 632 0.0352941 649 0.215686 650 0.67451 651 0.886275 652 0.992157 653
;; 0.992157 654 0.992157 655 0.992157 656 0.956863 657 0.521569 658 0.0431373 677
;; 0.533333 678 0.992157 679 0.992157 680 0.992157 681 0.831373 682 0.529412 683
;; 0.517647 684 0.0627451)
;;; Number of features
mnist-dimension ; => 780
#+END_SRC
** Author
Satoshi Imai (satoshi.imai@gmail.com)
** Licence
This software is released under the MIT License, see LICENSE.txt.
0.1.0
alexandria
(system).
src
(module).
Modules are listed depth-first from the system components tree.
cl-libsvm-format/src
cl-libsvm-format
(system).
parse-float.lisp
(file).
cl-libsvm-format.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-libsvm-format/cl-libsvm-format.asd
cl-libsvm-format/src/parse-float.lisp
cl-libsvm-format/src/cl-libsvm-format.lisp
cl-libsvm-format/cl-libsvm-format.asd
cl-libsvm-format
(system).
cl-libsvm-format/src/parse-float.lisp
src
(module).
parse-float
(function).
+whitespace-characters+
(constant).
bounding-index
(type).
parse-integer-only
(function).
sign-char-p
(function).
string-index
(type).
valid-radix
(type).
whitespace-char-p
(function).
cl-libsvm-format/src/cl-libsvm-format.lisp
parse-float.lisp
(file).
src
(module).
parse-file
(function).
parse-stream
(function).
%make-state
(function).
*optimize-settings*
(special variable).
cell-finish
(function).
cell-input
(function).
copy-state
(function).
defn
(macro).
finish
(function).
first-label-integer-p
(function).
make-state
(function).
parse
(function).
print-state1
(function).
print-state2
(function).
print-state3
(function).
row-finish
(function).
state
(structure).
state-buffer
(reader).
(setf state-buffer)
(writer).
state-field
(reader).
(setf state-field)
(writer).
state-label-type
(reader).
(setf state-label-type)
(writer).
state-max-dim
(reader).
(setf state-max-dim)
(writer).
state-offset
(reader).
(setf state-offset)
(writer).
state-p
(function).
state-result
(reader).
(setf state-result)
(writer).
state-result-ptr
(reader).
(setf state-result-ptr)
(writer).
state-row
(reader).
(setf state-row)
(writer).
state-row-ptr
(reader).
(setf state-row-ptr)
(writer).
state-space-count
(reader).
(setf state-space-count)
(writer).
state-tag
(reader).
(setf state-tag)
(writer).
tlet
(macro).
Packages are listed by definition order.
svmformat.parse-float
alexandria
.
common-lisp
.
parse-float
(function).
+whitespace-characters+
(constant).
bounding-index
(type).
parse-integer-only
(function).
sign-char-p
(function).
string-index
(type).
valid-radix
(type).
whitespace-char-p
(function).
cl-libsvm-format
svmformat
common-lisp
.
svmformat.parse-float
.
parse-file
(function).
parse-stream
(function).
%make-state
(function).
*optimize-settings*
(special variable).
cell-finish
(function).
cell-input
(function).
copy-state
(function).
defn
(macro).
finish
(function).
first-label-integer-p
(function).
make-state
(function).
parse
(function).
print-state1
(function).
print-state2
(function).
print-state3
(function).
row-finish
(function).
state
(structure).
state-buffer
(reader).
(setf state-buffer)
(writer).
state-field
(reader).
(setf state-field)
(writer).
state-label-type
(reader).
(setf state-label-type)
(writer).
state-max-dim
(reader).
(setf state-max-dim)
(writer).
state-offset
(reader).
(setf state-offset)
(writer).
state-p
(function).
state-result
(reader).
(setf state-result)
(writer).
state-result-ptr
(reader).
(setf state-result-ptr)
(writer).
state-row
(reader).
(setf state-row)
(writer).
state-row-ptr
(reader).
(setf state-row-ptr)
(writer).
state-space-count
(reader).
(setf state-space-count)
(writer).
state-tag
(reader).
(setf state-tag)
(writer).
tlet
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Similar to PARSE-INTEGER, but parses a floating point value and returns the value as the specified TYPE (by default *READ-DEFAULT-FLOAT-FORMAT*). The DECIMAL-CHARACTER (by default #.) specifies the separator between the integer and decimal parts, and the EXPONENT-CHARACTER (by default #e, case insensitive) specifies the character before the exponent. Note that the exponent is only parsed if RADIX is 10.
Parse an integer from a string, without skipping whitespaces. Returns three values: the integer, the position in the string that ended the parsing, and a boolean which is T if the parsing ended due to a whitespace or end of the string, and NIL otherwise. If allow-sign is NIL (T by default), also signs are not allowed in the string (i.e. cannot start with #+ or #-).
Predicate for testing if CHARACTER is a sign character (i.e. #+ or #-).
row
.
tag
.
Predicate for testing if CHARACTER is a whitespace character.
structure-object
.
(simple-array character)
""
(simple-array character)
""
fixnum
0
fixnum
0
keyword
:start
fixnum
0
Jump to: | %
(
C D F M P R S T W |
---|
Jump to: | %
(
C D F M P R S T W |
---|
Jump to: | *
+
B C F L M O R S T |
---|
Jump to: | *
+
B C F L M O R S T |
---|
Jump to: | B C F M P S T V |
---|
Jump to: | B C F M P S T V |
---|