CLML Common Lisp Machine Learning
Table of Contents
- 1. Overview
- 2. Installation
- 3. Loading/Using the library
- 4. Machine-Learning Packages
- 5. Package:
blas
- 6. Package:
blas-complex-system
- 7. Package:
blas-hompack-system
- 8. Package:
blas-real-system
- 9. Package:
clml.association-rule
- 10. Package:
clml.classifiers.linear-regression
- 11. Package:
clml.classifiers.logistic-regression
- 12. Package:
clml.classifiers.nbayes
- 13. Package:
clml.clustering.cluster-validation
- 14. Package:
clml.clustering.hc
- 15. Package:
clml.clustering.k-means2
- 16. Package:
clml.clustering.nmf
- 17. Package:
clml.clustering.optics
- 18. Package:
clml.clustering.optics-speed
- 19. Package:
clml.clustering.spectral-clustering
- 20. Package:
clml.decision-tree.decision-tree
- 21. Package:
clml.decision-tree.random-forest
- 22. Package:
clml.docs
- 23. Package:
clml.graph.graph-anomaly-detection
- 24. Package:
clml.graph.graph-centrality
- 25. Package:
clml.graph.graph-utils
- 26. Package:
clml.graph.read-graph
- 27. Package:
clml.graph.shortest-path
- 28. Package:
clml.nearest-search.k-nn
- 29. Package:
clml.nearest-search.k-nn-new
- 30. Package:
clml.nearest-search.nearest
- 31. Package:
clml.nonparameteric.statistics
- 32. Package:
clml.nonparametric.dpm
- 33. Package:
clml.nonparametric.ftm
- 34. Package:
clml.nonparametric.hdp
- 35. Package:
clml.nonparametric.hdp-lda
- 36. Package:
clml.nonparametric.lfm
- 37. Package:
clml.numeric.fast-fourier-transform
- 38. Package:
clml.pca
- 39. Package:
clml.som
- 40. Package:
clml.statistics
- 41. Package:
clml.statistics.rand
- 42. Package:
clml.svm.mu
- 43. Package:
clml.svm.one-class
- 44. Package:
clml.svm.pwss3
- 45. Package:
clml.svm.smo
- 46. Package:
clml.svm.svr
- 47. Package:
clml.svm.wss3
- 48. Package:
clml.test
- 49. Package:
clml.text.utilities
- 50. Package:
clml.time-series.anomaly-detection
- 51. Package:
clml.time-series.autoregression
- 52. Package:
clml.time-series.burst-detection
- 53. Package:
clml.time-series.changefinder
- 54. Package:
clml.time-series.exponential-smoothing
- 55. Package:
clml.time-series.read-data
- 56. Package:
clml.time-series.state-space
- 57. Package:
clml.time-series.statistics
- 58. Package:
clml.time-series.util
- 59. Package:
clml.utility.csv
- 60. Package:
clml.utility.data
- 61. Package:
clml.utility.priority-que
- 62. Package:
fork-future
- 63. Package:
future
- 64. Package:
hjs.learn.k-means
- 65. Package:
hjs.learn.read-data
- 66. Package:
hjs.learn.vars
- 67. Package:
hjs.util.eigensystems
- 68. Package:
hjs.util.matrix
- 69. Package:
hjs.util.meta
- 70. Package:
hjs.util.missing-value
- 71. Package:
hjs.util.vector
- 72. Package:
lapack
- 73. Licensing
- 74. Supported CL implementations
1 Overview
The CLML Machine-Learning is a high performance and large scale statistical machine learning package written in Common Lisp developed by MSI.
2 Installation
2.1 Requirements
- Language: SBCL, Clozure Common Lisp, Allegro or Lispworks
- Platform: Posix compatibile platforms (Windows, Linux, BSD and derivatives)
- Optionally Intel Math Kernel Library
- ASDF3 and optionally Quicklisp (This document assumes Quicklisp)
Currently development is taking place mostly on SBCL. For the near future SBCL is most stable platform.
2.2 Installation Notes
2.2.1 Obtaining code
Code can be obtained by one of the following methods:
- Clone this repository with:
git clone https://github.com/mmaul/clml.git
Or download zip archive at
https://github.com/mmaul/clml/archive/master.zip
2.2.2 Installing
2.2.2.1 For Quicklisp **
- Place code in
~/quicklisp/local-projects
- Start LISP and enter
(ql:quickload :clml)
2.2.2.2 For ASDF3 only (Non quicklisp users)
- Place in a location on your ASDF search path path such as
~/common-lisp
- Start LISP and enter
(asdf:load-system :clml)
3 Loading/Using the library
3.1 Sample Data
The sample datasets are located outside the CLML repository.
Fortunately CLML is able to download sample datasets from remote sites
via HTTP and HTTPS via the clml.utility.data:fetch
function. Shown
below is an example:
(clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/datafile.csv")
The clml.utility.data:fetch
function downloads the file to a cache
location and returns the path to the downloaded file. Therefore
anywhere a path to a file is required the output from
clml.utility.data:fetch
can be provided instead.
The contents of the Sample dataset repository can be found at:
3.2 Usage
This library is organized as a hierarchical tree of systems.
- clml
- clml.association-rule
- clml.association-rule
- clml.classifiers
- clml.classifiers.linear-regression
- clml.classifiers.logistic-regression
- clml.classifiers.nbayes
- clml-clml.statistics
- clml-clml.statistics
- clml.clustering
- clml.clustering.cluster-validation
- clml.clustering.hc
- clml.clustering.k-means2
- clml.clustering.nmf
- clml.clustering.optics
- clml.clustering.optics-speed
- clml.clustering.spectral-clustering
- clml.decision-tree
- clml.decision-tree.decision-tree
- clml-decision-tree.random-forest
- clml.graph
- clml.graph.graph-anomaly-detection
- clml.graph.graph-centrality
- clml.graph.graph-utils
- clml.graph.read-graph
- clml.graph.shortest-path
- clml.nearest-search
- clml.nearest-search.k-nn
- clml.nearest-search.k-nn-new
- clml.nearest-search.nearest
- clml.nonparameteric
- clml.nonparameteric.statistics
- clml.nonparametric.blocked-hdp-hmm
- clml.nonparametric.dpm
- clml.nonparametric.ftm
- clml.nonparametric.hdp
- clml.nonparametric.hdp-hmm
- clml.nonparametric.hdp-hmm
- clml.nonparametric.hdp-lda
- clml.nonparametric.ihmm
- clml.nonparametric.lfm
- clml.nonparametric.sticky-hdp-hmm
- clml.numeric.fast-fourier-transform
- clml.pca
- clml.pca
- clml.som
- clml.som
- clml.statistics
- clml.statistics
- clml.statistics.rand
- clml.svm
- clml.svm.mu
- clml.svm.one-class
- clml.svm.pwss3
- clml.svm.smo
- clml.svm.svr
- clml.svm.wss3
- clml.time-series
- clml.time-series.anomaly-detection
- clml.time-series.autoregression
- clml.time-series.burst-detection
- clml.time-series.changefinder
- clml.time-series.exponential-smoothing
- clml.time-series.read-data
- clml.time-series.state-space
- clml.time-series.statistics
- clml.time-series.util
- clml.utility
- clml.utility.csv
- clml.utility.priority-que
- fork-future
- future
- hjs
- hjs.learn.k-means
- hjs.learn.read-data
- hjs.learn.vars
- hjs.util.eigensystems
- hjs.util.matrix
- hjs.util.meta
- hjs.util.missing-value
- hjs.util.vector
- lapack
Each system can be loaded independantly or the the clml system can be loaded which contains dependencies to all child system definitions.
This library requires that default reader float for mat is set to double-float. This should be done before loading the systems.
(setf *read-default-float-format* 'double-float)
- Example below is using CLML.EXTRAS
Here is a quick demonstration:
CL-USER (ql:quickload :clml) CL-USER (clml.text.utilities:calculate-levenshtein-similarity "Howdy" "doody") 0.6 CL-USER CL-USER (setf *syobu* (hjs.learn.read-data:read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/syobu.csv") :type :csv :csv-type-spec '(string integer integer integer integer))) #<HJS.LEARN.READ-DATA:UNSPECIALIZED-DATASET > DIMENSIONS: 種類 | がく長 | がく幅 | 花びら長 | 花びら幅 TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 5 DATA POINTS: 150 POINTS CL-USER (setf *tree* (clml.decision-tree.decision-tree:make-decision-tree *syobu* "種類")) (((("花びら長" . 30) (("花びら幅" . 18) ("花びら幅" . 23) ("花びら幅" . 20) ("花びら幅" . 19) ("花びら幅" . 25) ("花びら幅" . 24) ("花びら幅" . 21) ("花びら幅" . 14) ("花びら幅" . 15) ("花びら幅" . 22) ("花びら幅" . 16) ("花びら幅" . 17) ("花びら幅" . 13) ("花びら幅" . 11) ("花びら幅" . 12) ... (("Virginica" . 50) ("Versicolor" . 50) ("Setosa" . 50)) ((149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 ... (((("花びら幅" . 18) (("花びら幅" . 23) ("花びら幅" . 20) ("花びら幅" . 19) ("花びら幅" . 25) ("花びら幅" . 24) ("花びら幅" . 21) ("花びら幅" . 14) ("花びら幅" . 15) ("花びら幅" . 22) ("花びら幅" . 16) ("花びら幅" . 17) ("花びら幅" . 13) ("花びら幅" . 11) ("花びら幅" . 12) ("花びら幅" . 10) ... ))) CL-USER CL-USER (clml.decision-tree.decision-tree:print-decision-tree *tree*) [30 <= 花びら長?]((Virginica . 50) (Versicolor . 50) (Setosa . 50)) Yes->[18 <= 花びら幅?]((Versicolor . 50) (Virginica . 50)) Yes->[49 <= 花びら長?]((Virginica . 45) (Versicolor . 1)) Yes->((Virginica . 43)) No->[60 <= がく長?]((Versicolor . 1) (Virginica . 2)) Yes->((Virginica . 2)) No->((Versicolor . 1)) No->[50 <= 花びら長?]((Virginica . 5) (Versicolor . 49)) Yes->[16 <= 花びら幅?]((Versicolor . 2) (Virginica . 4)) Yes->[70 <= がく長?]((Virginica . 1) (Versicolor . 2)) Yes->((Virginica . 1)) No->((Versicolor . 2)) No->((Virginica . 3)) No->[17 <= 花びら幅?]((Versicolor . 47) (Virginica . 1)) Yes->((Virginica . 1)) No->((Versicolor . 47)) No->((Setosa . 50))
4 Machine-Learning Packages
The CLML package hierarchy is to two groups primary and supporting. The primary group contains the CLML functionality. The secondary group supports the CLML library. The primary group consists of top level package hierarchies:
- CLML
- HJS
The HJS package hierarchy contains for the most part utilities and base functionality such as dataset access, matrix and vector manipulation, missing value handling, and sum algorithimic support for k-means and eigensystems. The CLML package hierarchy contains the high level functionality.
The secondary package hierarchies consist of
- blas
- lapack
- future [Located in addons]
- fork-future [Located in addons]
- blas-ffi (Intel MKL blas interface) [Located in addons]
- lapack-ffi (Intel MKL blas interface) [Located in addons]
For Intel MKL enablement BLASFFI and LAPACK-FFI must be loaded before loading CLML
At this time not all packages contain detailed documentation please refer to the source and tests contained in the CLML.EXTRAS system.
5 Package: blas
- Uses: common-lisp
- Used by: clml.clustering.nmf, hjs.util.eigensystems, hjs.util.matrix, lapack
5.1 Description
5.2 External Symbols
5.2.1 External Functions
5.2.1.1 Function: dasum
5.2.1.1.1 Syntax
(dasum n dx incx)
5.2.1.1.2 Description
5.2.1.2 Function: daxpy
5.2.1.2.1 Syntax
(daxpy n da dx incx dy incy)
5.2.1.2.2 Description
5.2.1.3 Function: dcabs1
5.2.1.3.1 Syntax
(dcabs1 z)
5.2.1.3.2 Description
5.2.1.4 Function: dcopy
5.2.1.4.1 Syntax
(dcopy n dx incx dy incy)
5.2.1.4.2 Description
5.2.1.5 Function: ddot
5.2.1.5.1 Syntax
(ddot n dx incx dy incy)
5.2.1.5.2 Description
5.2.1.6 Function: dgbmv
5.2.1.6.1 Syntax
(dgbmv trans m n kl ku alpha a lda x incx beta y incy)
5.2.1.6.2 Description
5.2.1.7 Function: dgemm
5.2.1.7.1 Syntax
(dgemm transa transb m n k alpha a lda b ldb$ beta c ldc)
5.2.1.7.2 Description
5.2.1.8 Function: dgemv
5.2.1.8.1 Syntax
(dgemv trans m n alpha a lda x incx beta y incy)
5.2.1.8.2 Description
5.2.1.9 Function: dger
5.2.1.9.1 Syntax
(dger m n alpha x incx y incy a lda)
5.2.1.9.2 Description
5.2.1.10 Function: dnrm2
5.2.1.10.1 Syntax
(dnrm2 n x incx)
5.2.1.10.2 Description
5.2.1.11 Function: drot
5.2.1.11.1 Syntax
(drot n dx incx dy incy c s)
5.2.1.11.2 Description
5.2.1.12 Function: drotg
5.2.1.12.1 Syntax
(drotg da db c s)
5.2.1.12.2 Description
5.2.1.13 Function: dsbmv
5.2.1.13.1 Syntax
(dsbmv uplo n k alpha a lda x incx beta y incy)
5.2.1.13.2 Description
5.2.1.14 Function: dscal
5.2.1.14.1 Syntax
(dscal n da dx incx)
5.2.1.14.2 Description
5.2.1.15 Function: dspmv
5.2.1.15.1 Syntax
(dspmv uplo n alpha ap x incx beta y incy)
5.2.1.15.2 Description
5.2.1.16 Function: dspr
5.2.1.16.1 Syntax
(dspr uplo n alpha x incx ap)
5.2.1.16.2 Description
5.2.1.17 Function: dspr2
5.2.1.17.1 Syntax
(dspr2 uplo n alpha x incx y incy ap)
5.2.1.17.2 Description
5.2.1.18 Function: dswap
5.2.1.18.1 Syntax
(dswap n dx incx dy incy)
5.2.1.18.2 Description
5.2.1.19 Function: dsymm
5.2.1.19.1 Syntax
(dsymm side uplo m n alpha a lda b ldb$ beta c ldc)
5.2.1.19.2 Description
5.2.1.20 Function: dsymv
5.2.1.20.1 Syntax
(dsymv uplo n alpha a lda x incx beta y incy)
5.2.1.20.2 Description
5.2.1.21 Function: dsyr
5.2.1.21.1 Syntax
(dsyr uplo n alpha x incx a lda)
5.2.1.21.2 Description
5.2.1.22 Function: dsyr2
5.2.1.22.1 Syntax
(dsyr2 uplo n alpha x incx y incy a lda)
5.2.1.22.2 Description
5.2.1.23 Function: dsyr2k
5.2.1.23.1 Syntax
(dsyr2k uplo trans n k alpha a lda b ldb$ beta c ldc)
5.2.1.23.2 Description
5.2.1.24 Function: dsyrk
5.2.1.24.1 Syntax
(dsyrk uplo trans n k alpha a lda beta c ldc)
5.2.1.24.2 Description
5.2.1.25 Function: dtbmv
5.2.1.25.1 Syntax
(dtbmv uplo trans diag n k a lda x incx)
5.2.1.25.2 Description
5.2.1.26 Function: dtbsv
5.2.1.26.1 Syntax
(dtbsv uplo trans diag n k a lda x incx)
5.2.1.26.2 Description
5.2.1.27 Function: dtpmv
5.2.1.27.1 Syntax
(dtpmv uplo trans diag n ap x incx)
5.2.1.27.2 Description
5.2.1.28 Function: dtpsv
5.2.1.28.1 Syntax
(dtpsv uplo trans diag n ap x incx)
5.2.1.28.2 Description
5.2.1.29 Function: dtrmm
5.2.1.29.1 Syntax
(dtrmm side uplo transa diag m n alpha a lda b ldb$)
5.2.1.29.2 Description
5.2.1.30 Function: dtrmv
5.2.1.30.1 Syntax
(dtrmv uplo trans diag n a lda x incx)
5.2.1.30.2 Description
5.2.1.31 Function: dtrsm
5.2.1.31.1 Syntax
(dtrsm side uplo transa diag m n alpha a lda b ldb$)
5.2.1.31.2 Description
5.2.1.32 Function: dtrsv
5.2.1.32.1 Syntax
(dtrsv uplo trans diag n a lda x incx)
5.2.1.32.2 Description
5.2.1.33 Function: dzasum
5.2.1.33.1 Syntax
(dzasum n zx incx)
5.2.1.33.2 Description
5.2.1.34 Function: dznrm2
5.2.1.34.1 Syntax
(dznrm2 n x incx)
5.2.1.34.2 Description
5.2.1.35 Function: icamax
5.2.1.35.1 Syntax
(icamax n cx incx)
5.2.1.35.2 Description
5.2.1.36 Function: idamax
5.2.1.36.1 Syntax
(idamax n dx incx)
5.2.1.36.2 Description
5.2.1.37 Function: isamax
5.2.1.37.1 Syntax
(isamax n sx incx)
5.2.1.37.2 Description
5.2.1.38 Function: izamax
5.2.1.38.1 Syntax
(izamax n zx incx)
5.2.1.38.2 Description
5.2.1.39 Function: lsame
5.2.1.39.1 Syntax
(lsame ca cb)
5.2.1.39.2 Description
5.2.1.40 Function: xerbla
5.2.1.40.1 Syntax
(xerbla srname info)
5.2.1.40.2 Description
5.2.1.41 Function: zaxpy
5.2.1.41.1 Syntax
(zaxpy n za zx incx zy incy)
5.2.1.41.2 Description
5.2.1.42 Function: zcopy
5.2.1.42.1 Syntax
(zcopy n zx incx zy incy)
5.2.1.42.2 Description
5.2.1.43 Function: zdotc
5.2.1.43.1 Syntax
(zdotc n zx incx zy incy)
5.2.1.43.2 Description
5.2.1.44 Function: zdotu
5.2.1.44.1 Syntax
(zdotu n zx incx zy incy)
5.2.1.44.2 Description
5.2.1.45 Function: zdscal
5.2.1.45.1 Syntax
(zdscal n da zx incx)
5.2.1.45.2 Description
5.2.1.46 Function: zgbmv
5.2.1.46.1 Syntax
(zgbmv trans m n kl ku alpha a lda x incx beta y incy)
5.2.1.46.2 Description
5.2.1.47 Function: zgemm
5.2.1.47.1 Syntax
(zgemm transa transb m n k alpha a lda b ldb$ beta c ldc)
5.2.1.47.2 Description
5.2.1.48 Function: zgemv
5.2.1.48.1 Syntax
(zgemv trans m n alpha a lda x incx beta y incy)
5.2.1.48.2 Description
5.2.1.49 Function: zgerc
5.2.1.49.1 Syntax
(zgerc m n alpha x incx y incy a lda)
5.2.1.49.2 Description
5.2.1.50 Function: zgeru
5.2.1.50.1 Syntax
(zgeru m n alpha x incx y incy a lda)
5.2.1.50.2 Description
5.2.1.51 Function: zhbmv
5.2.1.51.1 Syntax
(zhbmv uplo n k alpha a lda x incx beta y incy)
5.2.1.51.2 Description
5.2.1.52 Function: zhemm
5.2.1.52.1 Syntax
(zhemm side uplo m n alpha a lda b ldb$ beta c ldc)
5.2.1.52.2 Description
5.2.1.53 Function: zhemv
5.2.1.53.1 Syntax
(zhemv uplo n alpha a lda x incx beta y incy)
5.2.1.53.2 Description
5.2.1.54 Function: zher
5.2.1.54.1 Syntax
(zher uplo n alpha x incx a lda)
5.2.1.54.2 Description
5.2.1.55 Function: zher2
5.2.1.55.1 Syntax
(zher2 uplo n alpha x incx y incy a lda)
5.2.1.55.2 Description
5.2.1.56 Function: zher2k
5.2.1.56.1 Syntax
(zher2k uplo trans n k alpha a lda b ldb$ beta c ldc)
5.2.1.56.2 Description
5.2.1.57 Function: zherk
5.2.1.57.1 Syntax
(zherk uplo trans n k alpha a lda beta c ldc)
5.2.1.57.2 Description
5.2.1.58 Function: zhpmv
5.2.1.58.1 Syntax
(zhpmv uplo n alpha ap x incx beta y incy)
5.2.1.58.2 Description
5.2.1.59 Function: zhpr
5.2.1.59.1 Syntax
(zhpr uplo n alpha x incx ap)
5.2.1.59.2 Description
5.2.1.60 Function: zhpr2
5.2.1.60.1 Syntax
(zhpr2 uplo n alpha x incx y incy ap)
5.2.1.60.2 Description
5.2.1.61 Function: zrotg
5.2.1.61.1 Syntax
(zrotg ca cb c s)
5.2.1.61.2 Description
5.2.1.62 Function: zscal
5.2.1.62.1 Syntax
(zscal n za zx incx)
5.2.1.62.2 Description
5.2.1.63 Function: zswap
5.2.1.63.1 Syntax
(zswap n zx incx zy incy)
5.2.1.63.2 Description
5.2.1.64 Function: zsymm
5.2.1.64.1 Syntax
(zsymm side uplo m n alpha a lda b ldb$ beta c ldc)
5.2.1.64.2 Description
5.2.1.65 Function: zsyr2k
5.2.1.65.1 Syntax
(zsyr2k uplo trans n k alpha a lda b ldb$ beta c ldc)
5.2.1.65.2 Description
5.2.1.66 Function: zsyrk
5.2.1.66.1 Syntax
(zsyrk uplo trans n k alpha a lda beta c ldc)
5.2.1.66.2 Description
5.2.1.67 Function: ztbmv
5.2.1.67.1 Syntax
(ztbmv uplo trans diag n k a lda x incx)
5.2.1.67.2 Description
5.2.1.68 Function: ztbsv
5.2.1.68.1 Syntax
(ztbsv uplo trans diag n k a lda x incx)
5.2.1.68.2 Description
5.2.1.69 Function: ztpmv
5.2.1.69.1 Syntax
(ztpmv uplo trans diag n ap x incx)
5.2.1.69.2 Description
5.2.1.70 Function: ztpsv
5.2.1.70.1 Syntax
(ztpsv uplo trans diag n ap x incx)
5.2.1.70.2 Description
5.2.1.71 Function: ztrmm
5.2.1.71.1 Syntax
(ztrmm side uplo transa diag m n alpha a lda b ldb$)
5.2.1.71.2 Description
5.2.1.72 Function: ztrmv
5.2.1.72.1 Syntax
(ztrmv uplo trans diag n a lda x incx)
5.2.1.72.2 Description
5.2.1.73 Function: ztrsm
5.2.1.73.1 Syntax
(ztrsm side uplo transa diag m n alpha a lda b ldb$)
5.2.1.73.2 Description
5.2.1.74 Function: ztrsv
5.2.1.74.1 Syntax
(ztrsv uplo trans diag n a lda x incx)
5.2.1.74.2 Description
6 Package: blas-complex-system
- Uses: common-lisp, asdf/interface
- Used by: None.
6.1 Description
6.2 External Symbols
7 Package: blas-hompack-system
- Uses: common-lisp, asdf/interface
- Used by: None.
7.1 Description
7.2 External Symbols
8 Package: blas-real-system
- Uses: common-lisp, asdf/interface
- Used by: None.
8.1 Description
8.2 External Symbols
9 Package: clml.association-rule
- Uses: common-lisp, hjs.util.vector, hjs.learn.read-data
- Used by: clml.test
9.1 Description
Package for association rule analysis
9.1.0.1 sample usage
ASSOC(25): (association-analyze "https://mmaul.github.io/clml.data/sample/pos.sexp" "sample/result.sexp" '("商品名") "ID番号" 3 :support 2 :external-format #+allegro :932 #-allegro :sjis) #<ASSOC-RESULT-DATASET> THRESHOLDS: SUPPORT 2 | CONFIDENCE 0 | LIFT 0 | CONVICTION 0 RULE-LENGTH: 3 RESULT: 4532 RULES ASSOC(6): (setf dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/pos.sexp") :external-format #+allegro :932 #-allegro :sjis)) #<HJS.LEARN.READ-DATA::UNSPECIALIZED-DATASET> DIMENSIONS: ID番号 | 商品名 | 数量 | 金額 TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 19929 POINTS ASSOC(11): (%association-analyze-apriori dataset '("商品名") "ID番号" 3 :support 2) #<ASSOC-RESULT-DATASET> THRESHOLDS: SUPPORT 2 | CONFIDENCE 0 | LIFT 0 | CONVICTION 0 RULE-LENGTH: 3 RESULT: 4532 RULES
9.2 External Symbols
9.2.1 External Functions
9.2.1.1 Inherited Function: %association-analyze
9.2.1.1.1 Syntax
(%association-analyze unsp-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.1.2 Description
- return: assoc-result-dataset
- arguments:
- infile : <string>
- outfile : <string>
- target-variables : <list string> column names
- key-variable : <string> column name for determining identities
- rule-length : <integer> >= 2, maximum length for a rule
- support : <number> for percentage
- confident : <number> for percentage
- lift : <number> beyond 0
- conviction : <number> beyond 0
- file-type : :sexp | :csv
- external-format : <acl-external-format>
- csv-type-spec : <list symbol>, type conversion of each column when reading lines from CSV file, e.g. '(string integer double-float double-float)
- algorithm : :apriori | :da | :fp-growth | :eclat | :lcm
9.2.1.2 Inherited Function: %association-analyze-ap-genrule
9.2.1.2.1 Syntax
(%association-analyze-ap-genrule unsp-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.2.2 Description
9.2.1.3 Inherited Function: %association-analyze-apriori
9.2.1.3.1 Syntax
(%association-analyze-apriori unsp-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.3.2 Description
ssociation analyze with apriori algorithm.
- return: assoc-result-dataset
- arguments:
- unsp-dataset: <unspecialized-dataset>
- target-variables : (list of string) column names
- key-variable : <string> column name for determining identities
- rule-length : <integer> >= 2, maximum length for a rule
- support : <number> for percentage
- confident : <number> for percentage
- lift : <number> beyond 0
- conviction : <number> beyond 0
9.2.1.4 Inherited Function: %association-analyze-da
9.2.1.4.1 Syntax
(%association-analyze-da labeled-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.4.2 Description
9.2.1.5 Inherited Function: %association-analyze-da-ap-genrule
9.2.1.5.1 Syntax
(%association-analyze-da-ap-genrule labeled-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.5.2 Description
Association analyze with da-ap-genrule algorithm. This is developer's idea using double-array for calculation.
- return value and arguments are same as %association-analyze-apriori
9.2.1.6 Inherited Function: %association-analyze-eclat
9.2.1.6.1 Syntax
(%association-analyze-eclat labeled-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.6.2 Description
Association analyze with Eclat algorithm
- return value and arguments are same as %association-analyze-apriori
9.2.1.7 Inherited Function: %association-analyze-fp-growth
9.2.1.7.1 Syntax
(%association-analyze-fp-growth labeled-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.7.2 Description
Association analyze with frequent pattern growth algorithm
- return value and arguments are same as %association-analyze-apriori
9.2.1.8 Inherited Function: %association-analyze-lcm
9.2.1.8.1 Syntax
(%association-analyze-lcm labeled-dataset target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0))
9.2.1.8.2 Description
Association analyze with Linear time Closed itemset Miner(LCM) algorithm
- return value and arguments are same as %association-analyze-apriori
9.2.1.9 Inherited Function: assoc-result-header
9.2.1.9.1 Syntax
(assoc-result-header object)
9.2.1.9.2 Description
9.2.1.10 Inherited Function: assoc-result-rules
9.2.1.10.1 Syntax
(assoc-result-rules object)
9.2.1.10.2 Description
9.2.1.11 Inherited Function: association-analyze
9.2.1.11.1 Syntax
(association-analyze infile outfile target-variables key-variable rule-length &key (support 0) (confident 0) (lift 0) (conviction 0) (external-format default) (file-type sexp) (csv-type-spec '(string double-float)) (algorithm lcm))
9.2.1.11.2 Description
9.2.1.12 Inherited Function: scan-eclat
9.2.1.12.1 Syntax
(scan-eclat trie transactions length rest-keys minimum-count)
9.2.1.12.2 Description
9.2.1.13 Inherited Function: scan-input-data-eclat
9.2.1.13.1 Syntax
(scan-input-data-eclat labeled-dataset target-variables key-variable rule-length support)
9.2.1.13.2 Description
10 Package: clml.classifiers.linear-regression
- Uses: common-lisp, hjs.learn.read-data, hjs.util.matrix, hjs.util.meta
- Used by: clml.test
10.1 Description
linear regression package
10.1.0.1 sample usage
LINEAR-REGRESSION(128):(setf dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/airquality.csv") :type :csv :csv-type-spec '(integer double-float double-float double-float double-float integer integer))) #<UNSPECIALIZED-DATASET> DIMENSIONS: id | Ozone | Solar | Wind | Temp | Month | Day TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 111 POINTS LINEAR-REGRESSION(129):(setf airquality (pick-and-specialize-data dataset :range '(0 1 2 3 4) :data-types '(:numeric :numeric :numeric :numeric :numeric))) #<NUMERIC-DATASET> DIMENSIONS: id | Ozone | Solar | Wind | Temp TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC NUMERIC DATA POINTS: 111 POINTS LINEAR-REGRESSION(130):(mlr airquality '(2 3 4 1)) #(-64.34207892859138 0.05982058996849854 -3.333591305512754 1.6520929109927098)
10.2 External Symbols
10.2.1 External Functions
10.2.1.1 Inherited Function: adjusted-r^2
10.2.1.1.1 Syntax
(adjusted-r^2 numeric-dataset range)
10.2.1.1.2 Description
10.2.1.2 Inherited Function: d.f
10.2.1.2.1 Syntax
(d.f numeric-dataset range)
10.2.1.2.2 Description
10.2.1.3 Inherited Function: f-value
10.2.1.3.1 Syntax
(f-value numeric-dataset range)
10.2.1.3.2 Description
10.2.1.4 Inherited Function: mlr
10.2.1.4.1 Syntax
(mlr numeric-dataset range)
10.2.1.4.2 Description
- return: <SIMPLE-ARRAY DOUBLE-FLOAT (*)>, intercept and coefficients of multiple regression formula
- arguments:
- numeric-dataset : <NUMERIC-DATASET>
- range : <list>, '(indices of explanatory variables, index of objective variable)
10.2.1.5 Inherited Function: pf
10.2.1.5.1 Syntax
(pf f phi-1 phi-2)
10.2.1.5.2 Description
10.2.1.6 Inherited Function: pf-value
10.2.1.6.1 Syntax
(pf-value numeric-dataset range)
10.2.1.6.2 Description
10.2.1.7 Inherited Function: pt
10.2.1.7.1 Syntax
(pt t-value phi)
10.2.1.7.2 Description
10.2.1.8 Inherited Function: pt-value-vector
10.2.1.8.1 Syntax
(pt-value-vector numeric-dataset range)
10.2.1.8.2 Description
10.2.1.9 Inherited Function: residual-quantile-vector
10.2.1.9.1 Syntax
(residual-quantile-vector numeric-dataset range)
10.2.1.9.2 Description
10.2.1.10 Inherited Function: residual-std-err
10.2.1.10.1 Syntax
(residual-std-err numeric-dataset range)
10.2.1.10.2 Description
10.2.1.11 Inherited Function: residual-vector
10.2.1.11.1 Syntax
(residual-vector numeric-dataset range)
10.2.1.11.2 Description
10.2.1.12 Inherited Function: r^2
10.2.1.12.1 Syntax
(r^2 numeric-dataset range)
10.2.1.12.2 Description
10.2.1.13 Inherited Function: std-err-vector
10.2.1.13.1 Syntax
(std-err-vector numeric-dataset range)
10.2.1.13.2 Description
10.2.1.14 Inherited Function: t-value-vector
10.2.1.14.1 Syntax
(t-value-vector numeric-dataset range)
10.2.1.14.2 Description
11 Package: clml.classifiers.logistic-regression
- Uses: common-lisp, clml.svm.wss3, hjs.learn.read-data, hjs.util.vector, hjs.util.matrix
- Used by: None.
11.1 Description
11.2 External Symbols
12 Package: clml.classifiers.nbayes
- Uses: common-lisp, hjs.learn.read-data
- Used by: clml.test
12.1 Description
Naive-Bayes
Naive-Bayes package (Multivariate Bernoulli and Multinomial Naive Bayes)
12.1.0.1 sample usage
12.2 External Symbols
12.2.1 External Functions
12.2.1.1 Inherited Function: make-mbnb-learner
12.2.1.1.1 Syntax
(make-mbnb-learner p-wc classes)
12.2.1.1.2 Description
12.2.1.2 Inherited Function: make-mnb-learner
12.2.1.2.1 Syntax
(make-mnb-learner q-wc classes)
12.2.1.2.2 Description
12.2.1.3 Inherited Function: mbnb-learn
12.2.1.3.1 Syntax
(mbnb-learn training-vector &key (alpha 1.0))
12.2.1.3.2 Description
- return List:(p-wc classes):array of conditional probabilities and class labels
- arguments
- training-vector:bag of words matrix (rows = documents, columns = words) whose class label locates the final column
- alpha :smoothing parameter, its default value is 1.0
Multivariate Bernoulli Naive Bayes Argument alpha is a smoothing parameter. We assume that final colum is the class label.
12.2.1.4 Inherited Function: mnb-learn
12.2.1.4.1 Syntax
(mnb-learn training-vector &key (alpha 1.0))
12.2.1.4.2 Description
13 Package: clml.clustering.cluster-validation
- Uses: common-lisp, hjs.learn.k means, hjs.util.vector, hjs.util.meta, iterate
- Used by: clml.test
13.1 Description
13.1.0.1 sample usage
CLUSTER-VALIDATION(72): (setf *workspace* (k-means:k-means 5 (read-data:pick-and-specialize-data (read-data:read-data-from-file "https://mmaul.github.io/clml.data/sample/syobu.csv" :type :csv :csv-type-spec '(string integer integer integer integer) :external-format #+allegro :932 #-allegro :sjis) :except '(0) :data-types (make-list 4 :initial-element :numeric)))) CLUSTER-VALIDATION(73): (calinski) 441.8562453167574 CLUSTER-VALIDATION(74): (hartigan) 2.5074656538807023 CLUSTER-VALIDATION(75): (ball-and-hall) 1127.7702976190476 CLUSTER-VALIDATION(76): (dunn-index :distance :euclid :intercluster :hausdorff :intracluster :centroid) 1.2576613811360222 CLUSTER-VALIDATION(77): (davies-bouldin-index :distance :euclid :intercluster :average :intracluster :complete) 1.899415427296523 CLUSTER-VALIDATION(78): (global-silhouette-value :distance :euclid) 0.5786560352400679
13.1.0.2 reference
13.2 External Symbols
13.2.1 External Global Variables
13.2.1.1 Inherited Variable: *workspace*
13.2.1.1.1 Value
NIL
Type: null
13.2.1.1.2 Description
workspace | validation target, the result of k-means clustering
13.2.2 External Functions
13.2.2.1 Inherited Function: ball-and-hall
13.2.2.1.1 Syntax
(ball-and-hall &optional (*workspace* *workspace*))
13.2.2.1.2 Description
13.2.2.2 Inherited Function: calinski
13.2.2.2.1 Syntax
(calinski &optional (*workspace* *workspace*))
13.2.2.2.2 Description
- return: <number> cluster validity index
13.2.2.3 Inherited Function: centroid
13.2.2.3.1 Syntax
(centroid)
13.2.2.3.2 Description
13.2.2.4 Inherited Function: davies-bouldin-index
13.2.2.4.1 Syntax
(davies-bouldin-index &key (*workspace* *workspace*) (distance euclid) (intercluster centroid) (intracluster centroid))
13.2.2.4.2 Description
13.2.2.5 Inherited Function: default-init-workspace
13.2.2.5.1 Syntax
(default-init-workspace)
13.2.2.5.2 Description
13.2.2.6 Inherited Function: dunn-index
13.2.2.6.1 Syntax
(dunn-index &key (*workspace* *workspace*) (distance euclid) (intercluster centroid) (intracluster centroid))
13.2.2.6.2 Description
13.2.2.7 Inherited Function: global-silhouette-value
13.2.2.7.1 Syntax
(global-silhouette-value &key (*workspace* *workspace*) (distance euclid))
13.2.2.7.2 Description
13.2.2.8 Inherited Function: hartigan
13.2.2.8.1 Syntax
(hartigan &optional (*workspace* *workspace*))
13.2.2.8.2 Description
14 Package: clml.clustering.hc
- Uses: common-lisp, hjs.learn.read-data, hjs.util.vector, hjs.util.matrix, hjs.util.meta
- Used by: clml.test, clml.clustering.nmf
14.1 Description
hierarchical-clustering package
14.1.0.1 sample usage
HC(35): (setf data (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/seiseki.csv") :type :csv :csv-type-spec '(string double-float double-float double-float double-float double-float))) #<UNSPECIALIZED-DATASET> DIMENSIONS: name | math | science | japanese | english | history TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 7 POINTS HC(36): (setf seiseki (pick-and-specialize-data data :range '(1 2 3 4 5) :data-types '(:numeric :numeric :numeric :numeric :numeric))) #<NUMERIC-DATASET> DIMENSIONS: math | science | japanese | english | history TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC NUMERIC DATA POINTS: 7 POINTS HC(37): (setf distance-matrix (distance-matrix (numeric-matrix seiseki))) #2A((0.0 68.65857557508748 33.77869150810907 60.13318551349163 28.478061731796284 63.37191807101944 67.88225099390856) (68.65857557508748 0.0 81.11103500757464 64.1404708432983 60.753600716336145 12.409673645990857 38.1051177665153) (33.77869150810907 81.11103500757464 0.0 52.67826876426369 21.307275752662516 75.66372975210778 87.53856293085921) (60.13318551349163 64.1404708432983 52.67826876426369 0.0 47.10626285325551 54.31390245600108 91.53141537199127) (28.478061731796284 60.753600716336145 21.307275752662516 47.10626285325551 0.0 56.382621436041795 67.72739475278819) (63.37191807101944 12.409673645990857 75.66372975210778 54.31390245600108 56.382621436041795 0.0 45.58508528016593) (67.88225099390856 38.1051177665153 87.53856293085921 91.53141537199127 67.72739475278819 45.58508528016593 0.0)) HC(38): (multiple-value-setq (u v) (cophenetic-matrix distance-matrix #'hc-ward)) #2A((0.0 150.95171411164776 34.40207690904939 66.03152040007744 34.40207690904939 150.95171411164776 150.95171411164776) (150.95171411164776 0.0 150.95171411164776 150.95171411164776 150.95171411164776 12.409673645990857 51.65691081579053) (34.40207690904939 150.95171411164776 0.0 66.03152040007744 21.307275752662516 150.95171411164776 150.95171411164776) (66.03152040007744 150.95171411164776 66.03152040007744 0.0 66.03152040007744 150.95171411164776 150.95171411164776) (34.40207690904939 150.95171411164776 21.307275752662516 66.03152040007744 0.0 150.95171411164776 150.95171411164776) (150.95171411164776 12.409673645990857 150.95171411164776 150.95171411164776 150.95171411164776 0.0 51.65691081579053) (150.95171411164776 51.65691081579053 150.95171411164776 150.95171411164776 150.95171411164776 51.65691081579053 0.0)) HC(39): (cutree 3 v) #(1 2 1 3 1 2 2)
14.2 External Symbols
14.2.1 External Functions
14.2.1.1 Inherited Function: cophenetic-cc
14.2.1.1.1 Syntax
(cophenetic-cc distance-matrix cophenetic-matrix)
14.2.1.1.2 Description
14.2.1.2 Inherited Function: cophenetic-matrix
14.2.1.2.1 Syntax
(cophenetic-matrix distance-matrix &optional (method #'hc-average))
14.2.1.2.2 Description
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* * )), (SIMPLE-ARRAY T (* *)), cophenetic matrix and merge matrix
- arguments:
- distance-matrix : (SIMPLE-ARRAY DOUBLE-FLOAT (* *))
- method : hc-single | hc-complete | hc-average | hc-centroid | hc-median | hc-ward, default is average
14.2.1.3 Inherited Function: cutree
14.2.1.3.1 Syntax
(cutree k merge-matrix)
14.2.1.3.2 Description
- return: (SIMPLE-ARRAY T), cluster label vector
- arguments:
- k : the number of clusters, to divide dendrogram into k pieces
- merge-matrix
14.2.1.4 Inherited Function: distance-matrix
14.2.1.4.1 Syntax
(distance-matrix matrix &optional (distance-fn #'euclidean))
14.2.1.4.2 Description
14.2.1.5 Inherited Function: hc-average
14.2.1.5.1 Syntax
(hc-average distance-matrix merge-matrix i j)
14.2.1.5.2 Description
14.2.1.6 Inherited Function: hc-centroid
14.2.1.6.1 Syntax
(hc-centroid distance-matrix merge-matrix i j)
14.2.1.6.2 Description
14.2.1.7 Inherited Function: hc-complete
14.2.1.7.1 Syntax
(hc-complete distance-matrix merge-matrix i j)
14.2.1.7.2 Description
14.2.1.8 Inherited Function: hc-median
14.2.1.8.1 Syntax
(hc-median distance-matrix merge-matrix i j)
14.2.1.8.2 Description
14.2.1.9 Inherited Function: hc-single
14.2.1.9.1 Syntax
(hc-single distance-matrix merge-matrix i j)
14.2.1.9.2 Description
14.2.1.10 Inherited Function: hc-ward
14.2.1.10.1 Syntax
(hc-ward distance-matrix merge-matrix i j)
14.2.1.10.2 Description
14.2.1.11 Inherited Function: i-thvector
14.2.1.11.1 Syntax
(i-thvector)
14.2.1.11.2 Description
14.2.1.12 Inherited Function: max-vector
14.2.1.12.1 Syntax
(max-vector)
14.2.1.12.2 Description
14.2.1.13 Inherited Function: min-vector
14.2.1.13.1 Syntax
(min-vector)
14.2.1.13.2 Description
14.2.1.14 Inherited Function: numeric-matrix
14.2.1.14.1 Syntax
(numeric-matrix numeric-dataset)
14.2.1.14.2 Description
14.2.1.15 Inherited Function: pick-up-column
14.2.1.15.1 Syntax
(pick-up-column)
14.2.1.15.2 Description
14.2.1.16 Inherited Function: pick-up-row
14.2.1.16.1 Syntax
(pick-up-row)
14.2.1.16.2 Description
14.2.1.17 Inherited Function: product-sum
14.2.1.17.1 Syntax
(product-sum v1 v2)
14.2.1.17.2 Description
14.2.1.18 Inherited Function: square-sum
14.2.1.18.1 Syntax
(square-sum v)
14.2.1.18.2 Description
14.2.1.19 Inherited Function: vector-mean
14.2.1.19.1 Syntax
(vector-mean vector)
14.2.1.19.2 Description
14.2.1.20 Inherited Function: vector-shift
14.2.1.20.1 Syntax
(vector-shift v const)
14.2.1.20.2 Description
14.2.1.21 Inherited Function: vector-sum
14.2.1.21.1 Syntax
(vector-sum)
14.2.1.21.2 Description
15 Package: clml.clustering.k-means2
- Uses: common-lisp, hjs.util.vector, hjs.util.meta, clml.statistics, hjs.util.matrix
- Used by: None.
15.1 Description
15.2 External Symbols
15.2.1 External Functions
15.2.1.1 Inherited Function: k-means
15.2.1.1.1 Syntax
(k-means)
15.2.1.1.2 Description
15.3 Ambiguous Symbols
15.3.1 K-Means
Disambiguation.
- Function:
clml.clustering.k-means2:k-means
- Package:
clml.clustering.k-means2:k-means
16 Package: clml.clustering.nmf
- Uses: common-lisp, clml.clustering.hc, blas, lapack, hjs.learn.read-data, hjs.util.matrix, hjs.util.meta
- Used by: clml.test
16.1 Description
16.2 External Symbols
16.2.1 External Functions
16.2.1.1 Inherited Function: c^3m-cluster-number
16.2.1.1.1 Syntax
(c^3m-cluster-number corpus-dataset)
16.2.1.1.2 Description
- decide the best cluster number of corpus by cover-coefficient-based concept clustering methodology
- return: DOUBLE-FLOAT
- arguments:
- corpus-dataset (BOW)
- reference: http://wwwsoc.nii.ac.jp/mslis/pdf/LIS49033.pdf
NMF(48): (setf corpus-dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/sports-corpus-data") :external-format :utf-8)) #<UNSPECIALIZED-DATASET> DIMENSIONS: File | 清水 | 試合 | ヤクルト | 鹿島 | 久保田 | ブルペン | 阿部 | 海老原 | 北海道 ... TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN ... NUMBER OF DIMENSIONS: 1203 DATA POINTS: 100 POINTS NMF(49): (c^3m-cluster-number corpus-dataset) 20.974904271175472 NMF(50): (setf corpus-dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/politics-corpus-data") :external-format :utf-8)) #<UNSPECIALIZED-DATASET> DIMENSIONS: File | 隠岐 | 定期 | 立場 | 比例 | 入札 | 成長 | 農水 | 秋田 | 教材 ... TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN ... NUMBER OF DIMENSIONS: 850 DATA POINTS: 80 POINTS NMF(51): (c^3m-cluster-number corpus-dataset) 15.290476048493785
16.2.1.2 Inherited Function: nmf
16.2.1.2.1 Syntax
(nmf matrix k &key (cost-fn euclidean) (iteration 100))
16.2.1.2.2 Description
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* *)), two factor matrices obtained by nmf
- arguments:
- non-negative matrix factorization with sparseness constraints
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* * )), two factor matrices obtained by nmf
- arguments:
- non-negative-matrix : (SIMPLE-ARRAY DOUBLE-FLOAT (* * ))
- k : size of dimension reduction
- sparseness 0.0~1.0
- type : :left | :right
- iteration : default is 100
- comments : we do nmf with sparseness constrained for the left factor matrix each column vector or right factor matrix each row vector. Objective function is euclidean norm.
- reference: Non-negative Matrix Factorization with Sparseness Constraints - non-negative-matrix : (SIMPLE-ARRAY DOUBLE-FLOAT (* *))
- k : size of dimension reduction or number of features
- cost-fn : :euclidean | :kl , default is euclidean
- iteration : default is 100
- comments : we can choose Kullback–Leibler divergence as a cost function
- reference : NMF package on CL-Machine Learning
NMF(136): (setf x (sample-matrix 7 10)) #2A((90.0 89.0 21.0 40.0 30.0 21.0 44.0 24.0 1.0 51.0) (1.0 64.0 5.0 90.0 66.0 69.0 89.0 29.0 95.0 80.0) (52.0 11.0 87.0 30.0 26.0 56.0 27.0 74.0 16.0 3.0) (90.0 10.0 92.0 16.0 54.0 75.0 48.0 22.0 73.0 71.0) (66.0 20.0 88.0 89.0 6.0 10.0 62.0 99.0 79.0 45.0) (3.0 71.0 31.0 74.0 99.0 76.0 93.0 19.0 31.0 61.0) (52.0 40.0 11.0 47.0 90.0 11.0 80.0 88.0 45.0 30.0)) NMF(137): (nmf-clustering x 5) #(4 1 3 3 2 1 4) NMF(138): (nmf-clustering x 5 :type :column) #(2 0 2 0 0 0 0 1 0 0)
16.2.1.3 Inherited Function: nmf-analysis
16.2.1.3.1 Syntax
(nmf-analysis matrix k &key (cost-fn euclidean) (iteration 100) (type row) (results 10))
16.2.1.3.2 Description
- print the results of NMF feature extraction
- return: nil
- arguments:
- non-negative-matrix
- k : number of features
- cost-fn : :euclidean | :kl, default is euclidean
- iteration : default is 100
- type : :row | :column, default is feature extraction from row data
- results : print the number of data in descending order, default is 10
NMF(25): (setf x (sample-matrix 100 200)) #2A((92.0 5.0 77.0 47.0 91.0 25.0 93.0 63.0 48.0 30.0 ...) (10.0 2.0 48.0 73.0 90.0 35.0 4.0 19.0 78.0 29.0 ...) (38.0 7.0 44.0 61.0 98.0 92.0 11.0 31.0 97.0 80.0 ...) (12.0 45.0 53.0 69.0 92.0 95.0 50.0 57.0 57.0 52.0 ...) (89.0 33.0 45.0 54.0 43.0 62.0 4.0 92.0 19.0 93.0 ...) (38.0 84.0 75.0 71.0 16.0 74.0 34.0 41.0 59.0 83.0 ...) (7.0 59.0 45.0 95.0 47.0 55.0 21.0 82.0 55.0 74.0 ...) (57.0 41.0 43.0 65.0 56.0 51.0 26.0 26.0 84.0 21.0 ...) (44.0 68.0 22.0 83.0 75.0 63.0 98.0 74.0 18.0 79.0 ...) (78.0 21.0 71.0 8.0 53.0 88.0 35.0 23.0 20.0 18.0 ...) ...) NMF(26): (nmf-analysis x 3 :type :column :results 5) Feature 0 81 46.75849601655378 103 45.955361786327046 140 43.68666852948713 64 43.51457629469007 152 42.932921747549514 Feature 1 186 11.79404092624892 138 11.19240951742515 42 10.716884646306237 150 9.93408007033108 98 9.827683668745964 Feature 2 145 8.53136727031378 128 7.427871404203731 131 7.399743366645699 162 7.207875670792123 98 7.097879611292094 NIL
16.2.1.4 Inherited Function: nmf-clustering
16.2.1.4.1 Syntax
(nmf-clustering matrix k &key (type row) (cost-fn euclidean) (iteration 100))
16.2.1.4.2 Description
- clustering using nmf, each row or column datum is placed into cluster corresponding to highest feature
- return: (SIMPLE-ARRAY T (*)), cluster label vector
- arguments :
- non-negative-matrix : (SIMPLE-ARRAY DOUBLE-FLOAT (* *))
- k : number of features
- type : :row | :column, default is row data clustering
- cost-fn : :euclidean | :kl, default is euclidean
- iteration : default is 100
- comments : obtained each cluster size is not always constant (not like k-means)
NMF(136): (setf x (sample-matrix 7 10)) #2A((90.0 89.0 21.0 40.0 30.0 21.0 44.0 24.0 1.0 51.0) (1.0 64.0 5.0 90.0 66.0 69.0 89.0 29.0 95.0 80.0) (52.0 11.0 87.0 30.0 26.0 56.0 27.0 74.0 16.0 3.0) (90.0 10.0 92.0 16.0 54.0 75.0 48.0 22.0 73.0 71.0) (66.0 20.0 88.0 89.0 6.0 10.0 62.0 99.0 79.0 45.0) (3.0 71.0 31.0 74.0 99.0 76.0 93.0 19.0 31.0 61.0) (52.0 40.0 11.0 47.0 90.0 11.0 80.0 88.0 45.0 30.0)) NMF(137): (nmf-clustering x 5) #(4 1 3 3 2 1 4) NMF(138): (nmf-clustering x 5 :type :column) #(2 0 2 0 0 0 0 1 0 0)
16.2.1.5 Inherited Function: nmf-corpus-analysis
16.2.1.5.1 Syntax
(nmf-corpus-analysis corpus-dataset k &key (cost-fn euclidean) (iteration 100) (results 10))
16.2.1.5.2 Description
- print the results of NMF feature extraction from given corpus
- return: nil
- arguments:
- corpus-dataset (BOW)
- k : number of features
- cost-fn : :euclidean | :kl, default is euclidean
- iteration : default is 100
- results : print the number of terms or documents in descending order, default is 10
- comments : the form of corpus data is 0th row is term-name vector and 0th column is document-name vector.
NMF(43): (setf corpus-dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/sports-corpus-data") :external-format :utf-8)) #<UNSPECIALIZED-DATASET> DIMENSIONS: File | 清水 | 試合 | ヤクルト | 鹿島 | 久保田 | ブルペン | 阿部 | 海老原 | 北海道 ... TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN ... NUMBER OF DIMENSIONS: 1203 DATA POINTS: 100 POINTS NMF(44): (nmf-corpus-analysis corpus-dataset 4 :results 5) Feature 0 マラソン 0.06539791632876352 大阪 0.04396451716840554 世界 0.040060656488777956 練習 0.03013540009606857 日本 0.0263706887677491 Feature 1 キャンプ 0.050381707199561754 宮崎 0.04586256603311258 監督 0.04578344596673979 投手 0.03456446647191445 野村 0.031224839643966038 Feature 2 決勝 0.06583621496282896 成年 0.06518764560939831 少年 0.05997504015149991 アイスホッケー 0.05464756076159945 群馬 0.04984371126734561 Feature 3 クラブ 0.03079770863250652 女子 0.024996064747937526 青森 0.023674619657332124 男子 0.023620256997055035 決勝 0.021651435489732713 Feature 0 00267800 4.054754528219457 00267780 3.7131593889464547 00261590 3.682858805780204 00267810 3.45020951637797 00267690 2.3814860805418316 Feature 1 00260660 3.161958458984025 00264500 2.9168932935791005 00261710 2.6708462825315076 00260650 2.467416770070239 00261770 2.4606524064689745 Feature 2 00264720 3.777138076271187 00265130 3.7275902361529445 00264810 3.5318672409737575 00265920 3.067206984954445 00265250 3.0173922648749887 Feature 3 00266020 3.4719778705422577 00266350 3.1108497329849696 00265970 3.066726776112281 00266070 2.609255058301139 00266120 2.4909903804005693 NIL
16.2.1.6 Inherited Function: nmf-corpus-search
16.2.1.6.1 Syntax
(nmf-corpus-search corpus-dataset term-or-document-name &key type (iteration 100) (results 10))
16.2.1.6.2 Description
- find the related or similar terms or documents by using nmf
- return: nil
- arguments:
- corpus-dataset (BOW)
- term-or-document-name
- type : :term | :document, query type
- iteration : default is 100
- results : print the number of terms or documents in descending order, default is 10
- comments : we search the related and/or similar terms or documents by using nmf(k=1).
NMF(52): (setf corpus-dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/sports-corpus-data") :external-format :utf-8)) #<UNSPECIALIZED-DATASET> DIMENSIONS: File | 清水 | 試合 | ヤクルト | 鹿島 | 久保田 | ブルペン | 阿部 | 海老原 | 北海道 ... TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN ... NUMBER OF DIMENSIONS: 1203 DATA POINTS: 100 POINTS NMF(53): (nmf-corpus-search corpus-dataset "西武" :type :term :results 5) Feature 0 西武 0.5251769235046575 所沢 0.03181077447066429 埼玉 0.031469276621575296 期待 0.029643503937470485 松坂 0.02532560897068374 Feature 0 00261790 8.972318348154714 00266250 4.238044604712796 00261710 1.289125490767428 00261730 0.08947696606550368 00265240 0.06077982768909628 NIL NMF(54): (nmf-corpus-search corpus-dataset "00267800" :type :document :results 5) Feature 0 大阪 0.20525379542444078 マラソン 0.17626791348443296 距離 0.10999092287756253 練習 0.09982535243005934 経験 0.08390979988118884 Feature 0 00267800 7.970296782572513 00267780 1.1463577558558922 00267810 0.9796321883720066 00261590 0.9016390011411483 00267690 0.6534929166105935 NIL NMF(55): (setf corpus-dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/politics-corpus-data") :external-format :utf-8)) #<UNSPECIALIZED-DATASET> DIMENSIONS: File | 隠岐 | 定期 | 立場 | 比例 | 入札 | 成長 | 農水 | 秋田 | 教材 ... TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN ... NUMBER OF DIMENSIONS: 850 DATA POINTS: 80 POINTS NMF(56): (nmf-corpus-search corpus-dataset "クリントン" :type :term :results 5) Feature 0 クリントン 0.5131911387489791 大統領 0.12539909855726378 アイオワ 0.03805693041474284 米 0.03336496912093245 ヒラリー 0.03046886725695364 Feature 0 00240260 6.164303014225728 00240860 4.927092104170816 00266600 0.4368921996276413 00240820 0.04974743623243792 00251070 0.029176304053375055 NIL
16.2.1.7 Inherited Function: nmf-sc
16.2.1.7.1 Syntax
(nmf-sc v k sparseness &key type (iteration 100))
16.2.1.7.2 Description
- non-negative matrix factorization with sparseness constraints
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* * )), two factor matrices obtained by nmf
- arguments:
- non-negative-matrix : (SIMPLE-ARRAY DOUBLE-FLOAT (* * ))
- k : size of dimension reduction
- sparseness 0.0~1.0
- type : :left | :right
- iteration : default is 100
- comments : we do nmf with sparseness constrained for the left factor matrix each column vector or right factor matrix each row vector. Objective function is euclidean norm.
- reference: Non-negative Matrix Factorization with Sparseness Constraints
NMF(34): (setf x (sample-matrix 100 100)) #2A((70.0 65.0 68.0 42.0 35.0 20.0 51.0 7.0 25.0 9.0 ...) (44.0 83.0 39.0 37.0 32.0 74.0 32.0 23.0 27.0 42.0 ...) (57.0 97.0 96.0 23.0 56.0 67.0 27.0 19.0 90.0 89.0 ...) (55.0 6.0 32.0 78.0 59.0 58.0 34.0 63.0 66.0 7.0 ...) (66.0 92.0 63.0 65.0 63.0 75.0 36.0 7.0 79.0 77.0 ...) (75.0 86.0 95.0 73.0 66.0 86.0 61.0 34.0 7.0 43.0 ...) (11.0 39.0 87.0 31.0 4.0 52.0 64.0 57.0 8.0 23.0 ...) (84.0 52.0 49.0 68.0 75.0 14.0 21.0 73.0 57.0 77.0 ...) (93.0 85.0 28.0 22.0 98.0 2.0 61.0 48.0 45.0 7.0 ...) (81.0 51.0 5.0 36.0 87.0 12.0 84.0 53.0 35.0 78.0 ...) ...) NMF(35): (multiple-value-setq (w h) (nmf-sc x 3 0.7 :type :left)) #2A((1.4779288903810084e-12 3698.436810921221 508.76839564873075) (0.06468571444133886 0.0 4.206412995699793e-12) (15616.472155017571 5522.3359228859135 13359.214293446286) (0.5537530076878738 0.0030283688683994114 0.46633231671876274) (7472.121463556481 0.0 8687.743649034346) (866.1770680973686 6831.896141533997 4459.0733598676115) (1.5181766737885027 0.4388556634212364 0.727139819117383) (0.7198025410086757 0.0047792056984690134 4.206412995699793e-12) (1.4779288903810084e-12 0.0 4.206412995699793e-12) (0.25528585009283233 0.0 4.206412995699793e-12) ...) NMF(36): h #2A((0.00287491870133676 0.0026133720724571797 2.950874161225484e-5 0.005125487883511961 6.757515335801653e-4 0.0012968322406142806 0.0038001301816957284 0.002985585252159595 0.0081124151768938 0.0042303781451423035 ...) (0.004994350656772211 0.0025747747712995227 0.007134096369763904 0.0065746407124065084 0.0038636664279363847 0.004880229457827016 0.00512112561086382 0.0038194228552171946 0.0050556422535574476 0.003237070939818787 ...) (0.0052939720030634446 0.007382671590128047 0.007556184152626243 3.931389819873203e-6 0.004546870255049726 0.006931587163470776 2.239987792302906e-4 0.001349836871839297 1.94285681454748e-4 0.004391868346075027 ...)) NMF(37): (sparseness (pick-up-column w 0)) 0.7 NMF(38): (multiple-value-setq (w h) (nmf-sc x 3 0.9 :type :right)) #2A((8.289561664219266e-6 1.4361785459627462e-4 3.2783650074466155e-9) (8.963543606154278e-5 2.46840968396353e-5 2.181734037947416e-6) (2.9872365277908504e-5 1.412292680612174e-4 4.198406652155696e-5) (6.890230812495509e-13 7.954471346549545e-5 2.7910446164534665e-5) (1.2477626056283604e-4 4.292564917625326e-9 2.5310616226879616e-5) (3.619705865699883e-7 1.464351885312363e-4 7.522900946233666e-5) (4.19655080884389e-7 1.6289294924375495e-4 3.153712985065881e-5) (1.703028808790872e-8 5.8687333880722456e-5 1.2797257648598223e-4) (1.4373147157245112e-5 6.128539811119244e-7 9.512691095539368e-5) (2.029113599202957e-18 8.421240673252468e-17 1.0537112796313751e-4) ...) NMF(39): h #2A((0.0 0.0 559651.4985471596 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ...) (0.0 0.006235745138837956 588285.0338912416 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ...) (0.0030094219837337732 0.0 336606.15256656246 0.0 0.0 0.0 0.0 0.0 6.607186514884233e-5 0.0 ...)) NMF(40): (sparseness (pick-up-row h 0)) 0.8999999999999999
16.2.1.8 Inherited Function: nmf-search
16.2.1.8.1 Syntax
(nmf-search matrix row-or-column-number &key type (iteration 100) (results 10))
16.2.1.8.2 Description
- find the related or similar data by using nmf
- return: nil
- arguments:
- non-negative-matrix : (SIMPLE-ARRAY DOUBLE-FLOAT (* * ))
- row-or-column-number :
- type :row | :column : query type
- cost-fn : :euclidean | :kl, default is euclidean
- iteration : default is 100
- results : print the number of row data or column data in descending order, default is 10
- comments : we search the related and/or similar data by using nmf(k=1).
NMF(96): (setf x (sample-matrix 100 200)) #2A((62.0 91.0 13.0 64.0 59.0 64.0 92.0 48.0 33.0 31.0 ...) (0.0 81.0 61.0 38.0 4.0 14.0 97.0 83.0 92.0 20.0 ...) (98.0 74.0 45.0 77.0 87.0 67.0 61.0 25.0 89.0 62.0 ...) (14.0 3.0 67.0 16.0 41.0 17.0 90.0 13.0 18.0 2.0 ...) (47.0 33.0 81.0 14.0 37.0 46.0 61.0 41.0 74.0 92.0 ...) (40.0 1.0 93.0 1.0 22.0 95.0 46.0 77.0 68.0 43.0 ...) (27.0 38.0 30.0 8.0 91.0 8.0 51.0 22.0 67.0 3.0 ...) (50.0 36.0 13.0 73.0 26.0 32.0 13.0 74.0 96.0 28.0 ...) (43.0 21.0 27.0 36.0 29.0 39.0 93.0 53.0 12.0 74.0 ...) (10.0 78.0 25.0 92.0 83.0 52.0 47.0 20.0 72.0 3.0 ...) ...) NMF(97): (nmf-search x 113 :type :column) Feature 0 113 145.19488284162378 17 84.73937398353675 123 83.8805446764401 100 83.74400654487428 183 82.11736662225094 91 81.55075159303482 194 81.04143723738916 188 80.93626654118066 97 80.77377247509784 143 79.9072654735812 NIL
16.2.1.9 Inherited Function: rho-k
16.2.1.9.1 Syntax
(rho-k matrix k &key (type row) (cost-fn euclidean) (iteration 100) (repeat 100))
16.2.1.9.2 Description
- stability of nmf clustering associated with k. we consider k is more stable closer to 1.0.
- return: DOUBLE-FLOAT
- arguments:
- non-negative-matrix : (SIMPLE-ARRAY DOUBLE-FLOAT (* *))
- k : size of dimension reduction or number of features
- type : :row | :column, default is row
- cost-fn : :euclidean | :kl, default is euclidean
- iteration : default is 100, internal nmf iteration
- repeat : default is 100, external nmf iteration to compute rho-k
- comments: Since we need to repeat nmf to take the average and then do hierarchical clustering with ward-method, computing rho-k is slow.
- reference: Metagenes and molecular pattern discovery using matrix factorization
NMF(18): (setf matrix (sample-matrix 100 100)) #2A((37.0 96.0 74.0 31.0 23.0 52.0 77.0 24.0 96.0 68.0 ...) (4.0 26.0 41.0 82.0 51.0 10.0 19.0 61.0 48.0 36.0 ...) (4.0 91.0 78.0 27.0 72.0 53.0 97.0 7.0 49.0 17.0 ...) (45.0 15.0 81.0 65.0 67.0 38.0 66.0 5.0 55.0 88.0 ...) (63.0 12.0 56.0 87.0 81.0 1.0 5.0 99.0 88.0 79.0 ...) (9.0 26.0 58.0 43.0 38.0 61.0 15.0 47.0 98.0 12.0 ...) (56.0 34.0 74.0 84.0 42.0 4.0 1.0 57.0 85.0 65.0 ...) (79.0 28.0 9.0 94.0 8.0 72.0 45.0 17.0 85.0 2.0 ...) (53.0 41.0 80.0 12.0 69.0 52.0 85.0 94.0 14.0 31.0 ...) (20.0 1.0 8.0 40.0 29.0 13.0 75.0 8.0 58.0 26.0 ...) ...) NMF(19): (rho-k matrix 2) 0.9794613282960201 NMF(20): (rho-k matrix 2 :cost-fn :kl) 0.9789550957506326
16.2.1.10 Inherited Function: sample-matrix
16.2.1.10.1 Syntax
(sample-matrix m n)
16.2.1.10.2 Description
16.2.1.11 Inherited Function: sparseness
16.2.1.11.1 Syntax
(sparseness vector)
16.2.1.11.2 Description
16.3 Ambiguous Symbols
16.3.1 Nmf
Disambiguation.
- Function:
nmf
- Package:
nmf
17 Package: clml.clustering.optics
- Uses: common-lisp, hjs.learn.read-data, hjs.util.matrix, clml.statistics
- Used by: clml.test, clml.clustering.optics-speed
17.1 Description
OPTICS – density-based clustering package
17.2 External Symbols
17.2.1 External Functions
17.2.1.1 Inherited Function: make-optics-input
17.2.1.1.1 Syntax
(make-optics-input input-data epsilon min-pts r-epsilon &key (distance manhattan) (normalize nil))
17.2.1.1.2 Description
17.2.1.2 Inherited Function: optics
17.2.1.2.1 Syntax
(optics input-path epsilon min-pts r-epsilon target-cols &key (file-type sexp) (csv-type-spec '(string double-float double-float)) (distance manhattan) (normalize nil) (external-format default))
17.2.1.2.2 Description
- return: optics-output
- arguments:
- input-path : <string>
- epsilon : <number> above 0, neighborhood radius
- min-pts : <integer> above 0, minimum number of data points
- r-epsilon : <number> above 0 not more than epsilon, threshold for reachability-distance
- target-cols : <list string>, the names of target columns, each column's type is :numeric
- file-type : :sexp | :csv
- csv-type-spec : <list symbol>, type conversion of each column when reading lines from CSV file, e.g. '(string integer double-float double-float)
- distance : :manhattan | :euclid | :cosine
- normalize : t | nil
- external-format : <acl-external-format>
OPTICS(10): (optics "https://mmaul.github.io/clml.data/sample/syobu.csv" 10 2 10 '("がく長" "がく幅" "花びら長" "花びら幅") :file-type :csv :csv-type-spec '(string integer integer integer integer) :distance :manhattan :external-format #+allegro :932 #-allegro :sjis) #<OPTICS-OUTPUT> [ClusterID] SIZE | [-1] 6 | [1] 48 | [2] 96 OPTICS(11): (ordered-data *) #(#("ID" "reachability" "core distance" "ClusterID") #(0 10.1 2.0 1) #(4 2.0 2.0 1) #(17 2.0 2.0 1) #(27 2.0 2.0 1) #(28 2.0 2.0 1) #(39 2.0 2.0 1) #(37 2.0 4.0 1) #(40 2.0 3.0 1) #(7 2.0 2.0 1) ...)
17.2.1.3 Inherited Function: optics-main
17.2.1.3.1 Syntax
(optics-main optics-input optics-output)
17.2.1.3.2 Description
17.3 Ambiguous Symbols
17.3.1 Optics
Disambiguation.
- Function:
optics
- Package:
optics
18 Package: clml.clustering.optics-speed
- Uses: clml.clustering.optics, clml.nearest-search.nearest
- Used by: None.
18.1 Description
18.2 External Symbols
19 Package: clml.clustering.spectral-clustering
- Uses: common-lisp, hjs.util.matrix, hjs.util.meta
- Used by: clml.test
19.1 Description
Package for undirected graph clustering
19.2 External Symbols
19.2.1 External Global Variables
19.2.1.1 Inherited Variable: *sample-w*
19.2.1.1.1 Value
#2A((10.0 0.7071 0.3333 0.2774 0.3714) (0.7071 10.0 0.4472 0.2774 0.2857) (0.3333 0.4472 10.0 0.5 0.3124) (0.2774 0.2774 0.5 10.0 0.4851) (0.3714 0.2857 0.3124 0.4851 10.0))
Type: simple-array
19.2.1.1.2 Description
19.2.2 External Functions
19.2.2.1 Inherited Function: spectral-clustering-mcut
19.2.2.1.1 Syntax
(spectral-clustering-mcut w ncls &key (eigen-tolerance 100.0))
19.2.2.1.2 Description
- return1: Clustering result as a list of list of nodes
- return2: Status code :success, :questionable, :input-error, or :fatal-error
- arguments:
- m : <SIMPLE-ARRAY DOUBLE-FLOAT (* *)>, similarity matrix of a graph
- ncls : <integer>, number of cluster
- eigen-tolerance : Acceptable error value for eigen computation
Patitions non-empty undirected graph W into NCLS clusters with M-cut spectral clustering method where W is a symmetric (N,N) similarity matrix of double-float values and NCLS is a positive integer. The nodes of the graph are the indices of W. The similarity of nodes i and j should be a non-negative double-float value W[i,j]. Each similarity value of node i and itself must be a positive value. The keyword argument EIGEN-TOLERANCE is a positive doulbe-float value or nil which controls accuracy of eigen computation checker described below.
This function returns two values as a multiple-values. The first is the clustering result as a list of list of nodes. The second is the status symbol of the result as follows.
Status Meaning
:success The result is correct.
:questionable The result may be questionable because a set of eigen values and their vectors returned by the eigen computation library function seems erroneous with an error value, by a measure, greater than specified EIGEN-TOLERANCE. This check is skipped if EIGEN-TOLERANCE is nil.
- the following cases are fatal and nil is returned as the first value -
:input-error Given arguments does not hold the above conditions.
:fatal-error This situation arise in the following cases:
- An eigen computation failed, or
- returned eigen values could not halve a cluster.
SPECTRAL-CLUSTERING(25): (load "https://mmaul.github.io/clml.data/sample/spectral-clustering-sample.cl" :external-format #+allegro :932 #-allegro :sjis) SPECTRAL-CLUSTERING(26): *spectral-nodevector* #("満足度" "差別" "林" "NPO" "生きがい" "中学" "服" "社会福祉" "市場" "ADL" ...) SPECTRAL-CLUSTERING(27): *spectral-w* #2A((1.0 0.0 0.0015822785208001733 0.0 0.0 0.0 0.0 0.0015822785208001733 0.0 0.0015822785208001733 ...) (0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ...) (0.0015822785208001733 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ...) (0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0035273367539048195 0.0 0.0 ...) (0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 ...) (0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 ...) (0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 ...) (0.0015822785208001733 0.0 0.0 0.0035273367539048195 0.0 0.0 0.0 1.0 0.0 0.0 ...) (0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 ...) (0.0015822785208001733 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 ...) ...) SPECTRAL-CLUSTERING(28): (spectral-clustering-mcut *spectral-w* 3) ((2 4 6 8 11 12 14 16 18 19 ...) (0 1 3 5 7 9 10 13 15 17 ...) (55 73 86 95 111 146 157 257 376)) :SUCCESS SPECTRAL-CLUSTERING(29): (mapcar (lambda (c) (mapcar (lambda (n) (aref *spectral-nodevector* n)) c)) *) (("林" "生きがい" "服" "市場" "母子" "リサイクル" "腰痛" "手術" "金属" "理論" ...) ("満足度" "差別" "NPO" "中学" "社会福祉" "ADL" "癒し" "伊藤" "教材" "ひきこもり" ...) ("Method" "system" "language" "study" "education" "Web" "English" "japanese" "journal"))
- Shinnou Hiroyuki,
20 Package: clml.decision-tree.decision-tree
- Uses: common-lisp, hjs.learn.read-data, hjs.util.matrix
- Used by: clml.decision-tree.random-forest
20.1 Description
decision tree package
20.2 External Symbols
20.2.1 External Functions
20.2.1.1 Function: column-name->column-number
20.2.1.1.1 Syntax
(column-name->column-number variable-index-hash column-name)
20.2.1.1.2 Description
20.2.1.2 Internal Function: decision-tree-validation
20.2.1.2.1 Syntax
(decision-tree-validation validation-dataset objective-column-name decision-tree)
20.2.1.2.2 Description
- return: CONS, validation result
- arguments:
- unspecialized-dataset : dataset for validation
- objective-variable-name
- decision-tree
- comments : each element of returning association list represents that ((prediction . answer) . number).
DECISION-TREE(64): (setf *bc-train* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.train.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 338 POINTS DECISION-TREE(65): (setf *tree* (make-decision-tree *bc-train* "Class")) (((("Cell.size" . 4.0) (("Bare.nuclei" . 4.0) ("Bare.nuclei" . 1.0) ("Bare.nuclei" . 5.0) ("Bare.nuclei" . 10.0) ("Bare.nuclei" . 2.0) ("Bare.nuclei" . 3.0) ("Bare.nuclei" . 8.0) ("Bare.nuclei" . 6.0) ("Bare.nuclei" . 7.0) ("Bare.nuclei" . 9.0) ...)) (("malignant" . 117) ("benign" . 221)) ((337 334 329 323 317 305 295 292 291 285 ...) (336 335 333 332 331 330 328 327 326 325 ...))) (((("Bl.cromatin" . 4.0) (# # # # # # # # # # ...)) (("benign" . 7) ("malignant" . 99)) ((2 7 10 18 19 25 28 31 34 35 ...) (0 1 20 23 26 54 74 80 119 122 ...))) (((# #) (# #) (# #)) ((#) (334 329 323 305 295 292 291 280 275 274 ...)) ((# # #) (# #) (# #))) (((# #) (# #) (# #)) ((#) (145 140 133 119 80 54 26 23)) ((# # #) (# #) (# # #)))) (((("Bare.nuclei" . 6.0) (# # # # # # # # # # ...)) (("malignant" . 18) ("benign" . 214)) ((11 32 60 72 86 128 142 165 170 217) (3 4 5 6 8 9 12 13 14 15 ...))) ((("malignant" . 10)) (11 32 60 72 86 128 142 165 170 217)) (((# #) (# #) (# #)) ((#) (131 51 50 27)) ((# # #) (# # #) (# # #))))) DECISION-TREE(66): (setf *bc-test* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.test.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 345 POINTS DECISION-TREE(67): (decision-tree-validation *bc-test* "Class" *tree*) ((("benign" . "malignant") . 4) (("malignant" . "malignant") . 118) (("malignant" . "benign") . 9) (("benign" . "benign") . 214))
20.2.1.3 Function: delta-entropy
20.2.1.3.1 Syntax
(delta-entropy data-vector variable-index-hash list-of-row-numbers attribute-column-name attribute objective-column-index)
20.2.1.3.2 Description
20.2.1.4 Function: delta-gini
20.2.1.4.1 Syntax
(delta-gini data-vector variable-index-hash list-of-row-numbers attribute-column-name attribute objective-column-index)
20.2.1.4.2 Description
20.2.1.5 Function: delta-variance
20.2.1.5.1 Syntax
(delta-variance data-vector variable-index-hash list-of-row-numbers attribute-column-name attribute objective-column-index)
20.2.1.5.2 Description
20.2.1.6 Function: entropy
20.2.1.6.1 Syntax
(entropy sum-up-results-list)
20.2.1.6.2 Description
20.2.1.7 Function: gini-index
20.2.1.7.1 Syntax
(gini-index sum-up-results-list)
20.2.1.7.2 Description
20.2.1.8 Internal Function: make-decision-tree
20.2.1.8.1 Syntax
(make-decision-tree unspecialized-dataset objective-column-name &key (test #'delta-gini) (epsilon 0))
20.2.1.8.2 Description
- make decision tree based on CART algorithm
- return: CONS, decision tree
- arguments:
- unspecialized-dataset
- objective-variable-name
- test : delta-gini | delta-entropy , splitting test-function, default is delta-gini
- epsilon : pre-pruning parameter, default is 0,
- comments : when split, we treat string data as nominal scale and numerical data as ordinal scale.
- reference : Toby Segaran. "Programming Collective Intelligence" ,O'REILLY
20.2.1.9 Internal Function: make-regression-tree
20.2.1.9.1 Syntax
(make-regression-tree unspecialized-dataset objective-column-name &key (test #'delta-variance) (epsilon 0))
20.2.1.9.2 Description
- return: CONS, regression tree
- argumrnts:
- unspecialized-dataset
- objective-variable-name
- epsilon : pre-pruning parameter, default is 0
- comments : we use variance difference as a split criterion.
20.2.1.10 Function: make-split-predicate
20.2.1.10.1 Syntax
(make-split-predicate attribute &optional optimize)
20.2.1.10.2 Description
20.2.1.11 Function: make-variable-index-hash
20.2.1.11.1 Syntax
(make-variable-index-hash unspecialized-dataset)
20.2.1.11.2 Description
20.2.1.12 Inherited Function: mean
20.2.1.12.1 Syntax
(mean sum-up-results-list)
20.2.1.12.2 Description
for regression tree, objective variable is numeric data.
20.2.1.13 Internal Function: predict-decision-tree
20.2.1.13.1 Syntax
(predict-decision-tree query-vector unspecialized-dataset tree)
20.2.1.13.2 Description
- return: string, prediction
- arguments:
- query-vector
- unspecialized-dataset : dataset used to make a decision tree
- decision-tree
DECISION-TREE(40): (setf *syobu* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/syobu.csv") :type :csv :csv-type-spec '(string integer integer integer integer))) #<UNSPECIALIZED-DATASET> DIMENSIONS: 種類 | がく長 | がく幅 | 花びら長 | 花びら幅 TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 150 POINTS DECISION-TREE(41): (setf *tree* (make-decision-tree *syobu* "種類")) (((("花びら長" . 30) (("花びら幅" . 18) ("花びら幅" . 23) ("花びら幅" . 20) ("花びら幅" . 19) ("花びら幅" . 25) ("花びら幅" . 24) ("花びら幅" . 21) ("花びら幅" . 14) ("花びら幅" . 15) ("花びら幅" . 22) ...)) (("Virginica" . 50) ("Versicolor" . 50) ("Setosa" . 50)) ((149 148 147 146 145 144 143 142 141 140 ...) (49 48 47 46 45 44 43 42 41 40 ...))) (((("花びら幅" . 18) (# # # # # # # # # # ...)) (("Versicolor" . 50) ("Virginica" . 50)) ((70 100 101 102 103 104 105 107 108 109 ...) (50 51 52 53 54 55 56 57 58 59 ...))) (((# #) (# #) (# #)) ((#) (149 148 147 146 145 144 143 142 141 140 ...)) ((# # #) (# #) (# #))) (((# #) (# #) (# #)) ((# # #) (# # #) (# #)) ((# # #) (# #) (# #)))) ((("Setosa" . 50)) (49 48 47 46 45 44 43 42 41 40 ...))) DECISION-TREE(42): (print-decision-tree *tree*) [30 <= 花びら長?]((Virginica . 50) (Versicolor . 50) (Setosa . 50)) Yes->[18 <= 花びら幅?]((Versicolor . 50) (Virginica . 50)) Yes->[49 <= 花びら長?]((Virginica . 45) (Versicolor . 1)) Yes->((Virginica . 43)) No->[31 <= がく幅?]((Versicolor . 1) (Virginica . 2)) Yes->((Versicolor . 1)) No->((Virginica . 2)) No->[50 <= 花びら長?]((Virginica . 5) (Versicolor . 49)) Yes->[16 <= 花びら幅?]((Versicolor . 2) (Virginica . 4)) Yes->[53 <= 花びら長?]((Virginica . 1) (Versicolor . 2)) Yes->((Virginica . 1)) No->((Versicolor . 2)) No->((Virginica . 3)) No->[17 <= 花びら幅?]((Versicolor . 47) (Virginica . 1)) Yes->((Virginica . 1)) No->((Versicolor . 47)) No->((Setosa . 50)) NIL DECISION-TREE(43): (make-decision-tree *syobu* "種類" :epsilon 0.1) (((("花びら長" . 30) (("花びら幅" . 18) ("花びら幅" . 23) ("花びら幅" . 20) ("花びら幅" . 19) ("花びら幅" . 25) ("花びら幅" . 24) ("花びら幅" . 21) ("花びら幅" . 14) ("花びら幅" . 15) ("花びら幅" . 22) ...)) (("Virginica" . 50) ("Versicolor" . 50) ("Setosa" . 50)) ((149 148 147 146 145 144 143 142 141 140 ...) (49 48 47 46 45 44 43 42 41 40 ...))) (((("花びら幅" . 18) (# # # # # # # # # # ...)) (("Versicolor" . 50) ("Virginica" . 50)) ((70 100 101 102 103 104 105 107 108 109 ...) (50 51 52 53 54 55 56 57 58 59 ...))) ((("Virginica" . 45) ("Versicolor" . 1)) (70 100 101 102 103 104 105 107 108 109 ...)) ((("Virginica" . 5) ("Versicolor" . 49)) (50 51 52 53 54 55 56 57 58 59 ...))) ((("Setosa" . 50)) (49 48 47 46 45 44 43 42 41 40 ...))) DECISION-TREE(44): (print-decision-tree *) [30 <= 花びら長?]((Virginica . 50) (Versicolor . 50) (Setosa . 50)) Yes->[18 <= 花びら幅?]((Versicolor . 50) (Virginica . 50)) Yes->((Virginica . 45) (Versicolor . 1)) No->((Virginica . 5) (Versicolor . 49)) No->((Setosa . 50)) NIL DECISION-TREE(45): (setf *query* #("?" 53 30 33 10)) #("?" 53 30 33 10) DECISION-TREE(46): (predict-decision-tree *query* *syobu* *tree*) "Versicolor"
20.2.1.14 Internal Function: predict-regression-tree
20.2.1.14.1 Syntax
(predict-regression-tree query-vector unspecialized-dataset tree)
20.2.1.14.2 Description
- return: real, predictive value
- arguments:
- query-vector :
- unspecialized-dataset : used dataset to make the regression tree
- regression-tree
DECISION-TREE(68): (setf *cars* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/cars.csv") :type :csv :csv-type-spec '(double-float double-float))) #<UNSPECIALIZED-DATASET> DIMENSIONS: speed | distance TYPES: UNKNOWN | UNKNOWN DATA POINTS: 50 POINTS DECISION-TREE(69): (setf *tree* (make-regression-tree *cars* "distance" :epsilon 35)) (((("speed" . 18.0) (("speed" . 25.0) ("speed" . 24.0) ("speed" . 23.0) ("speed" . 22.0) ("speed" . 20.0) ("speed" . 19.0) ("speed" . 17.0) ("speed" . 16.0) ("speed" . 15.0) ("speed" . 14.0) ...)) ((85.0 . 1) (120.0 . 1) (93.0 . 1) (92.0 . 1) (70.0 . 1) (66.0 . 1) (64.0 . 1) (52.0 . 1) (48.0 . 1) (68.0 . 1) ...) ((49 48 47 46 45 44 43 42 41 40 ...) (30 29 28 27 26 25 24 23 22 21 ...))) (((("speed" . 24.0) (# # # # # # # # # # ...)) ((42.0 . 1) (76.0 . 1) (84.0 . 1) (36.0 . 1) (46.0 . 1) (68.0 . 1) (32.0 . 1) (48.0 . 1) (52.0 . 1) (56.0 . 2) ...) ((45 46 47 48 49) (31 32 33 34 35 36 37 38 39 40 ...))) (((85.0 . 1) (120.0 . 1) (93.0 . 1) (92.0 . 1) (70.0 . 1)) (45 46 47 48 49)) (((54.0 . 1) (66.0 . 1) (64.0 . 1) (52.0 . 1) (48.0 . 1) (32.0 . 1) (68.0 . 1) (46.0 . 1) (36.0 . 1) (84.0 . 1) ...) (31 32 33 34 35 36 37 38 39 40 ...))) (((("speed" . 13.0) (# # # # # # # # # # ...)) ((2.0 . 1) (4.0 . 1) (22.0 . 1) (16.0 . 1) (10.0 . 2) (18.0 . 1) (17.0 . 1) (14.0 . 1) (24.0 . 1) (28.0 . 2) ...) ((15 16 17 18 19 20 21 22 23 24 ...) (0 1 2 3 4 5 6 7 8 9 ...))) (((50.0 . 1) (40.0 . 2) (32.0 . 2) (54.0 . 1) (20.0 . 1) (80.0 . 1) (60.0 . 1) (36.0 . 1) (46.0 . 1) (34.0 . 2) ...) (15 16 17 18 19 20 21 22 23 24 ...)) (((# #) (# # # # # # # # # # ...) (# #)) ((# # # # # # # #) (14 13 12 11 10 9 8 7 6)) ((# # # # #) (5 4 3 2 1 0))))) DECISION-TREE(70): (print-regression-tree *tree*) [18.0 <= speed?] (mean = 42.98, n = 50) Yes->[24.0 <= speed?] (mean = 65.26, n = 19) Yes->(mean = 92.00, n = 5) No->(mean = 55.71, n = 14) No->[13.0 <= speed?] (mean = 29.32, n = 31) Yes->(mean = 39.75, n = 16) No->[10.0 <= speed?] (mean = 18.20, n = 15) Yes->(mean = 23.22, n = 9) No->(mean = 10.67, n = 6) NIL DECISION-TREE(71): (setf *query* #(24.1 "?")) #(24.1 "?") DECISION-TREE(72): (predict-regression-tree *query* *cars* *tree*) 92.0
20.2.1.15 Internal Function: print-decision-tree
20.2.1.15.1 Syntax
(print-decision-tree decision-tree &optional (stream t) (indent 0))
20.2.1.15.2 Description
20.2.1.16 Internal Function: print-regression-tree
20.2.1.16.1 Syntax
(print-regression-tree regression-tree &optional (stream t) (indent 0))
20.2.1.16.2 Description
- return: NIL
- arguments:
- decision-tree
- stream : default is T
20.2.1.17 Internal Function: regression-tree-validation
20.2.1.17.1 Syntax
(regression-tree-validation validation-dataset objective-column-name regression-tree)
20.2.1.17.2 Description
- return: MSE (Mean Squared Error)
- arguments:
- unspecialized-dataset : for validation
- objective-variable-name
- regression-tree
DECISION-TREE(10): (setf *bc-train* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.train.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 338 POINTS DECISION-TREE(11): (setf *tree* (make-regression-tree *bc-train* "Cell.size")) (((("Class" . "benign") (("Bare.nuclei" . 4.0) ("Bare.nuclei" . 1.0) ("Bare.nuclei" . 5.0) ("Bare.nuclei" . 10.0) ("Bare.nuclei" . 2.0) ("Bare.nuclei" . 3.0) ("Bare.nuclei" . 8.0) ("Bare.nuclei" . 6.0) ("Bare.nuclei" . 7.0) ("Bare.nuclei" . 9.0) ...)) ((7.0 . 10) (9.0 . 3) (3.0 . 22) (6.0 . 11) (5.0 . 18) (2.0 . 22) (1.0 . 188) (10.0 . 25) (8.0 . 19) (4.0 . 20)) ((336 335 333 332 331 330 328 327 326 325 ...) (337 334 329 323 305 295 292 291 285 280 ...))) (((("Cell.shape" . 7.0) (# # # # # # # # # # ...)) ((8.0 . 1) (7.0 . 1) (4.0 . 5) (2.0 . 15) (3.0 . 12) (1.0 . 187)) ((1 124) (0 3 4 5 6 8 9 12 13 14 ...))) (((# #) (# #) (# #)) ((#) (1)) ((#) (124))) (((# #) (# # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# #) (# # #)))) (((("Cell.shape" . 7.0) (# # # # # # # # # # ...)) ((1.0 . 1) (2.0 . 7) (9.0 . 3) (3.0 . 10) (6.0 . 11) (4.0 . 15) (5.0 . 18) (7.0 . 9) (10.0 . 25) (8.0 . 18)) ((2 23 52 55 71 76 80 83 84 85 ...) (7 10 11 18 19 20 24 25 26 27 ...))) (((# #) (# # # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# # #) (# # #))) (((# #) (# # # # # # # # #) (# #)) ((# # #) (# #) (# # #)) ((# # #) (# # #) (# # #))))) DECISION-TREE(12): (setf *bc-test* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.test.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 345 POINTS DECISION-TREE(13): (regression-tree-validation *bc-test* "Cell.size" *tree*) 2.356254428341385
20.2.1.18 Function: split
20.2.1.18.1 Syntax
(split data-vector variable-index-hash list-of-row-numbers attribute-column-name attribute)
20.2.1.18.2 Description
20.2.1.19 Function: sum-up
20.2.1.19.1 Syntax
(sum-up lst)
20.2.1.19.2 Description
20.2.1.20 Function: sum-up-results
20.2.1.20.1 Syntax
(sum-up-results)
20.2.1.20.2 Description
20.2.1.21 Internal Function: total
20.2.1.21.1 Syntax
(total sum-up-results-list)
20.2.1.21.2 Description
20.2.1.22 Inherited Function: variance
20.2.1.22.1 Syntax
(variance sum-up-results-list)
20.2.1.22.2 Description
for regression tree, objective variable is numeric data.
20.2.1.23 Function: whole-row-numbers-list
20.2.1.23.1 Syntax
(whole-row-numbers-list data-vector)
20.2.1.23.2 Description
21 Package: clml.decision-tree.random-forest
- Uses: common-lisp, hjs.learn.read-data, clml.decision-tree.decision-tree
- Used by: clml.test
21.1 Description
random forest package
21.1.0.1 sample usage
RANDOM-FOREST(40): (setf *bc-train* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.train.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 338 POINTS RANDOM-FOREST(41):(setf *regression-forest* (make-regression-forest *bc-train* "Cell.size")) #((((("Class" . "malignant") NIL) ((9.0 . 2) (6.0 . 7) (7.0 . 12) (8.0 . 22) (5.0 . 20) (3.0 . 23) (4.0 . 25) (1.0 . 164) (2.0 . 32) (10.0 . 31)) ((335 327 322 321 320 319 318 314 312 310 ...) (337 336 334 333 332 331 330 329 328 326 ...))) (((# NIL) (# # # # # # # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# # #) (# # #))) (((# NIL) (# # # # #) (# #)) ((# # #) (# #) (# # #)) ((# # #) (# #) (# # #)))) (((("Cell.shape" . 6.0) NIL) ((9.0 . 1) (2.0 . 20) (5.0 . 16) (7.0 . 13) (4.0 . 16) (3.0 . 19) (10.0 . 20) (6.0 . 10) (8.0 . 22) (1.0 . 201)) ((335 326 325 317 316 314 312 311 307 299 ...) (337 336 334 333 332 331 330 329 328 327 ...))) (((# NIL) (# # # # # # #) (# #)) ((# # #) (# # #) (# #)) ((# # #) (# # #) (# # #))) (((# NIL) (# # # # # # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# # #) (# # #)))) (((("Epith.c.size" . 3.0) NIL) ((9.0 . 4) (2.0 . 16) (4.0 . 23) (7.0 . 9) (6.0 . 5) (3.0 . 24) (5.0 . 16) (10.0 . 17) (8.0 . 21) (1.0 . 203)) ((334 332 324 320 319 315 314 313 312 308 ...) (337 336 335 333 331 330 329 328 327 326 ...))) (((# NIL) (# # # # # # # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# # #) (# # #))) (((# NIL) (# # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# #) (# # #)))) ...) RANDOM-FOREST(42): (setf *query* #(5.0 "?" 1.0 1.0 2.0 1.0 3.0 1.0 1.0 "benign")) #(5.0 "?" 1.0 1.0 2.0 1.0 3.0 1.0 1.0 "benign") RANDOM-FOREST(43): (predict-regression-forest *query* *bc-train* *regression-forest*) 1.0172789943526082 RANDOM-FOREST(44): (setf *bc-test* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.test.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 345 POINTS RANDOM-FOREST(45): (regression-forest-validation *bc-test* "Cell.size" *regression-forest*) 1.6552628917521726
21.2 External Symbols
21.2.1 External Functions
21.2.1.1 Inherited Function: forest-validation
21.2.1.1.1 Syntax
(forest-validation validation-dataset objective-column-name forest)
21.2.1.1.2 Description
- return: CONS, validation result
- arguments:
- unspecialized-dataset : dataset for validation
- objective-variable-name
- forest
- comments : each element of returning association list represents that ((prediction . answer) . number).
21.2.1.2 Inherited Function: importance
21.2.1.2.1 Syntax
(importance forest)
21.2.1.2.2 Description
- importance of explanatory variables
- return: NIL
- arguments:
- forest
21.2.1.3 Inherited Function: make-random-forest
21.2.1.3.1 Syntax
(make-random-forest unspecialized-dataset objective-column-name &key (test #'delta-gini) (tree-number 500))
21.2.1.3.2 Description
- return: (SIMPLE-ARRAY T (* )), random forest consisting of unpruned decision trees
- arguments:
- unspecialized-dataset
- objective-variable-name
- test : delta-gini | delta-entropy , splitting criterion function, default is delta-gini
- tree-number : the number of decision trees, default is 500
- reference : Trevor Hastie, Robert Tibshirani and Jerome Friedman. The Elements of Statistical Learning:Data Mining, Inference, and Prediction
21.2.1.4 Inherited Function: make-regression-forest
21.2.1.4.1 Syntax
(make-regression-forest unspecialized-dataset objective-column-name &key (tree-number 500))
21.2.1.4.2 Description
21.2.1.5 Inherited Function: predict-forest
21.2.1.5.1 Syntax
(predict-forest query-vector unspecialized-dataset forest)
21.2.1.5.2 Description
- return: string, prediction
- arguments:
- query-vector
- unspecialized-dataset : dataset used to make a random forest
- forest
- comments : make predictions by a majority vote of decision trees in random forest.
21.2.1.6 Inherited Function: predict-regression-forest
21.2.1.6.1 Syntax
(predict-regression-forest query-vector unspecialized-dataset forest)
21.2.1.6.2 Description
21.2.1.7 Inherited Function: regression-forest-validation
21.2.1.7.1 Syntax
(regression-forest-validation validation-dataset objective-column-name regression-forest)
21.2.1.7.2 Description
22 Package: clml.docs
- Uses: common-lisp, iterate, cl-ppcre, clod
- Used by: None.
22.1 Description
API Documentation Generation System for CLML
22.2 External Symbols
22.2.1 External Functions
22.2.1.1 Function: generate-clml-api-docs
22.2.1.1.1 Syntax
(generate-clml-api-docs)
22.2.1.1.2 Description
Generates Org API documentation in the clml/docs/api directory from loaded packages for CLML for packages matching the following prefix patterns: +clml[.] +lapack +hjs +blas +future +fork-future
Documentation is in the form of Org files where one Org file per package is placed in clml/docs/api. A package index file containing Org INCLUDE directives that include Org placed generated in clml/docs/api.
23 Package: clml.graph.graph-anomaly-detection
- Uses: common-lisp, hjs.learn.vars, hjs.util.matrix, hjs.util.vector, hjs.util.meta, clml.statistics, hjs.learn.read-data, hjs.util.missing-value, clml.utility.csv, clml.time-series.util, clml.time-series.read-data, clml.time-series.statistics, clml.time-series.state-space, clml.time-series.autoregression, clml.graph.read-graph, clml.graph.graph-centrality, clml.graph.shortest-path
- Used by: None.
23.1 Description
23.2 External Symbols
24 Package: clml.graph.graph-centrality
- Uses: common-lisp, hjs.learn.vars, hjs.util.matrix, hjs.util.vector, hjs.util.meta, clml.statistics, clml.graph.read-graph, clml.graph.graph-utils, clml.graph.shortest-path
- Used by: clml.graph.graph-anomaly detection
24.1 Description
Graph Centrailty
24.1.0.1 sample usage
GRAPH-CENTRALITY(36): (setf gr (let* ((id-name-alist (loop for i from 1 to 6 collect (cons i (format nil "~A" i)))) (edgelist (list (list :nid1 1 :nid2 2 :weight 1d0) (list :nid1 2 :nid2 3 :weight 1d0) (list :nid1 2 :nid2 5 :weight 1d0) (list :nid1 4 :nid2 5 :weight 1d0) (list :nid1 5 :nid2 6 :weight 1d0) (list :nid1 6 :nid2 4 :weight 1d0)))) (make-simple-graph id-name-alist :edgelist edgelist :directed nil))) #<SIMPLE-GRAPH > 6 nodes 6 links GRAPH-CENTRALITY(37): (eccentricity-centrality gr) #(0.3333333333333333 0.5 0.3333333333333333 0.3333333333333333 0.5 0.3333333333333333) GRAPH-CENTRALITY(38): (closeness-centrality gr) #(0.09090909090909091 0.14285714285714285 0.09090909090909091 0.1 0.14285714285714285 0.1) GRAPH-CENTRALITY(39): (degree-centrality gr) #(1.0 3.0 1.0 2.0 3.0 2.0) GRAPH-CENTRALITY(40): (eigen-centrality gr) #(0.18307314221469623 0.41711633875524184 0.18307314221469628 0.45698610699552694 0.5842172585338801 0.45698610699552716) 2.2784136094964444 GRAPH-CENTRALITY(41): (pagerank gr) #(0.22515702990803205 0.5915609362243119 0.22515702990803205 0.3631199718377685 0.5338090057356462 0.3631199718377685)
24.2 External Symbols
24.2.1 External Functions
24.2.1.1 Function: closeness-centrality
24.2.1.1.1 Syntax
(closeness-centrality g &key (standardize nil))
24.2.1.1.2 Description
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* )), vector of centraliry
- argument:
- graph: return value of #'make-simple-graph
- standardize: t | nil, standardize centrality or not
24.2.1.2 Function: degree-centrality
24.2.1.2.1 Syntax
(degree-centrality g &key (mode in) (standardize nil))
24.2.1.2.2 Description
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* )), vector of centraliry
- argument:
- graph: return value of #'make-simple-graph
- mode: :in | :out
- standardize: t | nil, standardize centrality or not
24.2.1.3 Function: eccentricity-centrality
24.2.1.3.1 Syntax
(eccentricity-centrality g)
24.2.1.3.2 Description
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* )), vector of centraliry
- argument:
- graph: return value of #'make-simple-graph
24.2.1.4 Function: eigen-centrality
24.2.1.4.1 Syntax
(eigen-centrality gr &key (stabilizer nil))
24.2.1.4.2 Description
24.2.1.5 Function: pagerank
24.2.1.5.1 Syntax
(pagerank g &key (c 0.85))
24.2.1.5.2 Description
- return: (SIMPLE-ARRAY DOUBLE-FLOAT (* )), vector of centraliry
- argument:
- graph: return value of #'make-simple-graph
- c : ratio for transition probability matrix
The separation / directed graph, principal eigen vector is not determined because it is not often a strong connection. Order to strongly connected to it, it is assumed that the link of small weight among all the nodes of the transition probability matrix in pagerank. The parameter for adjusting the weight, the weight decreases as large, the transition probability of the actual link is priority c.
- reference: L. Page, S. Brin, R. Motwani, T. Winograd The PageRank citation ranking: Bringing order to the web. 1999
25 Package: clml.graph.graph-utils
- Uses: common-lisp, org.mapcar.parse-number, hjs.util.matrix, hjs.util.vector, hjs.util.meta, clml.graph.read-graph
- Used by: clml.graph.graph-centrality, clml.graph.shortest-path
25.1 Description
25.2 External Symbols
25.2.1 External Functions
25.2.1.1 Function: adjacency
25.2.1.1.1 Syntax
(adjacency nd gr)
25.2.1.1.2 Description
25.2.1.2 Function: adjacency-matrix
25.2.1.2.1 Syntax
(adjacency-matrix gr)
25.2.1.2.2 Description
25.2.1.3 Function: get-connected-components
25.2.1.3.1 Syntax
(get-connected-components gr)
25.2.1.3.2 Description
25.2.1.4 Function: retrieve-link
25.2.1.4.1 Syntax
(retrieve-link gr nid1-or-name nid2-or-name)
25.2.1.4.2 Description
25.2.1.5 Function: retrieve-node
25.2.1.5.1 Syntax
(retrieve-node gr id-or-name)
25.2.1.5.2 Description
26 Package: clml.graph.read-graph
- Uses: common-lisp, org.mapcar.parse-number, hjs.util.matrix, hjs.util.vector, hjs.util.meta
- Used by: clml.graph.graph-anomaly detection, clml.graph.graph centrality, clml.graph.shortest-path, clml.graph.graph-utils
26.1 Description
26.2 External Symbols
26.2.1 External Classes
26.2.1.1 Class: simple-graph
26.2.1.1.1 Inheritance
- Parent classes: graph
- Precedence list: simple-graph, graph, standard-object, slot-object, t
- Direct subclasses: None.
26.2.1.1.2 Description
26.2.1.1.3 Direct Slots
links
- Value type:
t
- Initial value:
NIL
- Initargs: links
- Allocation: instance
links
(links object)
- (
links
(simple-graphclml.graph.read graph:simple-graph
))
link-hashtab
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE :TEST #'EQUAL)
- Initargs: none
- Allocation: instance
link-hashtab
(link-hashtab object)
- (
link-hashtab
(simple-graphclml.graph.read-graph:simple-graph
))
directed-p
- Value type:
t
- Initial value:
NIL
- Initargs: directed-p
- Allocation: instance
directed-p
(directed-p object)
- (
directed-p
(simple-graphclml.graph.read-graph:simple-graph
))
26.2.1.1.4 Indirect Slots
node-hashtab
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE :TEST #'EQL)
- Initargs: none
- Allocation: instance
nodes
- Value type:
t
- Initial value:
NIL
- Initargs: nodes
- Allocation: instance
26.2.1.2 Class: simple-graph-series
26.2.1.2.1 Inheritance
- Parent classes: standard-object
- Precedence list: simple-graph-series, standard-object, slot-object, t
- Direct subclasses: None.
26.2.1.2.2 Description
26.2.1.2.3 Direct Slots
graphs
- Value type:
t
- Initial value:
NIL
- Initargs: graphs
- Allocation: instance
graphs
(graphs object)
- (
graphs
(simple-graph-seriesclml.graph.read-graph:simple-graph-series
))
graph-labels
- Value type:
t
- Initial value:
NIL
- Initargs: graph-labels
- Allocation: instance
graph-labels
(graph-labels object)
- (
graph-labels
(simple-graph-seriesclml.graph.read-graph:simple-graph-series
))
26.2.2 External Structures
26.2.2.1 Structure: link
26.2.2.1.1 Description
26.2.2.1.2 Slots
weight
- Value type:
double-float
- Initial value:
1.0
- Initargs: none
- Allocation: instance
node1
- Value type:
fixnum
- Initial value:
-1
- Initargs: none
- Allocation: instance
node2
- Value type:
fixnum
- Initial value:
-1
- Initargs: none
- Allocation: instance
directed
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
26.2.2.2 Structure: node
26.2.2.2.1 Description
26.2.2.2.2 Slots
id
- Value type:
fixnum
- Initial value:
-1
- Initargs: none
- Allocation: instance
name
- Value type:
string
- Initial value: =""=
- Initargs: none
- Allocation: instance
links
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
buff
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
26.2.3 External Macros
26.2.3.1 Macro: do-graph-series
26.2.3.1.1 Syntax
(do-graph-series ((gr label) stream &key (format sexp) (directed nil) (start 0) (end nil) (start-label nil) (end-label nil) (target-labels nil) (target-nodes nil)) &body body)
26.2.3.1.2 Description
Repeatedly call BODY on Graph-Series stream STREAM, binding GR and LABEL to a class SIMPLE-GRAPH and the label string.
26.2.4 External Functions
26.2.4.1 Function: directed-p
26.2.4.1.1 Syntax
(directed-p object)
26.2.4.1.2 Description
26.2.4.2 Function: graphs
26.2.4.2.1 Syntax
(graphs object)
26.2.4.2.2 Description
26.2.4.3 Function: link-directed
26.2.4.3.1 Syntax
(link-directed instance)
26.2.4.3.2 Description
26.2.4.4 Function: link-node1
26.2.4.4.1 Syntax
(link-node1 instance)
26.2.4.4.2 Description
26.2.4.5 Function: link-node2
26.2.4.5.1 Syntax
(link-node2 instance)
26.2.4.5.2 Description
26.2.4.6 Function: link-weight
26.2.4.6.1 Syntax
(link-weight instance)
26.2.4.6.2 Description
26.2.4.7 Function: links
26.2.4.7.1 Syntax
(links object)
26.2.4.7.2 Description
26.2.4.8 Function: make-simple-graph
26.2.4.8.1 Syntax
(make-simple-graph id-name-alist &key (adjacency-matrix nil) (edgelist nil) (directed nil))
26.2.4.8.2 Description
- argument:
- id-name-alist : association list of node's ID and name. ID is a positive integer, there are no gaps.
- edgelist : list of plist, plist is like (:nid1 <initial-vertex-ID> :nid2 <terminal-vertex-ID> :weight <weight-for-edge>)
- directed : t | nil, the graph is directed or not.
READ-GRAPH(19): (let* ((id-name-alist (loop for i from 1 to 6 collect (cons i (format nil "~A" i)))) (edgelist (list (list :nid1 1 :nid2 2 :weight 1d0) (list :nid1 2 :nid2 3 :weight 1d0) (list :nid1 2 :nid2 5 :weight 1d0) (list :nid1 4 :nid2 5 :weight 1d0) (list :nid1 5 :nid2 6 :weight 1d0) (list :nid1 6 :nid2 4 :weight 1d0)))) (make-simple-graph id-name-alist :edgelist edgelist :directed nil)) #<SIMPLE-GRAPH > 6 nodes 6 links
26.2.4.9 Function: node-buff
26.2.4.9.1 Syntax
(node-buff instance)
26.2.4.9.2 Description
26.2.4.10 Function: node-id
26.2.4.10.1 Syntax
(node-id instance)
26.2.4.10.2 Description
26.2.4.11 Function: node-links
26.2.4.11.1 Syntax
(node-links instance)
26.2.4.11.2 Description
26.2.4.12 Function: node-name
26.2.4.12.1 Syntax
(node-name instance)
26.2.4.12.2 Description
26.2.4.13 Function: nodes
26.2.4.13.1 Syntax
(nodes object)
26.2.4.13.2 Description
26.2.4.14 Function: read-graph
26.2.4.14.1 Syntax
(read-graph fname &key (format sexp) (directed nil) (external-format default) (id-name-alist nil) (labelp nil))
26.2.4.14.2 Description
26.2.4.15 Function: read-graph-series
26.2.4.15.1 Syntax
(read-graph-series fname &key (format sexp) (directed nil) (external-format default) (start 0) (end nil) (start-label nil) (end-label nil) (target-labels nil) (target-nodes nil))
26.2.4.15.2 Description
26.3 Ambiguous Symbols
26.3.1 Read-Graph
Disambiguation.
- Function:
clml.graph.read-graph:read-graph
- Package:
clml.graph.read-graph:read-graph
27 Package: clml.graph.shortest-path
- Uses: common-lisp, hjs.util.meta, hjs.util.vector, hjs.learn.read-data, hjs.util.matrix, clml.graph.read-graph, clml.graph.graph-utils, clml.utility.priority-que, hjs.util.missing-value
- Used by: clml.graph.graph-anomaly detection, clml.graph.graph centrality
27.1 Description
27.2 External Symbols
27.2.1 External Functions
27.2.1.1 Function: %find-all-shortest-paths
27.2.1.1.1 Syntax
(%find-all-shortest-paths d-mat path-mat start-i dest-i &key (d-thld nil))
27.2.1.1.2 Description
27.2.1.2 Function: find-shortest-path-dijkstra
27.2.1.2.1 Syntax
(find-shortest-path-dijkstra gr start-id-or-name &key (end-id-or-name nil) (data-structure binary))
27.2.1.2.2 Description
27.2.1.3 Function: graph-distance-matrix
27.2.1.3.1 Syntax
(graph-distance-matrix gr &optional (path-mat-p))
27.2.1.3.2 Description
28 Package: clml.nearest-search.k-nn
- Uses: common-lisp, hjs.util.vector, hjs.learn.read-data, hjs.util.meta
- Used by: None.
28.1 Description
28.1.0.1 sample usage
RANDOM-FOREST(40): (setf *bc-train* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.train.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 338 POINTS RANDOM-FOREST(41):(setf *regression-forest* (make-regression-forest *bc-train* "Cell.size")) #((((("Class" . "malignant") NIL) ((9.0 . 2) (6.0 . 7) (7.0 . 12) (8.0 . 22) (5.0 . 20) (3.0 . 23) (4.0 . 25) (1.0 . 164) (2.0 . 32) (10.0 . 31)) ((335 327 322 321 320 319 318 314 312 310 ...) (337 336 334 333 332 331 330 329 328 326 ...))) (((# NIL) (# # # # # # # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# # #) (# # #))) (((# NIL) (# # # # #) (# #)) ((# # #) (# #) (# # #)) ((# # #) (# #) (# # #)))) (((("Cell.shape" . 6.0) NIL) ((9.0 . 1) (2.0 . 20) (5.0 . 16) (7.0 . 13) (4.0 . 16) (3.0 . 19) (10.0 . 20) (6.0 . 10) (8.0 . 22) (1.0 . 201)) ((335 326 325 317 316 314 312 311 307 299 ...) (337 336 334 333 332 331 330 329 328 327 ...))) (((# NIL) (# # # # # # #) (# #)) ((# # #) (# # #) (# #)) ((# # #) (# # #) (# # #))) (((# NIL) (# # # # # # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# # #) (# # #)))) (((("Epith.c.size" . 3.0) NIL) ((9.0 . 4) (2.0 . 16) (4.0 . 23) (7.0 . 9) (6.0 . 5) (3.0 . 24) (5.0 . 16) (10.0 . 17) (8.0 . 21) (1.0 . 203)) ((334 332 324 320 319 315 314 313 312 308 ...) (337 336 335 333 331 330 329 328 327 326 ...))) (((# NIL) (# # # # # # # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# # #) (# # #))) (((# NIL) (# # # # #) (# #)) ((# # #) (# # #) (# # #)) ((# # #) (# #) (# # #)))) ...) RANDOM-FOREST(42): (setf *query* #(5.0 "?" 1.0 1.0 2.0 1.0 3.0 1.0 1.0 "benign")) #(5.0 "?" 1.0 1.0 2.0 1.0 3.0 1.0 1.0 "benign") RANDOM-FOREST(43): (predict-regression-forest *query* *bc-train* *regression-forest*) 1.0172789943526082 RANDOM-FOREST(44): (setf *bc-test* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.test.csv") :type :csv :csv-type-spec (append (loop for i below 9 collect 'double-float) '(string)))) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 345 POINTS RANDOM-FOREST(45): (regression-forest-validation *bc-test* "Cell.size" *regression-forest*) 1.6552628917521726
28.1.0.2 note
When target, the objective variable's type is string, discriminant analysis is used, when type is number, regression analysis is used. In the case of discriminant analysis, the number of self-misjudgement from self analysis is displayed.
28.2 External Symbols
28.2.1 External Functions
28.2.1.1 Function: estimator-properties
28.2.1.1.1 Syntax
(estimator-properties est &key verbose)
28.2.1.1.2 Description
28.2.1.2 Function: k-nn-analyze
28.2.1.2.1 Syntax
(k-nn-analyze learning-data k target explanatories &key (distance euclid) target-type use-weight weight-init normalize)
28.2.1.2.2 Description
28.2.1.3 Function: k-nn-estimate
28.2.1.3.1 Syntax
(k-nn-estimate estimator in-data)
28.2.1.3.2 Description
29 Package: clml.nearest-search.k-nn-new
- Uses: common-lisp, hjs.util.vector, hjs.learn.read-data, hjs.util.meta, clml.nearest-search.nearest
- Used by: None.
29.1 Description
29.1.0.1 note
When target, the objective variable's type is string, discriminant analysis is used, when type is number, regression analysis is used. In the case of discriminant analysis, the number of self-misjudgement from self analysis is displayed.
29.2 External Symbols
29.2.1 External Functions
29.2.1.1 Function: estimator-properties
29.2.1.1.1 Syntax
(estimator-properties est &key verbose)
29.2.1.1.2 Description
- return: <list>, property list
- arguments:
- estimator : <k-nn-estimator>
- verbose: nil | t, default is nil
- comment: Get k-nn-estimator's properties. If verbose is t, all accessor of k-nn-estimator would be extracted.
29.2.1.2 Function: k-nn-analyze
29.2.1.2.1 Syntax
(k-nn-analyze learning-data k target explanatories &key (distance euclid) target-type use-weight weight-init normalize (nns-type naive) nns-args)
29.2.1.2.2 Description
&key (distance :euclid) target-type use-weight weight-init normalize)
- return: <k-nn-estimator>
- arguments:
- learning-data : <unspecialized-dataset>
- k : <integer>
- target : <string>
- explanatories : <list string> | :all
- distance : :euclid | :manhattan | a function object
- distance now can be a function object, it will be regarded as a user-specified distance function.
- A distance function must accept 3 arguments: vector1, vector2
and profiles. profiles is a list whose elements are
either :numeric or :delta,
:numeric indicates the dimension is of numeric values and :delta indicates the dimension is of categorical values. It's totally fine to ignore profiles if users know exactly what their data is about.
- target-type : :numeric | :category | nil
- :numeric means regression analysis
- :category means classification analysis
- when nil, the target type will be automatically determined by the type of data.
- use-weight : nil | :class | :data
- weight-init :
- if use-weight is :class, it's an assoc-list of form ((class-name . weight) …)
- if use-weight is :data, then a vector of weight, a list of weight or a column name of input data are allowable. When a column name is passed in, the element in the column is treated as weight.
- normalize : t | nil
29.2.1.3 Function: k-nn-estimate
29.2.1.3.1 Syntax
(k-nn-estimate estimator in-data)
29.2.1.3.2 Description
- return: <unspecialized-dataset>, estimated result\ The column named
30 Package: clml.nearest-search.nearest
- Uses: common-lisp, hjs.learn.read-data, hjs.util.vector, hjs.util.meta, clml.nonparameteric.statistics, hjs.util.matrix, clml.pca, clml.utility.priority-que
- Used by: clml.clustering.optics-speed, clml.nearest-search.k-nn-new
30.1 Description
30.2 External Symbols
30.2.1 External Classes
30.2.1.1 Class: cosine-locality-sensitive-hashing
30.2.1.1.1 Inheritance
- Parent classes: locality-sensitive-hashing
- Precedence list: cosine-locality-sensitive-hashing, locality-sensitive-hashing, stochastic-nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: None.
30.2.1.1.2 Description
30.2.1.1.3 Direct Slots
30.2.1.1.4 Indirect Slots
candidates
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
- Initargs: none
- Allocation: instance
hash-fns
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hash-bit
- Value type:
t
- Initial value:
NIL
- Initargs: k
- Allocation: instance
hash-length
- Value type:
t
- Initial value:
NIL
- Initargs: l
- Allocation: instance
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.2 Class: euclid-locality-sensitive-hashing
30.2.1.2.1 Inheritance
- Parent classes: p-stable-locality-sensitive hashing
- Precedence list: euclid-locality-sensitive-hashing, p-stable-locality-sensitive hashing, locality-sensitive-hashing, stochastic-nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: None.
30.2.1.2.2 Description
30.2.1.2.3 Direct Slots
30.2.1.2.4 Indirect Slots
w
- Value type:
t
- Initial value:
NIL
- Initargs: w
- Allocation: instance
candidates
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
- Initargs: none
- Allocation: instance
hash-fns
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hash-bit
- Value type:
t
- Initial value:
NIL
- Initargs: k
- Allocation: instance
hash-length
- Value type:
t
- Initial value:
NIL
- Initargs: l
- Allocation: instance
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.3 Class: exact-nearest-search
30.2.1.3.1 Inheritance
- Parent classes: nearest-search
- Precedence list: exact-nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: m-tree-search, kd-tree search, naive-nearest-search
30.2.1.3.2 Description
30.2.1.3.3 Direct Slots
30.2.1.3.4 Indirect Slots
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.4 Class: kd-tree-search
30.2.1.4.1 Inheritance
- Parent classes: exact-nearest-search
- Precedence list: kd-tree-search, exact nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: None.
30.2.1.4.2 Description
30.2.1.4.3 Direct Slots
root-node
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
root-node
(root-node object)
- (
root-node
(m-tree-searchclml.nearest-search.nearest:m-tree-search
)) - (
root-node
(kd-tree-searchclml.nearest-search.nearest:kd-tree-search
))
compare-v
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
compare-v
(compare-v object)
- (
compare-v
(kd-tree-searchclml.nearest-search.nearest:kd-tree-search
))
upper-bounds
- Value type:
t
- Initial value:
NIL
- Initargs: upper-bounds
- Allocation: instance
upper-bounds
(upper-bounds object)
- (
upper-bounds
(kd-tree-searchclml.nearest-search.nearest:kd-tree-search
))
lower-bounds
- Value type:
t
- Initial value:
NIL
- Initargs: lower-bounds
- Allocation: instance
lower-bounds
(lower-bounds object)
- (
lower-bounds
(kd-tree-searchclml.nearest-search.nearest:kd-tree-search
))
30.2.1.4.4 Indirect Slots
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.5 Class: locality-sensitive-hashing
30.2.1.5.1 Inheritance
- Parent classes: stochastic-nearest-search
- Precedence list: locality-sensitive-hashing, stochastic-nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: simhash, spectral-hashing, cosine-locality-sensitive-hashing, p-stable-locality-sensitive hashing
30.2.1.5.2 Description
30.2.1.5.3 Direct Slots
hash-length
- Value type:
t
- Initial value:
NIL
- Initargs: l
- Allocation: instance
hash-length
(hash-length object)
- (
hash-length
(locality-sensitive-hashingclml.nearest-search.nearest:locality-sensitive hashing
))
hash-bit
- Value type:
t
- Initial value:
NIL
- Initargs: k
- Allocation: instance
hash-bit
(hash-bit object)
- (
hash-bit
(locality-sensitive-hashingclml.nearest-search.nearest:locality-sensitive hashing
))
hash-fns
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hash-fns
(hash-fns object)
- (
hash-fns
(locality-sensitive-hashingclml.nearest-search.nearest:locality-sensitive hashing
))
candidates
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
- Initargs: none
- Allocation: instance
candidates
(candidates object)
- (
candidates
(locality-sensitive-hashingclml.nearest-search.nearest:locality-sensitive hashing
))
30.2.1.5.4 Indirect Slots
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.6 Class: m-tree-search
30.2.1.6.1 Inheritance
- Parent classes: exact-nearest-search
- Precedence list: m-tree-search, exact nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: None.
30.2.1.6.2 Description
30.2.1.6.3 Direct Slots
root-node
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
root-node
(root-node object)
- (
root-node
(m-tree-searchclml.nearest-search.nearest:m-tree-search
)) - (
root-node
(kd-tree-searchclml.nearest-search.nearest:kd-tree-search
))
m
- Value type:
t
- Initial value:
NIL
- Initargs: m
- Allocation: instance
m-tree-size
(m-tree-size object)
- (
m-tree-size
(m-tree-searchclml.nearest-search.nearest:m-tree-search
))
pivot
- Value type:
t
- Initial value:
NIL
- Initargs: pivot
- Allocation: instance
priority-queue
- Value type:
t
- Initial value:
:BINOMIAL
- Initargs: priority-queue
- Allocation: instance
30.2.1.6.4 Indirect Slots
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.7 Class: manhattan-locality-sensitive-hashing
30.2.1.7.1 Inheritance
- Parent classes: p-stable-locality-sensitive hashing
- Precedence list: manhattan-locality-sensitive hashing, p-stable-locality sensitive-hashing, locality-sensitive hashing, stochastic-nearest-search, nearest-search, standard object, slot-object, t
- Direct subclasses: None.
30.2.1.7.2 Description
30.2.1.7.3 Direct Slots
30.2.1.7.4 Indirect Slots
w
- Value type:
t
- Initial value:
NIL
- Initargs: w
- Allocation: instance
candidates
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
- Initargs: none
- Allocation: instance
hash-fns
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hash-bit
- Value type:
t
- Initial value:
NIL
- Initargs: k
- Allocation: instance
hash-length
- Value type:
t
- Initial value:
NIL
- Initargs: l
- Allocation: instance
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.8 Class: naive-nearest-search
30.2.1.8.1 Inheritance
- Parent classes: exact-nearest-search
- Precedence list: naive-nearest-search, exact-nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: None.
30.2.1.8.2 Description
30.2.1.8.3 Direct Slots
30.2.1.8.4 Indirect Slots
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.9 Class: nearest-search
30.2.1.9.1 Inheritance
- Parent classes: standard-object
- Precedence list: nearest-search, standard object, slot-object, t
- Direct subclasses: stochastic-nearest-search, exact-nearest-search
30.2.1.9.2 Description
30.2.1.9.3 Direct Slots
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
nns-input-data
(nns-input-data object)
- (
nns-input-data
(nearest-searchclml.nearest-search.nearest:nearest-search
))
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
nns-input-key
(nns-input-key object)
- (
nns-input-key
(nearest-searchclml.nearest-search.nearest:nearest-search
))
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
nns-distance
(nns-distance object)
- (
nns-distance
(nearest-searchclml.nearest-search.nearest:nearest-search
))
30.2.1.10 Class: p-stable-locality-sensitive-hashing
30.2.1.10.1 Inheritance
- Parent classes: locality-sensitive-hashing
- Precedence list: p-stable-locality-sensitive hashing, locality-sensitive-hashing, stochastic-nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: manhattan-locality-sensitive hashing, euclid-locality-sensitive hashing
30.2.1.10.2 Description
30.2.1.10.3 Direct Slots
w
- Value type:
t
- Initial value:
NIL
- Initargs: w
- Allocation: instance
plsh-w
(plsh-w object)
- (
plsh-w
(p-stable-locality-sensitive-hashingclml.nearest-search.nearest:p-stable-locality sensitive-hashing
))
30.2.1.10.4 Indirect Slots
candidates
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
- Initargs: none
- Allocation: instance
hash-fns
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hash-bit
- Value type:
t
- Initial value:
NIL
- Initargs: k
- Allocation: instance
hash-length
- Value type:
t
- Initial value:
NIL
- Initargs: l
- Allocation: instance
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.1.11 Class: stochastic-nearest-search
30.2.1.11.1 Inheritance
- Parent classes: nearest-search
- Precedence list: stochastic-nearest-search, nearest-search, standard-object, slot-object, t
- Direct subclasses: locality-sensitive-hashing
30.2.1.11.2 Description
30.2.1.11.3 Direct Slots
30.2.1.11.4 Indirect Slots
distance
- Value type:
t
- Initial value:
#'EUCLID-DISTANCE
- Initargs: distance
- Allocation: instance
input-key
- Value type:
t
- Initial value:
#'IDENTITY
- Initargs: input-key
- Allocation: instance
input-data
- Value type:
t
- Initial value:
NIL
- Initargs: input-data
- Allocation: instance
30.2.2 External Functions
30.2.2.1 Function: find-nearest
30.2.2.1.1 Syntax
(find-nearest nearest-search data)
30.2.2.1.2 Description
find a nearest point from data
30.2.2.2 Function: find-nearest-epsilon
30.2.2.2.1 Syntax
(find-nearest-epsilon nearest-search data epsilon &optional result)
30.2.2.2.2 Description
find points within distance epsilon from data
30.2.2.3 Function: find-nearest-k
30.2.2.3.1 Syntax
(find-nearest-k nearest-search data k &optional result tmp-distances)
30.2.2.3.2 Description
find nearest k points from data
30.2.2.4 Function: initialize-search
30.2.2.4.1 Syntax
(initialize-search nearest-search)
30.2.2.4.2 Description
learn or construct data structure of nearest-search
30.2.2.5 Function: nns-distance
30.2.2.5.1 Syntax
(nns-distance object)
30.2.2.5.2 Description
30.2.2.6 Function: nns-input-data
30.2.2.6.1 Syntax
(nns-input-data object)
30.2.2.6.2 Description
30.2.2.7 Function: nns-input-key
30.2.2.7.1 Syntax
(nns-input-key object)
30.2.2.7.2 Description
30.2.2.8 Function: stochastic-validation
30.2.2.8.1 Syntax
(stochastic-validation search test-dataset &optional (k) (epsilon))
30.2.2.8.2 Description
31 Package: clml.nonparameteric.statistics
- Uses: common-lisp, hjs.util.matrix, hjs.util.vector, hjs.util.meta
- Used by: clml.nearest-search.nearest, clml.nonparametric.lfm, clml.nonparametric.ftm, clml.nonparametric.hdp-hmm, clml.nonparametric.ihmm, clml.nonparametric.blocked-hdp-hmm, clml.nonparametric.sticky-hdp hmm, clml.nonparametric.hdp, clml.nonparametric.hdp-lda, clml.nonparametric.dpm
31.1 Description
31.2 External Symbols
31.2.1 External Constants
31.2.1.1 Inherited Constant: *most-negative-exp-able-float*
31.2.1.1.1 Value
-744.4400719213812
Type: double-float
31.2.1.1.2 Description
31.2.1.2 Inherited Constant: *most-positive-exp-able-float*
31.2.1.2.1 Value
709.782712893384
Type: double-float
31.2.1.2.2 Description
31.2.2 External Global Variables
31.2.2.1 Variable: *randomize-trace*
31.2.2.1.1 Value
NIL
Type: null
31.2.2.1.2 Description
31.2.3 External Macros
31.2.3.1 Macro: make-adarray
31.2.3.1.1 Syntax
(make-adarray dim &rest args)
31.2.3.1.2 Description
31.2.3.2 Macro: safe-exp
31.2.3.2.1 Syntax
(safe-exp x)
31.2.3.2.2 Description
31.2.3.3 Macro: safe-expt
31.2.3.3.1 Syntax
(safe-expt base power)
31.2.3.3.2 Description
31.2.4 External Functions
31.2.4.1 Function: %multivariate-normal-density
31.2.4.1.1 Syntax
(%multivariate-normal-density averages inv-sqrt-sigma dvec)
31.2.4.1.2 Description
31.2.4.2 Function: %multivariate-normal-logged-density
31.2.4.2.1 Syntax
(%multivariate-normal-logged-density averages inv-sqrt-sigma dvec)
31.2.4.2.2 Description
31.2.4.3 Function: bernoulli
31.2.4.3.1 Syntax
(bernoulli)
31.2.4.3.2 Description
31.2.4.4 Function: beta-function
31.2.4.4.1 Syntax
(beta-function)
31.2.4.4.2 Description
31.2.4.5 Function: beta-random
31.2.4.5.1 Syntax
(beta-random)
31.2.4.5.2 Description
31.2.4.6 Function: binomial-random
31.2.4.6.1 Syntax
(binomial-random)
31.2.4.6.2 Description
31.2.4.7 Function: cauchy-random
31.2.4.7.1 Syntax
(cauchy-random)
31.2.4.7.2 Description
31.2.4.8 Function: chi-square-random
31.2.4.8.1 Syntax
(chi-square-random k)
31.2.4.8.2 Description
31.2.4.9 Function: cholesky-decomp
31.2.4.9.1 Syntax
(cholesky-decomp mat &optional (result (make-array (array-dimensions mat) element-type 'double-float initial-element 0.0) result-passed-p))
31.2.4.9.2 Description
31.2.4.10 Function: crossproduct
31.2.4.10.1 Syntax
(crossproduct mat &optional result)
31.2.4.10.2 Description
31.2.4.11 Function: digamma
31.2.4.11.1 Syntax
(digamma)
31.2.4.11.2 Description
31.2.4.12 Function: dirichlet-random
31.2.4.12.1 Syntax
(dirichlet-random)
31.2.4.12.2 Description
31.2.4.13 Function: exp-random
31.2.4.13.1 Syntax
(exp-random)
31.2.4.13.2 Description
31.2.4.14 Function: gamma-function
31.2.4.14.1 Syntax
(gamma-function x)
31.2.4.14.2 Description
31.2.4.15 Function: gamma-random
31.2.4.15.1 Syntax
(gamma-random)
31.2.4.15.2 Description
31.2.4.16 Function: get-n-best
31.2.4.16.1 Syntax
(get-n-best row n)
31.2.4.16.2 Description
31.2.4.17 Function: jackup-logged-prob
31.2.4.17.1 Syntax
(jackup-logged-prob)
31.2.4.17.2 Description
31.2.4.18 Function: loggamma
31.2.4.18.1 Syntax
(loggamma)
31.2.4.18.2 Description
31.2.4.19 Function: lued-wishart-random
31.2.4.19.1 Syntax
(lued-wishart-random df dim)
31.2.4.19.2 Description
31.2.4.20 Function: map-matrix-cell
31.2.4.20.1 Syntax
(map-matrix-cell fn dmat)
31.2.4.20.2 Description
31.2.4.21 Function: map-matrix-cell!
31.2.4.21.1 Syntax
(map-matrix-cell! fn dmat)
31.2.4.21.2 Description
31.2.4.22 Function: multivariate-normal-density
31.2.4.22.1 Syntax
(multivariate-normal-density averages sqrt-sigma dvec)
31.2.4.22.2 Description
31.2.4.23 Function: multivariate-normal-logged-density
31.2.4.23.1 Syntax
(multivariate-normal-logged-density averages sqrt-sigma dvec)
31.2.4.23.2 Description
31.2.4.24 Function: multivariate-normal-random
31.2.4.24.1 Syntax
(multivariate-normal-random averages sqrt-sigma &optional result)
31.2.4.24.2 Description
31.2.4.25 Function: normal-density
31.2.4.25.1 Syntax
(normal-density)
31.2.4.25.2 Description
31.2.4.26 Internal Function: normal-random
31.2.4.26.1 Syntax
(normal-random)
31.2.4.26.2 Description
31.2.4.27 Function: normalize!
31.2.4.27.1 Syntax
(normalize! vector)
31.2.4.27.2 Description
31.2.4.28 Function: outer-product
31.2.4.28.1 Syntax
(outer-product x y)
31.2.4.28.2 Description
31.2.4.29 Function: random-elt
31.2.4.29.1 Syntax
(random-elt array)
31.2.4.29.2 Description
31.2.4.30 Function: randomize-choice
31.2.4.30.1 Syntax
(randomize-choice)
31.2.4.30.2 Description
31.2.4.31 Function: randomize-slice
31.2.4.31.1 Syntax
(randomize-slice)
31.2.4.31.2 Description
31.2.4.32 Function: shuffle-vector
31.2.4.32.1 Syntax
(shuffle-vector v)
31.2.4.32.2 Description
Return vector with elements shuffled
31.2.4.33 Function: stirling-number
31.2.4.33.1 Syntax
(stirling-number n m)
31.2.4.33.2 Description
31.2.4.34 Function: trigamma
31.2.4.34.1 Syntax
(trigamma)
31.2.4.34.2 Description
31.2.4.35 Function: unit-random
31.2.4.35.1 Syntax
(unit-random)
31.2.4.35.2 Description
A random number in the range (0, 1].
32 Package: clml.nonparametric.dpm
- Uses: common-lisp, hjs.util.meta, hjs.util.matrix, hjs.util.vector, clml.nonparameteric.statistics
- Used by: clml.nonparametric.lfm, clml.nonparametric.ftm, clml.nonparametric.hdp-hmm, clml.nonparametric.ihmm, clml.nonparametric.blocked-hdp-hmm, clml.nonparametric.sticky-hdp hmm, clml.nonparametric.hdp
32.1 Description
32.2 External Symbols
32.2.1 External Classes
32.2.1.1 Inherited Class: cluster
32.2.1.1.1 Inheritance
- Parent classes: standard-object
- Precedence list: cluster, standard-object, slot-object, t
- Direct subclasses: ftm-topic, hdp-cluster, gaussian-cluster
32.2.1.1.2 Description
32.2.1.1.3 Direct Slots
num
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
cluster-size
(cluster-size object)
- (
cluster-size
(clusterclml.nonparametric.dpm:cluster
))
32.2.1.2 Class: dp-distribution
32.2.1.2.1 Inheritance
- Parent classes: standard-object
- Precedence list: dp-distribution, standard object, slot-object, t
- Direct subclasses: ftm-uniform, hdp distribution, dp-gaussian
32.2.1.2.2 Description
32.2.1.2.3 Direct Slots
cluster-class
- Value type:
t
- Initial value: ='CLML.NONPARAMETRIC.DPM:CLUSTER=
- Initargs: none
- Allocation: instance
cluster-class
(cluster-class object)
- (
cluster-class
(dp-distributionclml.nonparametric.dpm:dp-distribution
))
32.2.1.3 Class: dp-gaussian
32.2.1.3.1 Inheritance
- Parent classes: dp-distribution
- Precedence list: dp-gaussian, dp-distribution, standard-object, slot-object, t
- Direct subclasses: state-gaussian, multivar-dp-gaussian
32.2.1.3.2 Description
32.2.1.3.3 Direct Slots
cluster-class
- Value type:
t
- Initial value: ='CLML.NONPARAMETRIC.DPM:GAUSSIAN-CLUSTER=
- Initargs: none
- Allocation: instance
ave
- Value type:
t
- Initial value:
0.0
- Initargs: ave
- Allocation: instance
average-of-average
(average-of-average object)
- (
average-of-average
(dp-gaussianclml.nonparametric.dpm:dp-gaussian
))
std
- Value type:
t
- Initial value:
1.0
- Initargs: std
- Allocation: instance
std-of-average
(std-of-average object)
- (
std-of-average
(dp-gaussianclml.nonparametric.dpm:dp-gaussian
))
32.2.1.4 Class: dpm
32.2.1.4.1 Inheritance
- Parent classes: standard-object
- Precedence list: dpm, standard-object, slot-object, t
- Direct subclasses: ftm, hdp, gauss-dpm, logged-dpm
32.2.1.4.2 Description
32.2.1.4.3 Direct Slots
dpm-k
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
dpm-k
(dpm-k object)
- (
dpm-k
(dpmclml.nonparametric.dpm:dpm
))
base-distribution
- Value type:
t
- Initial value:
NIL
- Initargs: base-distribution
- Allocation: instance
dpm-base
(dpm-base object)
- (
dpm-base
(dpmclml.nonparametric.dpm:dpm
))
clusteres
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
dpm-clusters
(dpm-clusters object)
- (
dpm-clusters
(dpmclml.nonparametric.dpm:dpm
))
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE
'FIXNUM
:INITIAL-ELEMENT 0)=
- Initargs: none
- Allocation: instance
dpm-cluster-layers
(dpm-cluster-layers object)
- (
dpm-cluster-layers
(dpmclml.nonparametric.dpm:dpm
))
dpm-hyper
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
dpm-hyper
(dpm-hyper object)
- (
dpm-hyper
(dpmclml.nonparametric.dpm:dpm
))
p
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
dpm-p
(dpm-p object)
- (
dpm-p
(dpmclml.nonparametric.dpm:dpm
))
estimate-base?
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
estimate-base?
(estimate-base? object)
- (
estimate-base?
(dpmclml.nonparametric.dpm:dpm
))
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
dpm-data
(dpm-data object)
- (
dpm-data
(dpmclml.nonparametric.dpm:dpm
))
32.2.1.5 Class: gauss-dpm
32.2.1.5.1 Inheritance
- Parent classes: dpm
- Precedence list: gauss-dpm, dpm, standard-object, slot-object, t
- Direct subclasses: gauss-hdp-hmm, multivar gauss-dpm
32.2.1.5.2 Description
32.2.1.5.3 Direct Slots
base-distribution
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'CLML.NONPARAMETRIC.DPM:DP-GAUSSIAN)
- Initargs: none
- Allocation: instance
32.2.1.5.4 Indirect Slots
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
estimate-base?
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
p
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
dpm-hyper
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE
'FIXNUM
:INITIAL-ELEMENT 0)=
- Initargs: none
- Allocation: instance
clusteres
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
dpm-k
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
32.2.1.6 Class: gaussian-cluster
32.2.1.6.1 Inheritance
- Parent classes: cluster
- Precedence list: gaussian-cluster, cluster, standard-object, slot-object, t
- Direct subclasses: gaussian-state, multivar-gaussian-cluster
32.2.1.6.2 Description
32.2.1.6.3 Direct Slots
center
- Value type:
t
- Initial value:
0.0
- Initargs: center
- Allocation: instance
cluster-center
(cluster-center object)
- (
cluster-center
(gaussian-clusterclml.nonparametric.dpm:gaussian-cluster
))
std
- Value type:
t
- Initial value:
1.0
- Initargs: std
- Allocation: instance
cluster-std
(cluster-std object)
- (
cluster-std
(gaussian-clusterclml.nonparametric.dpm:gaussian-cluster
))
acc
- Value type:
t
- Initial value:
0.0
- Initargs: none
- Allocation: instance
cluster-acc
(cluster-acc object)
- (
cluster-acc
(gaussian-clusterclml.nonparametric.dpm:gaussian-cluster
))
points
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
cluster-points
(cluster-points object)
- (
cluster-points
(gaussian-clusterclml.nonparametric.dpm:gaussian-cluster
))
32.2.1.6.4 Indirect Slots
num
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
32.2.1.7 Class: logged-dpm
32.2.1.7.1 Inheritance
- Parent classes: dpm
- Precedence list: logged-dpm, dpm, standard-object, slot-object, t
- Direct subclasses: multivar-gauss-dpm
32.2.1.7.2 Description
32.2.1.7.3 Direct Slots
32.2.1.7.4 Indirect Slots
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
estimate-base?
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
p
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
dpm-hyper
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE
'FIXNUM
:INITIAL-ELEMENT 0)=
- Initargs: none
- Allocation: instance
clusteres
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
base-distribution
- Value type:
t
- Initial value:
NIL
- Initargs: base-distribution
- Allocation: instance
dpm-k
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
32.2.1.8 Class: multivar-dp-gaussian
32.2.1.8.1 Inheritance
- Parent classes: dp-gaussian
- Precedence list: multivar-dp-gaussian, dp gaussian, dp-distribution, standard-object, slot-object, t
- Direct subclasses: None.
32.2.1.8.2 Description
- accessor:
- average-of-average : (SIMPLE-ARRAY DOUBLE-FLOAT (* )), average of centroids
- std-of-average : (SIMPLE-ARRAY DOUBLE-FLOAT (* * )), covariance matrix of centroids
- average-of-std : (SIMPLE-ARRAY DOUBLE-FLOAT (* * )), average of covariance matrix
32.2.1.8.3 Direct Slots
dimension
- Value type:
t
- Initial value:
2
- Initargs: dim
- Allocation: instance
dist-dim
(dist-dim object)
- (
dist-dim
(multivar-dp-gaussianclml.nonparametric.dpm:multivar-dp-gaussian
))
ave-of-std
- Value type:
t
- Initial value:
NIL
- Initargs: aos
- Allocation: instance
average-of-std
(average-of-std object)
- (
average-of-std
(multivar-dp-gaussianclml.nonparametric.dpm:multivar-dp-gaussian
))
32.2.1.8.4 Indirect Slots
std
- Value type:
t
- Initial value:
1.0
- Initargs: std
- Allocation: instance
ave
- Value type:
t
- Initial value:
0.0
- Initargs: ave
- Allocation: instance
cluster-class
- Value type:
t
- Initial value: ='CLML.NONPARAMETRIC.DPM:GAUSSIAN-CLUSTER=
- Initargs: none
- Allocation: instance
32.2.1.9 Class: multivar-gauss-dpm
32.2.1.9.1 Inheritance
- Parent classes: logged-dpm, gauss-dpm
- Precedence list: multivar-gauss-dpm, logged dpm, gauss-dpm, dpm, standard-object, slot-object, t
- Direct subclasses: None.
32.2.1.9.2 Description
- accessor:
- dpm-k : number of clusters
- dpm-hyper: hyperparameter of DPM clustering. This value represents the tendency of making new cluster.
- dpm-base : <multivar-dp-gaussian>, prior distribution
32.2.1.9.3 Direct Slots
dimension
- Value type:
t
- Initial value:
2
- Initargs: dim
- Allocation: instance
dpm-dim
(dpm-dim object)
- (
dpm-dim
(multivar-gauss-dpmclml.nonparametric.dpm:multivar-gauss-dpm
))
32.2.1.9.4 Indirect Slots
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
estimate-base?
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
p
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
dpm-hyper
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE
'FIXNUM
:INITIAL-ELEMENT 0)=
- Initargs: none
- Allocation: instance
clusteres
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
base-distribution
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'CLML.NONPARAMETRIC.DPM:DP-GAUSSIAN)
- Initargs: base-distribution
- Allocation: instance
dpm-k
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
32.2.1.10 Class: multivar-gaussian-cluster
32.2.1.10.1 Inheritance
- Parent classes: gaussian-cluster
- Precedence list: multivar-gaussian-cluster, gaussian-cluster, cluster, standard-object, slot-object, t
- Direct subclasses: None.
32.2.1.10.2 Description
32.2.1.10.3 Direct Slots
points
- Value type:
t
- Initial value: =(MAKE-ARRAY 0 :ELEMENT-TYPE 'HJS.UTIL.META:DVEC :FILL-POINTER
T
:ADJUSTABLE T)=
- Initargs: none
- Allocation: instance
acc
- Value type:
t
- Initial value:
NIL
- Initargs: acc
- Allocation: instance
32.2.1.10.4 Indirect Slots
std
- Value type:
t
- Initial value:
1.0
- Initargs: std
- Allocation: instance
center
- Value type:
t
- Initial value:
0.0
- Initargs: center
- Allocation: instance
num
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
32.2.1.11 Inherited Class: point
32.2.1.11.1 Inheritance
- Parent classes: standard-object
- Precedence list: point, standard-object, slot-object, t
- Direct subclasses: seq-point
32.2.1.11.2 Description
32.2.1.11.3 Direct Slots
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
point-data
(point-data object)
- (
point-data
(pointclml.nonparametric.dpm:point
))
cluster
- Value type:
t
- Initial value:
NIL
- Initargs: cluster
- Allocation: instance
point-cluster
(point-cluster object)
- (
point-cluster
(pointclml.nonparametric.dpm:point
))
32.2.2 External Global Variables
32.2.2.1 Variable: *hyper-base-a*
32.2.2.1.1 Value
1.0
Type: double-float
32.2.2.1.2 Description
32.2.2.2 Variable: *hyper-base-b*
32.2.2.2.1 Value
1.0
Type: double-float
32.2.2.2.2 Description
32.2.3 External Functions
32.2.3.1 Inherited Function: add-customer
32.2.3.1.1 Syntax
(add-customer dpm customer old &rest args &key franchise &allow-other-keys)
32.2.3.1.2 Description
add data to model randomly
32.2.3.2 Function: add-to-cluster
32.2.3.2.1 Syntax
(add-to-cluster cluster data &rest args &key franchise franchise &allow-other-keys)
32.2.3.2.2 Description
add data to cluster
32.2.3.3 Function: average-of-average
32.2.3.3.1 Syntax
(average-of-average object)
32.2.3.3.2 Description
32.2.3.4 Function: base-distribution
32.2.3.4.1 Syntax
(base-distribution dpm distribution data &rest args &key franchise x eystar eydagger vystar vydagger &allow-other-keys)
32.2.3.4.2 Description
prior of fresh cluster of data in distribution
32.2.3.5 Function: cluster-center
32.2.3.5.1 Syntax
(cluster-center object)
32.2.3.5.2 Description
32.2.3.6 Function: cluster-class
32.2.3.6.1 Syntax
(cluster-class object)
32.2.3.6.2 Description
32.2.3.7 Function: cluster-rotation
32.2.3.7.1 Syntax
(cluster-rotation ref clusters layers old-size)
32.2.3.7.2 Description
32.2.3.8 Function: cluster-size
32.2.3.8.1 Syntax
(cluster-size object)
32.2.3.8.2 Description
32.2.3.9 Function: cluster-std
32.2.3.9.1 Syntax
(cluster-std object)
32.2.3.9.2 Description
32.2.3.10 Function: density-to-cluster
32.2.3.10.1 Syntax
(density-to-cluster dpm cluster data &rest other-data &key ans before-sorted slice before vy ey x franchise &allow-other-keys)
32.2.3.10.2 Description
density of data to cluster
32.2.3.11 Function: dpm-base
32.2.3.11.1 Syntax
(dpm-base object)
32.2.3.11.2 Description
32.2.3.12 Function: dpm-cluster-layers
32.2.3.12.1 Syntax
(dpm-cluster-layers object)
32.2.3.12.2 Description
32.2.3.13 Function: dpm-clusters
32.2.3.13.1 Syntax
(dpm-clusters object)
32.2.3.13.2 Description
32.2.3.14 Function: dpm-data
32.2.3.14.1 Syntax
(dpm-data object)
32.2.3.14.2 Description
32.2.3.15 Function: dpm-hyper
32.2.3.15.1 Syntax
(dpm-hyper object)
32.2.3.15.2 Description
32.2.3.16 Function: dpm-k
32.2.3.16.1 Syntax
(dpm-k object)
32.2.3.16.2 Description
32.2.3.17 Function: dpm-p
32.2.3.17.1 Syntax
(dpm-p object)
32.2.3.17.2 Description
32.2.3.18 Function: estimate-base?
32.2.3.18.1 Syntax
(estimate-base? object)
32.2.3.18.2 Description
32.2.3.19 Function: head-clusters
32.2.3.19.1 Syntax
(head-clusters dpm &optional (n most-positive-fixnum))
32.2.3.19.2 Description
32.2.3.20 Inherited Function: hypers-sampling
32.2.3.20.1 Syntax
(hypers-sampling dpm)
32.2.3.20.2 Description
hyperparameter sampling
32.2.3.21 Inherited Function: initialize
32.2.3.21.1 Syntax
(initialize dpm)
32.2.3.21.2 Description
initialize dpm slots and first seating sampling
32.2.3.22 Function: make-cluster-result
32.2.3.22.1 Syntax
(make-cluster-result dpm)
32.2.3.22.2 Description
32.2.3.23 Function: make-new-cluster
32.2.3.23.1 Syntax
(make-new-cluster dpm distribution data &optional discarded-cluster)
32.2.3.23.2 Description
make new cluster of passed distribution
32.2.3.24 Function: make-point
32.2.3.24.1 Syntax
(make-point &key data cluster)
32.2.3.24.2 Description
32.2.3.25 Function: parameters-sampling
32.2.3.25.1 Syntax
(parameters-sampling dpm)
32.2.3.25.2 Description
sampling without seatings but other parameters
32.2.3.26 Function: point-cluster
32.2.3.26.1 Syntax
(point-cluster object)
32.2.3.26.2 Description
32.2.3.27 Function: point-data
32.2.3.27.1 Syntax
(point-data object)
32.2.3.27.2 Description
32.2.3.28 Inherited Function: remove-customer
32.2.3.28.1 Syntax
(remove-customer dpm customer &rest args &key franchise &allow-other-keys)
32.2.3.28.2 Description
remove data from model
32.2.3.29 Function: remove-from-cluster
32.2.3.29.1 Syntax
(remove-from-cluster cluster data &rest args &key franchise &allow-other-keys)
32.2.3.29.2 Description
remove data from cluster
32.2.3.30 Function: sample-cluster-parameters
32.2.3.30.1 Syntax
(sample-cluster-parameters cluster dist dpm)
32.2.3.30.2 Description
update cluster parameters if exists
32.2.3.31 Function: sample-distribution
32.2.3.31.1 Syntax
(sample-distribution dpm distribution)
32.2.3.31.2 Description
update distribution parameters if exists
32.2.3.32 Inherited Function: sampling
32.2.3.32.1 Syntax
(sampling dpm)
32.2.3.32.2 Description
samlpling seatings and other parameters
32.2.3.33 Function: seatings-sampling
32.2.3.33.1 Syntax
(seatings-sampling dpm)
32.2.3.33.2 Description
32.2.3.34 Function: std-of-average
32.2.3.34.1 Syntax
(std-of-average object)
32.2.3.34.2 Description
32.3 Ambiguous Symbols
32.3.1 Dpm
Disambiguation.
- Class:
clml.nonparametric.dpm:dpm
- Package:
clml.nonparametric.dpm:dpm
33 Package: clml.nonparametric.ftm
- Uses: common-lisp, clml.nonparameteric.statistics, clml.nonparametric.dpm
- Used by: None.
33.1 Description
33.2 External Symbols
33.2.1 External Classes
33.2.1.1 Inherited Class: document
33.2.1.1.1 Inheritance
- Parent classes: standard-object
- Precedence list: document, standard-object, slot-object, t
- Direct subclasses: None.
33.2.1.1.2 Description
33.2.1.1.3 Direct Slots
id
- Value type:
t
- Initial value:
NIL
- Initargs: id
- Allocation: instance
document-id
(document-id object)
- (
document-id
(documentclml.nonparametric.ftm:document
))
words
- Value type:
t
- Initial value:
NIL
- Initargs: words
- Allocation: instance
document-words
(document-words object)
- (
document-words
(documentclml.nonparametric.ftm:document
))
thetas
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
document-thetas
(document-thetas object)
- (
document-thetas
(documentclml.nonparametric.ftm:document
))
33.2.1.2 Class: ftm
33.2.1.2.1 Inheritance
- Parent classes: dpm
- Precedence list: ftm, dpm, standard object, slot-object, t
- Direct subclasses: None.
33.2.1.2.2 Description
33.2.1.2.3 Direct Slots
dpm-k
- Value type:
t
- Initial value:
1
- Initargs: init-k
- Allocation: instance
dpm-hyper
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 2.0 10.0)
- Initargs: none
- Allocation: instance
base-distribution
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'CLML.NONPARAMETRIC.FTM:FTM-UNIFORM)
- Initargs: none
- Allocation: instance
word-table
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE :TEST #'EQUAL)
- Initargs: none
- Allocation: instance
word-table
(word-table object)
- (
word-table
(ftmclml.nonparametric.ftm:ftm
))
revert-table
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
revert-table
(revert-table object)
- (
revert-table
(ftmclml.nonparametric.ftm:ftm
))
id
- Value type:
t
- Initial value:
-1
- Initargs: none
- Allocation: instance
vocabulary
(vocabulary object)
- (
vocabulary
(ftmclml.nonparametric.ftm:ftm
))
ftm-hyper
- Value type:
t
- Initial value:
5.0
- Initargs: none
- Allocation: instance
ftm-ibp-alpha
(ftm-ibp-alpha object)
- (
ftm-ibp-alpha
(ftmclml.nonparametric.ftm:ftm
))
33.2.1.2.4 Indirect Slots
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
estimate-base?
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
p
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE
'FIXNUM
:INITIAL-ELEMENT 0)=
- Initargs: none
- Allocation: instance
clusteres
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
33.2.1.3 Class: ftm-topic
33.2.1.3.1 Inheritance
- Parent classes: cluster
- Precedence list: ftm-topic, cluster, standard-object, slot-object, t
- Direct subclasses: None.
33.2.1.3.2 Description
33.2.1.3.3 Direct Slots
topic-pi
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
topic-pi
(topic-pi object)
- (
topic-pi
(ftm-topicclml.nonparametric.ftm:ftm topic
))
topic-phi
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
topic-phi
(topic-phi object)
- (
topic-phi
(ftm-topicclml.nonparametric.ftm:ftm topic
))
dist
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE)
- Initargs: none
- Allocation: instance
cluster-dist-table
(cluster-dist-table object)
- (
cluster-dist-table
(ftm-topicclml.nonparametric.ftm:ftm-topic
))
ibp-dish
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE)
- Initargs: none
- Allocation: instance
topic-ibp-table
(topic-ibp-table object)
- (
topic-ibp-table
(ftm-topicclml.nonparametric.ftm:ftm-topic
))
emission
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE)
- Initargs: none
- Allocation: instance
topic-emission
(topic-emission object)
- (
topic-emission
(ftm-topicclml.nonparametric.ftm:ftm-topic
))
33.2.1.3.4 Indirect Slots
num
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
33.2.1.4 Class: ftm-uniform
33.2.1.4.1 Inheritance
- Parent classes: dp-distribution
- Precedence list: ftm-uniform, dp-distribution, standard-object, slot-object, t
- Direct subclasses: None.
33.2.1.4.2 Description
33.2.1.4.3 Direct Slots
cluster-class
- Value type:
t
- Initial value: ='CLML.NONPARAMETRIC.FTM:FTM-TOPIC=
- Initargs: none
- Allocation: instance
33.2.2 External Functions
33.2.2.1 Function: ftm-ibp-alpha
33.2.2.1.1 Syntax
(ftm-ibp-alpha object)
33.2.2.1.2 Description
33.2.2.2 Inherited Function: get-top-n-words
33.2.2.2.1 Syntax
(get-top-n-words model n)
33.2.2.2.2 Description
33.2.2.3 Function: topic-phi
33.2.2.3.1 Syntax
(topic-phi object)
33.2.2.3.2 Description
33.2.2.4 Function: topic-pi
33.2.2.4.1 Syntax
(topic-pi object)
33.2.2.4.2 Description
34 Package: clml.nonparametric.hdp
- Uses: common-lisp, hjs.util.meta, clml.nonparameteric.statistics, clml.nonparametric.dpm
- Used by: clml.nonparametric.hdp-hmm, clml.nonparametric.ihmm, clml.nonparametric.blocked-hdp-hmm, clml.nonparametric.sticky-hdp hmm
34.1 Description
34.2 External Symbols
34.2.1 External Classes
34.2.1.1 Class: hdp
34.2.1.1.1 Inheritance
- Parent classes: dpm
- Precedence list: hdp, dpm, standard object, slot-object, t
- Direct subclasses: sliced-hdp
34.2.1.1.2 Description
34.2.1.1.3 Direct Slots
gamma
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
hdp-gamma
(hdp-gamma object)
- (
hdp-gamma
(hdpclml.nonparametric.hdp:hdp
))
beta_new
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 1.0 1.0)
- Initargs: none
- Allocation: instance
hdp-beta
(hdp-beta object)
- (
hdp-beta
(hdpclml.nonparametric.hdp:hdp
))
beta-tmp
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0 :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
hdp-beta-tmp
(hdp-beta-tmp object)
- (
hdp-beta-tmp
(hdpclml.nonparametric.hdp:hdp
))
abm-tmp
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
hdp-abm-tmp
(hdp-abm-tmp object)
- (
hdp-abm-tmp
(hdpclml.nonparametric.hdp:hdp
))
table-p
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
hdp-table-p
(hdp-table-p object)
- (
hdp-table-p
(hdpclml.nonparametric.hdp:hdp
))
34.2.1.1.4 Indirect Slots
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
estimate-base?
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
p
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
dpm-hyper
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE
'FIXNUM
:INITIAL-ELEMENT 0)=
- Initargs: none
- Allocation: instance
clusteres
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
base-distribution
- Value type:
t
- Initial value:
NIL
- Initargs: base-distribution
- Allocation: instance
dpm-k
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
34.2.1.2 Class: hdp-cluster
34.2.1.2.1 Inheritance
- Parent classes: cluster
- Precedence list: hdp-cluster, cluster, standard-object, slot-object, t
- Direct subclasses: None.
34.2.1.2.2 Description
34.2.1.2.3 Direct Slots
latent-table
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
cluster-latent-table
(cluster-latent-table object)
- (
cluster-latent-table
(hdp-clusterclml.nonparametric.hdp:hdp-cluster
))
beta
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 1.0 1.0)
- Initargs: none
- Allocation: instance
cluster-beta
(cluster-beta object)
- (
cluster-beta
(hdp-clusterclml.nonparametric.hdp:hdp-cluster
))
tmp-table
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE)
- Initargs: none
- Allocation: instance
cluster-tmp-table
(cluster-tmp-table object)
- (
cluster-tmp-table
(hdp-clusterclml.nonparametric.hdp:hdp-cluster
))
34.2.1.2.4 Indirect Slots
num
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
34.2.1.3 Class: hdp-distribution
34.2.1.3.1 Inheritance
- Parent classes: dp-distribution
- Precedence list: hdp-distribution, dp distribution, standard-object, slot-object, t
- Direct subclasses: None.
34.2.1.3.2 Description
34.2.1.3.3 Direct Slots
cluster-class
- Value type:
t
- Initial value: ='CLML.NONPARAMETRIC.HDP:HDP-CLUSTER=
- Initargs: none
- Allocation: instance
34.2.1.4 Class: sliced-hdp
34.2.1.4.1 Inheritance
- Parent classes: hdp
- Precedence list: sliced-hdp, hdp, dpm, standard-object, slot-object, t
- Direct subclasses: None.
34.2.1.4.2 Description
34.2.1.4.3 Direct Slots
34.2.1.4.4 Indirect Slots
table-p
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
abm-tmp
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
beta-tmp
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0 :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
beta_new
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 1.0 1.0)
- Initargs: none
- Allocation: instance
gamma
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
estimate-base?
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
p
- Value type:
t
- Initial value:
(MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
- Initargs: none
- Allocation: instance
dpm-hyper
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM CLML.NONPARAMETRIC.DPM:*HYPER-BASE-A* CLML.NONPARAMETRIC.DPM:*HYPER-BASE-B*)=
- Initargs: none
- Allocation: instance
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE
'FIXNUM
:INITIAL-ELEMENT 0)=
- Initargs: none
- Allocation: instance
clusteres
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
base-distribution
- Value type:
t
- Initial value:
NIL
- Initargs: base-distribution
- Allocation: instance
dpm-k
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
34.2.2 External Functions
34.2.2.1 Function: cluster-beta
34.2.2.1.1 Syntax
(cluster-beta object)
34.2.2.1.2 Description
34.2.2.2 Function: cluster-latent-table
34.2.2.2.1 Syntax
(cluster-latent-table object)
34.2.2.2.2 Description
34.2.2.3 Function: cluster-tmp-table
34.2.2.3.1 Syntax
(cluster-tmp-table object)
34.2.2.3.2 Description
34.2.2.4 Function: hdp-beta
34.2.2.4.1 Syntax
(hdp-beta object)
34.2.2.4.2 Description
34.2.2.5 Function: hdp-gamma
34.2.2.5.1 Syntax
(hdp-gamma object)
34.2.2.5.2 Description
34.2.2.6 Function: sample-latent-table
34.2.2.6.1 Syntax
(sample-latent-table cluster &rest args &key franchise alpha kappa alpha franchise &allow-other-keys)
34.2.2.6.2 Description
sample "latent" table for HDP direct assignment
35 Package: clml.nonparametric.hdp-lda
- Uses: common-lisp, clml.nonparameteric.statistics, hjs.util.meta
- Used by: clml.test
35.1 Description
Package for Latent-Dirichlet-Allocation by Hierarchical-Dirichlet-Process
35.1.0.1 sample usage
SVM.WSS3(44): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-train-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 338 POINTS SVM.WSS3(45): (setf training-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 4.0 4.0 5.0 7.0 10.0 3.0 2.0 1.0 1.0) #(6.0 8.0 8.0 1.0 3.0 4.0 3.0 7.0 1.0 1.0) #(8.0 10.0 10.0 8.0 7.0 10.0 9.0 7.0 1.0 -1.0) #(2.0 1.0 2.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(4.0 2.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 3.0 3.0 1.0 1.0 1.0) #(7.0 4.0 6.0 4.0 6.0 1.0 4.0 3.0 1.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(6.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) ...) SVM.WSS3(46): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-test-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 345 POINTS SVM.WSS3(47): (setf test-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(3.0 1.0 1.0 1.0 2.0 2.0 3.0 1.0 1.0 1.0) #(4.0 1.0 1.0 3.0 2.0 1.0 3.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 10.0 3.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 1.0 1.0 5.0 1.0) #(1.0 1.0 1.0 1.0 1.0 1.0 3.0 1.0 1.0 1.0) #(5.0 3.0 3.0 3.0 2.0 3.0 4.0 4.0 1.0 -1.0) #(8.0 7.0 5.0 10.0 7.0 9.0 5.0 5.0 4.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(10.0 7.0 7.0 6.0 4.0 10.0 4.0 1.0 2.0 -1.0) ...) SVM.WSS3(49): (setf kernel (make-rbf-kernel :gamma 0.05)) #<Closure (:INTERNAL MAKE-RBF-KERNEL 0) @ #x101ba6a6f2> SVM.WSS3(50): (setf svm (make-svm-learner training-vector kernel :c 10 :file-name "svm-sample" :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101bc76a12> SVM.WSS3(51): (funcall svm (svref test-vector 0)) 1.0 SVM.WSS3(52): (svm-validation svm test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478 SVM.WSS3(53): (setf svm2 (load-svm-learner "svm-sample" kernel :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101be9db02> SVM.WSS3(54): (svm-validation svm2 test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478
35.2 External Symbols
35.2.1 External Classes
35.2.1.1 Inherited Class: document
35.2.1.1.1 Inheritance
- Parent classes: standard-object
- Precedence list: document, standard-object, slot-object, t
- Direct subclasses: None.
35.2.1.1.2 Description
35.2.1.1.3 Direct Slots
id
- Value type:
t
- Initial value:
NIL
- Initargs: id
- Allocation: instance
document-id
(document-id object)
- (
document-id
(documentdocument
))
words
- Value type:
t
- Initial value:
NIL
- Initargs: words
- Allocation: instance
document-words
(document-words object)
- (
document-words
(documentdocument
))
thetas
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
document-thetas
(document-thetas object)
- (
document-thetas
(documentdocument
))
restaurant
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
document-restaurant
(document-restaurant object)
- (
document-restaurant
(documentdocument
))
layers
- Value type:
t
- Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :INITIAL
ELEMENT 0
:ELEMENT-TYPE 'FIXNUM)=
- Initargs: none
- Allocation: instance
document-layer-points
(document-layer-points object)
- (
document-layer-points
(documentdocument
))
p
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
document-p
(document-p object)
- (
document-p
(documentdocument
))
35.2.1.2 Inherited Class: hdp-lda
35.2.1.2.1 Inheritance
- Parent classes: standard-object
- Precedence list: hdp-lda, standard-object, slot-object, t
- Direct subclasses: None.
35.2.1.2.2 Description
- accessor:
- topic-count: <integer>, number of topics
- hdp-lda-alpha: value of hyperparameter alpha
- hdp-lda-beta: value of hyperparameter beta
- hdp-lda-gamma: value of hyperparameter gamma
35.2.1.2.3 Direct Slots
k
- Value type:
t
- Initial value:
0
- Initargs: k
- Allocation: instance
topic-count
(topic-count object)
- (
topic-count
(hdp-ldahdp-lda
))
topics
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hdp-lda-topics
(hdp-lda-topics object)
- (
hdp-lda-topics
(hdp-ldahdp-lda
))
topic-tables
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hdp-lda-topic-tables
(hdp-lda-topic-tables object)
- (
hdp-lda-topic-tables
(hdp-ldahdp-lda
))
topic-occurs
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hdp-lda-topic-occurs
(hdp-lda-topic-occurs object)
- (
hdp-lda-topic-occurs
(hdp-ldahdp-lda
))
ntables
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
hdp-lda-ntables
(hdp-lda-ntables object)
- (
hdp-lda-ntables
(hdp-ldahdp-lda
))
alpha
- Value type:
t
- Initial value:
NIL
- Initargs: alpha
- Allocation: instance
hdp-lda-alpha
(hdp-lda-alpha object)
- (
hdp-lda-alpha
(hdp-ldahdp-lda
))
beta
- Value type:
t
- Initial value:
NIL
- Initargs: beta
- Allocation: instance
hdp-lda-beta
(hdp-lda-beta object)
- (
hdp-lda-beta
(hdp-ldahdp-lda
))
gamma
- Value type:
t
- Initial value:
NIL
- Initargs: gamma
- Allocation: instance
hdp-lda-gamma
(hdp-lda-gamma object)
- (
hdp-lda-gamma
(hdp-ldahdp-lda
))
p
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hdp-lda-p
(hdp-lda-p object)
- (
hdp-lda-p
(hdp-ldahdp-lda
))
data
- Value type:
t
- Initial value:
NIL
- Initargs: data
- Allocation: instance
hdp-lda-data
(hdp-lda-data object)
- (
hdp-lda-data
(hdp-ldahdp-lda
))
f-k
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
hdp-lda-f-k
(hdp-lda-f-k object)
- (
hdp-lda-f-k
(hdp-ldahdp-lda
))
word-table
- Value type:
t
- Initial value:
(MAKE-HASH-TABLE :TEST #'EQUAL)
- Initargs: none
- Allocation: instance
word-table
(word-table object)
- (
word-table
(hdp-ldahdp-lda
))
revert-table
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
revert-table
(revert-table object)
- (
revert-table
(hdp-ldahdp-lda
))
id
- Value type:
t
- Initial value:
-1
- Initargs: none
- Allocation: instance
vocabulary
(vocabulary object)
- (
vocabulary
(hdp-ldahdp-lda
))
35.2.2 External Structures
35.2.2.1 Inherited Structure: table
35.2.2.1.1 Description
35.2.2.1.2 Slots
dish
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
customer
- Value type:
t
- Initial value:
0
- Initargs: none
- Allocation: instance
customers
- Value type:
t
- Initial value:
(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
- Initargs: none
- Allocation: instance
35.2.2.2 Inherited Structure: word
35.2.2.2.1 Description
35.2.2.2.2 Slots
id
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
assign
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
35.2.3 External Global Variables
35.2.3.1 Inherited Variable: *alpha-base-a*
35.2.3.1.1 Value
1.0
Type: double-float
35.2.3.1.2 Description
35.2.3.2 Inherited Variable: *alpha-base-b*
35.2.3.2.1 Value
0.1
Type: double-float
35.2.3.2.2 Description
35.2.3.3 Inherited Variable: *default-beta*
35.2.3.3.1 Value
0.1
Type: double-float
35.2.3.3.2 Description
35.2.3.4 Inherited Variable: *gamma-base-a*
35.2.3.4.1 Value
1.0
Type: double-float
35.2.3.4.2 Description
35.2.3.5 Inherited Variable: *gamma-base-b*
35.2.3.5.1 Value
0.1
Type: double-float
35.2.3.5.2 Description
35.2.4 External Functions
35.2.4.1 Inherited Function: add-customer
35.2.4.1.1 Syntax
(add-customer hdp-lda word doc &optional (old))
35.2.4.1.2 Description
35.2.4.2 Inherited Function: assign-theta
35.2.4.2.1 Syntax
(assign-theta model)
35.2.4.2.2 Description
35.2.4.3 Inherited Function: document-id
35.2.4.3.1 Syntax
(document-id object)
35.2.4.3.2 Description
35.2.4.4 Inherited Function: document-thetas
35.2.4.4.1 Syntax
(document-thetas object)
35.2.4.4.2 Description
35.2.4.5 Inherited Function: document-words
35.2.4.5.1 Syntax
(document-words object)
35.2.4.5.2 Description
35.2.4.6 Inherited Function: get-phi
35.2.4.6.1 Syntax
(get-phi model)
35.2.4.6.2 Description
35.2.4.7 Inherited Function: get-top-n-words
35.2.4.7.1 Syntax
(get-top-n-words model n)
35.2.4.7.2 Description
35.2.4.8 Inherited Function: hdp-lda-data
35.2.4.8.1 Syntax
(hdp-lda-data object)
35.2.4.8.2 Description
35.2.4.9 Inherited Function: hypers-sampling
35.2.4.9.1 Syntax
(hypers-sampling hdp-lda)
35.2.4.9.2 Description
35.2.4.10 Inherited Function: initialize
35.2.4.10.1 Syntax
(initialize hdp-lda)
35.2.4.10.2 Description
35.2.4.11 Inherited Function: remove-customer
35.2.4.11.1 Syntax
(remove-customer hdp-lda word doc)
35.2.4.11.2 Description
35.2.4.12 Inherited Function: revert-word
35.2.4.12.1 Syntax
(revert-word hdp-lda word-id)
35.2.4.12.2 Description
35.2.4.13 Inherited Function: sample-new-topic
35.2.4.13.1 Syntax
(sample-new-topic hdp-lda topic-p k-new)
35.2.4.13.2 Description
35.2.4.14 Inherited Function: sampling
35.2.4.14.1 Syntax
(sampling hdp-lda)
35.2.4.14.2 Description
35.2.4.15 Inherited Function: topic-count
35.2.4.15.1 Syntax
(topic-count object)
35.2.4.15.2 Description
35.2.4.16 Inherited Function: vocabulary
35.2.4.16.1 Syntax
(vocabulary object)
35.2.4.16.2 Description
35.2.4.17 Inherited Function: word-id
35.2.4.17.1 Syntax
(word-id instance)
35.2.4.17.2 Description
36 Package: clml.nonparametric.lfm
- Uses: common-lisp, clml.nonparameteric.statistics, hjs.util.meta, hjs.util.matrix, hjs.util.vector, clml.nonparametric.dpm
- Used by: None.
36.1 Description
36.2 External Symbols
37 Package: clml.numeric.fast-fourier-transform
- Uses: common-lisp, hjs.util.meta
- Used by: clml.time-series.statistics
37.1 Description
37.2 External Symbols
37.2.1 External Functions
37.2.1.1 Function: four1
37.2.1.1.1 Syntax
(four1 data nn &key (isign 1))
37.2.1.1.2 Description
37.2.1.2 Function: make-expt-array
37.2.1.2.1 Syntax
(make-expt-array base d)
37.2.1.2.2 Description
37.2.1.3 Function: realft
37.2.1.3.1 Syntax
(realft data n &key (isign 1))
37.2.1.3.2 Description
38 Package: clml.pca
- Uses: common-lisp, hjs.util.meta, hjs.util.matrix, hjs.util.eigensystems, hjs.util.vector, hjs.learn.read-data, clml.statistics, hjs.learn.vars
- Used by: clml.nearest-search.nearest
38.1 Description
38.1.0.1 Note
- when using princomp and sub-princomp, if there exists two columns that are of same value, the result for :correlation method will not be converged. Therefore pick-and-specialize-data or divide-dataset must be used to remove one column.
38.1.0.2 sample usage
PCA(10): (setf dataset (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/pos.sexp") :external-format #+allegro :932 #-allegro :sjis)) PCA(11): (setf dataset (pick-and-specialize-data dataset :range '(2 3) :data-types '(:numeric :numeric))) PCA(12): (princomp dataset :method :correlation) #<PCA-RESULT @ #x20fcd88a> #<PCA-MODEL @ #x20fcd8c2> PCA(13): (princomp-projection dataset (cadr /)) #(#(-0.18646787691278618 -0.5587877417431286) #(-0.2586922124306382 -0.6310120772609806) #(0.08929776779173992 -0.2830220970386028) #(-0.311219001898167 -0.6835388667285094) #(-0.19303372559622725 -0.5653535904265697) #(-0.19303372559622725 -0.5653535904265697) #(-0.19303372559622725 -0.5653535904265697) #(-1.9046466459275095 1.014942356235892) #(0.20748304409367965 -0.1648368207366632) #(0.161522103309592 -0.21079776152075083) ...) ;; learning and estimation by eigenface method and data for eyes PCA(40): (let ((eyes (pick-and-specialize-data (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/eyes200.sexp")) :except '(0) :data-types (append (make-list 1 :initial-element :category) (make-list 1680 :initial-element :numeric))))) (multiple-value-setq (for-learn for-estimate) (divide-dataset eyes :divide-ratio '(1 1) :random t))) PCA(43): (multiple-value-setq (pca-result pca-model) (princomp (divide-dataset for-learn :except '(0)) :method :covariance)) PCA(65): (loop for dimension in '(1 5 10 20 30) as estimator = (make-face-estimator for-learn :dimension-thld dimension :method :eigenface :pca-result pca-result :pca-model pca-model) as result = (face-estimate for-estimate estimator) do (format t "hitting-ratio: ~,3F~%" (/ (count-if (lambda (p) (string-equal (aref p 0) (aref p 1))) (dataset-category-points result)) (length (dataset-points result))))) Dimension : 1 Number of self-misjudgement : 53 hitting-ratio: 0.580 Dimension : 5 Number of self-misjudgement : 21 hitting-ratio: 0.860 Dimension : 10 Number of self-misjudgement : 18 hitting-ratio: 0.880 Dimension : 20 Number of self-misjudgement : 15 hitting-ratio: 0.890 Dimension : 30 Number of self-misjudgement : 13 hitting-ratio: 0.890
38.2 External Symbols
38.2.1 External Classes
38.2.1.1 Internal Class: pca-result
38.2.1.1.1 Inheritance
- Parent classes: standard-object
- Precedence list: pca-result, standard-object, slot-object, t
- Direct subclasses: None.
38.2.1.1.2 Description
- accessor:
- components : <vector of datapoints>, principle components、score
- contributions : <vector of double-float>
- loading-factors : <matrix> (pay attention the representation of the matrix is row major)
- pca-method : :covariance | :correlation
38.2.1.1.3 Direct Slots
components
- Value type:
t
- Initial value:
NIL
- Initargs: components
- Allocation: instance
components
(components object)
- (
components
(kernel-pca-resultclml.pca::kernel-pca-result
)) - (
components
(pca-resultclml.pca:pca-result
))
contributions
- Value type:
t
- Initial value:
NIL
- Initargs: contributions
- Allocation: instance
contributions
(contributions object)
- (
contributions
(kernel-pca-resultclml.pca::kernel-pca-result
)) - (
contributions
(pca-resultclml.pca:pca-result
))
loading-factors
- Value type:
t
- Initial value:
NIL
- Initargs: loading-factors
- Allocation: instance
loading-factors
(loading-factors object)
- (
loading-factors
(kernel-pca-modelclml.pca::kernel-pca-model
)) - (
loading-factors
(kernel-pca-resultclml.pca::kernel-pca-result
)) - (
loading-factors
(pca-modelclml.pca::pca-model
)) - (
loading-factors
(pca-resultclml.pca:pca-result
))
pca-method
- Value type:
t
- Initial value:
NIL
- Initargs: pca-method
- Allocation: instance
pca-method
(pca-method object)
- (
pca-method
(pca-modelclml.pca::pca-model
)) - (
pca-method
(pca-resultclml.pca:pca-result
))
centroid
- Value type:
t
- Initial value:
NIL
- Initargs: centroid
- Allocation: instance
centroid
(centroid object)
- (
centroid
(kernel-pca-modelclml.pca::kernel-pca-model
)) - (
centroid
(kernel-pca-resultclml.pca::kernel-pca-result
)) - (
centroid
(pca-modelclml.pca::pca-model
)) - (
centroid
(pca-resultclml.pca:pca-result
))
orig-data-standard-deviations
- Value type:
t
- Initial value:
NIL
- Initargs: orig-data-standard-deviations
- Allocation: instance
orig-data-standard-deviations
(orig-data-standard-deviations object)
- (
orig-data-standard-deviations
(pca-modelclml.pca::pca-model
)) - (
orig-data-standard-deviations
(pca-resultclml.pca:pca-result
))
38.2.2 External Functions
38.2.2.1 Inherited Function: centroid
38.2.2.1.1 Syntax
(centroid object)
38.2.2.1.2 Description
38.2.2.2 Function: components
38.2.2.2.1 Syntax
(components object)
38.2.2.2.2 Description
38.2.2.3 Function: contributions
38.2.2.3.1 Syntax
(contributions object)
38.2.2.3.2 Description
38.2.2.4 Internal Function: face-estimate
38.2.2.4.1 Syntax
(face-estimate d estimator)
38.2.2.4.2 Description
38.2.2.5 Function: kernel-princomp
38.2.2.5.1 Syntax
(kernel-princomp dataset &key dimension-thld (kernel-fcn +linear+))
38.2.2.5.2 Description
38.2.2.6 Function: loading-factors
38.2.2.6.1 Syntax
(loading-factors object)
38.2.2.6.2 Description
38.2.2.7 Internal Function: make-face-estimator
38.2.2.7.1 Syntax
(make-face-estimator face-dataset &key dimension-thld (id-column personid) (method eigenface) (pca-method covariance) (d-fcn #'euclid-distance) pca-result pca-model bagging)
38.2.2.7.2 Description
&key id-column dimension-thld method pca-method d-fcn pca-result pca-model)
- return: (values estimator hash)
- arguments:
- face-dataset : <numeric-and-category-dataset>
- id-column : <string>, the name for the face ID column, default value is personID
- dimension-thld : 0 < <number> < 1 | 1 <= <integer>, the threshold for determining the number of dimensions to use.
- method : :eigenface | :subspace, method for face recognition, eigenface or subspace method.
- pca-method : :covariance | :correlation, only valid when method is :subspace
- d-fcn : distance function for eigenface, default value is euclid-distance
- pca-result : <pca-result>, necessary for :eigenface
- pca-model : <pca-model>, necessary for :eigenface
- note:
- When 0 < dimension-thld < 1, it means the threshold for accumulated contribution ratio. A principle component's contribution ratio means its proportion in all principle components' contributions.
- When 1 <= dimension-thld ( integer ), it means the number of principle components.
- reference:
38.2.2.8 Function: pca-method
38.2.2.8.1 Syntax
(pca-method object)
38.2.2.8.2 Description
38.2.2.9 Function: princomp
38.2.2.9.1 Syntax
(princomp dataset &key method (method correlation))
38.2.2.9.2 Description
- return: (values pca-result pca-model)
- arugments:
- dataset : <numeric-dataset>
- method : :covariance | :correlation
38.2.2.10 Function: princomp-projection
38.2.2.10.1 Syntax
(princomp-projection dataset pca-model)
38.2.2.10.2 Description
- return: score (vector of datapoints)
- arguments:
- dataset : <numeric-dataset>
- pca-model : <pca-model>, model by P.C.A.
38.2.2.11 Function: sub-princomp
38.2.2.11.1 Syntax
(sub-princomp dataset &key (method correlation) (dimension-thld 0.8))
38.2.2.11.2 Description
- return: (values pca-result pca-model)
- arugments:
- dataset : <numeric-dataset>
- method : :covariance | :correlation
- dimension-thld : 0 < <number> < 1 | 1 <= <integer>, threshold for deciding principal components
- note:
- When 0 < dimension-thld < 1, it means the threshold for accumulated contribution ratio. A principle component's contribution ratio means its proportion in all principle components' contributions.
- When 1 <= dimension-thld ( integer ), it means the number of principle components.
39 Package: clml.som
- Uses: common-lisp, split sequence
- Used by: clml.test
39.1 Description
Self-Organizing-Map package for self-organizing map
39.1.0.1 sample usage
39.2 External Symbols
39.2.1 External Functions
39.2.1.1 Inherited Function: do-som-by-filename
39.2.1.1.1 Syntax
(do-som-by-filename in-data-file s-topol s-neigh xdim ydim randomize length ialpha iradius num-labels directory &key (debug nil))
39.2.1.1.2 Description
40 Package: clml.statistics
- Uses: common-lisp, clml.statistics.rand
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.graph.graph-centrality, clml.time-series.anomaly-detection, clml.time-series.changefinder, clml.time-series.autoregression, clml.time-series.state-space, clml.time-series.statistics, clml.time-series.util, clml.clustering.k-means2, clml.clustering.optics, clml.pca, hjs.learn.k-means, hjs.util.missing-value
40.1 Description
40.1.1 Notes
- Numbers are not converted to (double) floats, for better accuracy with whole number data. This should be OK, since double data will generate double results (the number type is preserved).
- Places marked with TODO are not optimal or not finished (see the TODO file for more details).
40.1.1.1 Distributions
Distributions are CLOS objects, and they are created by the constructor of the same name. The objects support the methods CDF (cumulative distribution function), DENSITY (MASS for discrete distributions), QUANTILE, RAND (gives a random number according to the given distribution), RAND-N (convenience function that gives n random numbers), MEAN and VARIANCE (giving the distribution's mean and variance, respectively). These take the distribution as their first parameter.
Most distributions can also be created with an estimator constructor. The estimator function has the form <distribution>-ESTIMATE, unless noted.
40.2 External Symbols
40.2.1 External Classes
40.2.1.1 Inherited Class: beta-distribution
40.2.1.1.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: beta-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.1.2 Description
40.2.1.1.3 Direct Slots
shape1
- Value type:
t
- Initial value:
NIL
- Initargs: shape1
- Allocation: instance
shape1
(shape1 object)
- (
shape1
(beta-distributionbeta distribution
))
set-shape1
(set-shape1 new-value object)
- (
set-shape1
(new-valuet
) (beta-distributionbeta distribution
))
shape2
- Value type:
t
- Initial value:
NIL
- Initargs: shape2
- Allocation: instance
shape2
(shape2 object)
- (
shape2
(beta-distributionbeta distribution
))
set-shape2
(set-shape2 new-value object)
- (
set-shape2
(new-valuet
) (beta-distributionbeta distribution
))
alpha-gamma
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'GAMMA-DISTRIBUTION :SHAPE 1.0 :SCALE 1.0)
- Initargs: none
- Allocation: instance
beta-gamma
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'GAMMA-DISTRIBUTION :SHAPE 1.0 :SCALE 1.0)
- Initargs: none
- Allocation: instance
40.2.1.1.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.2 Inherited Class: binomial-distribution
40.2.1.2.1 Inheritance
- Parent classes: bernoulli-related-distribution
- Precedence list: binomial-distribution, bernoulli-related-distribution, discrete-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.2.2 Description
40.2.1.2.3 Direct Slots
size
- Value type:
t
- Initial value:
NIL
- Initargs: size
- Allocation: instance
size
(size object)
- (
size
(binomial-distributionbinomial-distribution
))
set-size
(set-size new-value object)
- (
set-size
(new-valuet
) (binomial-distributionbinomial distribution
))
table
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
ki
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
vi
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
b
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
k
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
w
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
nsq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.2.4 Indirect Slots
probability
- Value type:
t
- Initial value:
NIL
- Initargs: probability
- Allocation: instance
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.3 Inherited Class: cauchy-distribution
40.2.1.3.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: cauchy-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.3.2 Description
40.2.1.3.3 Direct Slots
location
- Value type:
t
- Initial value:
NIL
- Initargs: location
- Allocation: instance
location
(location object)
- (
location
(logistic-distributionlogistic-distribution
)) - (
location
(cauchy-distributioncauchy-distribution
))
set-location
(set-location new-value object)
- (
set-location
(new-valuet
) (logistic-distributionlogistic distribution
)) - (
set-location
(new-valuet
) (cauchy-distributioncauchy distribution
))
scale
- Value type:
t
- Initial value:
NIL
- Initargs: scale
- Allocation: instance
scale
(scale object)
- (
scale
(logistic-distributionlogistic-distribution
)) - (
scale
(cauchy-distributioncauchy distribution
)) - (
scale
(exponential-distributionexponential-distribution
)) - (
scale
(gamma-like-distributionclml.statistics::gamma-like-distribution
))
set-scale
(set-scale new-value object)
- (
set-scale
(new-valuet
) (logistic-distributionlogistic distribution
)) - (
set-scale
(new-valuet
) (cauchy-distributioncauchy distribution
)) - (
set-scale
(new-valuet
) (gamma-like-distributionclml.statistics::gamma-like-distribution
))
40.2.1.3.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.4 Inherited Class: chi-square-distribution
40.2.1.4.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: chi-square-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.4.2 Description
40.2.1.4.3 Direct Slots
freedom
- Value type:
t
- Initial value:
NIL
- Initargs: freedom
- Allocation: instance
freedom
(freedom object)
- (
freedom
(t-distributiont-distribution
)) - (
freedom
(chi-square-distributionchi-square-distribution
))
set-freedom
(set-freedom new-value object)
- (
set-freedom
(new-valuet
) (t-distributiont-distribution
)) - (
set-freedom
(new-valuet
) (chi-square-distributionchi square-distribution
))
eq-gamma
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'GAMMA-DISTRIBUTION :SHAPE 2.0 :SCALE 2.0)
- Initargs: none
- Allocation: instance
eq-gamma
(eq-gamma object)
- (
eq-gamma
(chi-square-distributionchi-square-distribution
))
40.2.1.4.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.5 Inherited Class: covariance
40.2.1.5.1 Inheritance
- Parent classes: standard-object
- Precedence list: covariance, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.5.2 Description
40.2.1.5.3 Direct Slots
xy-mat-expec
- Value type:
t
- Initial value:
NIL
- Initargs: xy-mat-expec
- Allocation: instance
xy-mat-expec
(xy-mat-expec object)
- (
xy-mat-expec
(covariancecovariance
))
x-mean-vec
- Value type:
t
- Initial value:
NIL
- Initargs: x-mean-vec
- Allocation: instance
x-mean-vec
(x-mean-vec object)
- (
x-mean-vec
(covariancecovariance
))
y-mean-vec
- Value type:
t
- Initial value:
NIL
- Initargs: y-mean-vec
- Allocation: instance
y-mean-vec
(y-mean-vec object)
- (
y-mean-vec
(covariancecovariance
))
n
- Value type:
t
- Initial value:
NIL
- Initargs: n
- Allocation: instance
n
(n object)
- (
n
(matrix-covarianceclml.graph.graph anomaly-detection::matrix-covariance
)) - (
n
(covariancecovariance
))
40.2.1.6 Inherited Class: erlang-distribution
40.2.1.6.1 Inheritance
- Parent classes: gamma-like-distribution
- Precedence list: erlang-distribution, gamma-like-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.6.2 Description
40.2.1.6.3 Direct Slots
include-zero
- Value type:
t
- Initial value:
NIL
- Initargs: include-zero
- Allocation: instance
include-zero
(include-zero object)
- (
include-zero
(weibull-distributionweibull-distribution
)) - (
include-zero
(exponential-distributionexponential-distribution
)) - (
include-zero
(erlang-distributionerlang-distribution
))
set-include-zero
(set-include-zero new-value object)
- (
set-include-zero
(new-valuet
) (weibull-distributionweibull-distribution
)) - (
set-include-zero
(new-valuet
) (exponential-distributionexponential-distribution
)) - (
set-include-zero
(new-valuet
) (erlang-distributionerlang-distribution
))
40.2.1.6.4 Indirect Slots
shape
- Value type:
t
- Initial value:
NIL
- Initargs: shape
- Allocation: instance
scale
- Value type:
t
- Initial value:
NIL
- Initargs: scale
- Allocation: instance
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.7 Inherited Class: exponential-distribution
40.2.1.7.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: exponential-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.7.2 Description
40.2.1.7.3 Direct Slots
hazard
- Value type:
t
- Initial value:
NIL
- Initargs: hazard
- Allocation: instance
hazard
(hazard object)
- (
hazard
(exponential-distributionexponential-distribution
))
set-hazard
(set-hazard new-value object)
- (
set-hazard
(new-valuet
) (exponential-distributionexponential-distribution
))
scale
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
scale
(scale object)
- (
scale
(logistic-distributionlogistic-distribution
)) - (
scale
(cauchy-distributioncauchy distribution
)) - (
scale
(exponential-distributionexponential-distribution
)) - (
scale
(gamma-like-distributionclml.statistics::gamma-like-distribution
))
include-zero
- Value type:
t
- Initial value:
NIL
- Initargs: include-zero
- Allocation: instance
include-zero
(include-zero object)
- (
include-zero
(weibull-distributionweibull-distribution
)) - (
include-zero
(exponential-distributionexponential-distribution
)) - (
include-zero
(erlang-distributionerlang-distribution
))
set-include-zero
(set-include-zero new-value object)
- (
set-include-zero
(new-valuet
) (weibull-distributionweibull-distribution
)) - (
set-include-zero
(new-valuet
) (exponential-distributionexponential-distribution
)) - (
set-include-zero
(new-valuet
) (erlang-distributionerlang-distribution
))
skewness
- Value type:
t
- Initial value:
2.0
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
9.0
- Initargs: none
- Allocation: instance
mode
- Value type:
t
- Initial value:
0.0
- Initargs: none
- Allocation: instance
40.2.1.7.4 Indirect Slots
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.8 Inherited Class: f-distribution
40.2.1.8.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: f-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.8.2 Description
40.2.1.8.3 Direct Slots
freedom1
- Value type:
t
- Initial value:
NIL
- Initargs: freedom1
- Allocation: instance
freedom1
(freedom1 object)
- (
freedom1
(f-distributionf-distribution
))
set-freedom1
(set-freedom1 new-value object)
- (
set-freedom1
(new-valuet
) (f-distributionf-distribution
))
freedom2
- Value type:
t
- Initial value:
NIL
- Initargs: freedom2
- Allocation: instance
freedom2
(freedom2 object)
- (
freedom2
(f-distributionf-distribution
))
set-freedom2
(set-freedom2 new-value object)
- (
set-freedom2
(new-valuet
) (f-distributionf-distribution
))
chi1
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'CHI-SQUARE-DISTRIBUTION :FREEDOM 1)
- Initargs: none
- Allocation: instance
chi2
- Value type:
t
- Initial value:
(MAKE-INSTANCE 'CHI-SQUARE-DISTRIBUTION :FREEDOM 1)
- Initargs: none
- Allocation: instance
f
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.8.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.9 Inherited Class: gamma-distribution
40.2.1.9.1 Inheritance
- Parent classes: gamma-like-distribution
- Precedence list: gamma-distribution, gamma-like-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.9.2 Description
40.2.1.9.3 Direct Slots
gamma-factor
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
gamma-factor
(gamma-factor object)
- (
gamma-factor
(gamma-distributiongamma-distribution
))
shape-inv
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
d
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
c
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.9.4 Indirect Slots
shape
- Value type:
t
- Initial value:
NIL
- Initargs: shape
- Allocation: instance
scale
- Value type:
t
- Initial value:
NIL
- Initargs: scale
- Allocation: instance
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.10 Inherited Class: geometric-distribution
40.2.1.10.1 Inheritance
- Parent classes: bernoulli-related-distribution
- Precedence list: geometric-distribution, bernoulli-related-distribution, discrete-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.10.2 Description
40.2.1.10.3 Direct Slots
table
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
ki
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
vi
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
b
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
k
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
w
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
nsq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
psq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
q
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
r
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
c
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.10.4 Indirect Slots
probability
- Value type:
t
- Initial value:
NIL
- Initargs: probability
- Allocation: instance
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.11 Inherited Class: hypergeometric-distribution
40.2.1.11.1 Inheritance
- Parent classes: discrete-distribution
- Precedence list: hypergeometric-distribution, discrete-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.11.2 Description
40.2.1.11.3 Direct Slots
elements
- Value type:
t
- Initial value:
NIL
- Initargs: elements
- Allocation: instance
elements
(elements object)
- (
elements
(hypergeometric-distributionhypergeometric-distribution
))
set-elements
(set-elements new-value object)
- (
set-elements
(new-valuet
) (hypergeometric-distributionhypergeometric-distribution
))
successes
- Value type:
t
- Initial value:
NIL
- Initargs: successes
- Allocation: instance
successes
(successes object)
- (
successes
(hypergeometric-distributionhypergeometric-distribution
))
set-successes
(set-successes new-value object)
- (
set-successes
(new-valuet
) (hypergeometric-distributionhypergeometric-distribution
))
samples
- Value type:
t
- Initial value:
NIL
- Initargs: samples
- Allocation: instance
samples
(samples object)
- (
samples
(hypergeometric-distributionhypergeometric-distribution
))
set-samples
(set-samples new-value object)
- (
set-samples
(new-valuet
) (hypergeometric-distributionhypergeometric-distribution
))
table
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
ki
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
vi
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
b
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
k
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
w
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
nsq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
a1
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.11.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.12 Inherited Class: log-normal-distribution
40.2.1.12.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: log-normal-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.12.2 Description
40.2.1.12.3 Direct Slots
average
- Value type:
t
- Initial value:
NIL
- Initargs: average
- Allocation: instance
average
(average object)
- (
average
(log-normal-distributionlog-normal-distribution
)) - (
average
(normal-distributionnormal-distribution
))
set-average
(set-average new-value object)
- (
set-average
(new-valuet
) (log-normal-distributionlog normal-distribution
)) - (
set-average
(new-valuet
) (normal-distributionnormal distribution
))
std
- Value type:
t
- Initial value:
NIL
- Initargs: std
- Allocation: instance
std
(std object)
- (
std
(log-normal-distributionlog normal-distribution
)) - (
std
(normal-distributionnormal distribution
))
set-std
(set-std new-value object)
- (
set-std
(new-valuet
) (log-normal-distributionlog-normal distribution
)) - (
set-std
(new-valuet
) (normal-distributionnormal distribution
))
40.2.1.12.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.13 Inherited Class: logistic-distribution
40.2.1.13.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: logistic-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.13.2 Description
40.2.1.13.3 Direct Slots
location
- Value type:
t
- Initial value:
NIL
- Initargs: location
- Allocation: instance
location
(location object)
- (
location
(logistic-distributionlogistic-distribution
)) - (
location
(cauchy-distributioncauchy-distribution
))
set-location
(set-location new-value object)
- (
set-location
(new-valuet
) (logistic-distributionlogistic distribution
)) - (
set-location
(new-valuet
) (cauchy-distributioncauchy distribution
))
scale
- Value type:
t
- Initial value:
NIL
- Initargs: scale
- Allocation: instance
scale
(scale object)
- (
scale
(logistic-distributionlogistic-distribution
)) - (
scale
(cauchy-distributioncauchy distribution
)) - (
scale
(exponential-distributionexponential-distribution
)) - (
scale
(gamma-like-distributionclml.statistics::gamma-like-distribution
))
set-scale
(set-scale new-value object)
- (
set-scale
(new-valuet
) (logistic-distributionlogistic distribution
)) - (
set-scale
(new-valuet
) (cauchy-distributioncauchy distribution
)) - (
set-scale
(new-valuet
) (gamma-like-distributionclml.statistics::gamma-like-distribution
))
skewness
- Value type:
t
- Initial value:
0.0
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
4.2
- Initargs: none
- Allocation: instance
40.2.1.13.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.14 Inherited Class: negative-binomial-distribution
40.2.1.14.1 Inheritance
- Parent classes: bernoulli-related-distribution
- Precedence list: negative-binomial-distribution, bernoulli-related-distribution, discrete-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.14.2 Description
40.2.1.14.3 Direct Slots
success-r
- Value type:
t
- Initial value:
NIL
- Initargs: success-r
- Allocation: instance
success-r
(success-r object)
- (
success-r
(negative-binomial-distributionnegative-binomial-distribution
))
set-success-r
(set-success-r new-value object)
- (
set-success-r
(new-valuet
) (negative-binomial-distributionnegative-binomial-distribution
))
table
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
ki
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
vi
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
b
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
k
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
w
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
nsq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
psq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
q
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
r
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
xl
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
xu
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
pl
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
pu
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
que
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
s
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
tee
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.14.4 Indirect Slots
probability
- Value type:
t
- Initial value:
NIL
- Initargs: probability
- Allocation: instance
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.15 Inherited Class: normal-distribution
40.2.1.15.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: normal-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.15.2 Description
40.2.1.15.3 Direct Slots
average
- Value type:
t
- Initial value:
NIL
- Initargs: average
- Allocation: instance
average
(average object)
- (
average
(log-normal-distributionlog-normal-distribution
)) - (
average
(normal-distributionnormal-distribution
))
set-average
(set-average new-value object)
- (
set-average
(new-valuet
) (log-normal-distributionlog normal-distribution
)) - (
set-average
(new-valuet
) (normal-distributionnormal distribution
))
std
- Value type:
t
- Initial value:
NIL
- Initargs: std
- Allocation: instance
std
(std object)
- (
std
(log-normal-distributionlog normal-distribution
)) - (
std
(normal-distributionnormal distribution
))
set-std
(set-std new-value object)
- (
set-std
(new-valuet
) (log-normal-distributionlog-normal distribution
)) - (
set-std
(new-valuet
) (normal-distributionnormal distribution
))
skewness
- Value type:
t
- Initial value:
0.0
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
3.0
- Initargs: none
- Allocation: instance
40.2.1.15.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.16 Inherited Class: poisson-distribution
40.2.1.16.1 Inheritance
- Parent classes: discrete-distribution
- Precedence list: poisson-distribution, discrete-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.16.2 Description
40.2.1.16.3 Direct Slots
rate
- Value type:
t
- Initial value:
NIL
- Initargs: rate
- Allocation: instance
rate
(rate object)
- (
rate
(poisson-distributionpoisson distribution
))
set-rate
(set-rate new-value object)
- (
set-rate
(new-valuet
) (poisson-distributionpoisson distribution
))
table
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
ki
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
vi
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
b
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
k
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
w
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
nsq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
psq
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
q
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
r
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
xl
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
xu
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
pl
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
pu
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
c
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.16.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.17 Inherited Class: t-distribution
40.2.1.17.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: t-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.17.2 Description
40.2.1.17.3 Direct Slots
freedom
- Value type:
t
- Initial value:
NIL
- Initargs: freedom
- Allocation: instance
freedom
(freedom object)
- (
freedom
(t-distributiont-distribution
)) - (
freedom
(chi-square-distributionchi-square-distribution
))
set-freedom
(set-freedom new-value object)
- (
set-freedom
(new-valuet
) (t-distributiont-distribution
)) - (
set-freedom
(new-valuet
) (chi-square-distributionchi square-distribution
))
t-precalc
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
t-precalc
(t-precalc object)
- (
t-precalc
(t-distributiont-distribution
))
set-t-precalc
(set-t-precalc new-value object)
- (
set-t-precalc
(new-valuet
) (t-distributiont-distribution
))
r
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
b
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
c
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
a
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
d
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
k
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
w
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
s
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
p
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
q
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
t1
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
t2
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
v1
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
v2
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.17.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.18 Inherited Class: uniform-distribution
40.2.1.18.1 Inheritance
- Parent classes: continuous-distribution
- Precedence list: uniform-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.18.2 Description
40.2.1.18.3 Direct Slots
from
- Value type:
t
- Initial value:
NIL
- Initargs: from
- Allocation: instance
uniform-from
(uniform-from object)
- (
uniform-from
(uniform-distributionuniform-distribution
))
set-uniform-from
(set-uniform-from new-value object)
- (
set-uniform-from
(new-valuet
) (uniform-distributionuniform-distribution
))
to
- Value type:
t
- Initial value:
NIL
- Initargs: to
- Allocation: instance
uniform-to
(uniform-to object)
- (
uniform-to
(uniform-distributionuniform-distribution
))
set-uniform-to
(set-uniform-to new-value object)
- (
set-uniform-to
(new-valuet
) (uniform-distributionuniform distribution
))
width
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
uniform-width
(uniform-width object)
- (
uniform-width
(uniform-distributionuniform-distribution
))
denominator
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
uniform-denom
(uniform-denom object)
- (
uniform-denom
(uniform-distributionuniform-distribution
))
set-uniform-denom
(set-uniform-denom new-value object)
- (
set-uniform-denom
(new-valuet
) (uniform-distributionuniform-distribution
))
skewness
- Value type:
t
- Initial value:
0.0
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
1.8
- Initargs: none
- Allocation: instance
40.2.1.18.4 Indirect Slots
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.19 Inherited Class: weibull-distribution
40.2.1.19.1 Inheritance
- Parent classes: gamma-like-distribution
- Precedence list: weibull-distribution, gamma-like-distribution, continuous-distribution, distribution, standard-object, slot-object, t
- Direct subclasses: None.
40.2.1.19.2 Description
40.2.1.19.3 Direct Slots
include-zero
- Value type:
t
- Initial value:
NIL
- Initargs: include-zero
- Allocation: instance
include-zero
(include-zero object)
- (
include-zero
(weibull-distributionweibull-distribution
)) - (
include-zero
(exponential-distributionexponential-distribution
)) - (
include-zero
(erlang-distributionerlang-distribution
))
set-include-zero
(set-include-zero new-value object)
- (
set-include-zero
(new-valuet
) (weibull-distributionweibull-distribution
)) - (
set-include-zero
(new-valuet
) (exponential-distributionexponential-distribution
)) - (
set-include-zero
(new-valuet
) (erlang-distributionerlang-distribution
))
r-inv
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.1.19.4 Indirect Slots
shape
- Value type:
t
- Initial value:
NIL
- Initargs: shape
- Allocation: instance
scale
- Value type:
t
- Initial value:
NIL
- Initargs: scale
- Allocation: instance
mode
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
kurtosis
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
skewness
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
variance
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
mean
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
40.2.2 External Global Variables
40.2.2.1 Inherited Variable: mean
40.2.2.1.1 Value
#(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)
Type: simple-array
40.2.2.1.2 Description
40.2.3 External Functions
40.2.3.1 Inherited Function: beta-distribution
40.2.3.1.1 Syntax
(beta-distribution shape1 shape2)
40.2.3.1.2 Description
- Parameters: shape1 shape2
40.2.3.2 Inherited Function: beta-distribution-estimate
40.2.3.2.1 Syntax
(beta-distribution-estimate sequence)
40.2.3.2.2 Description
Estimates by matching moments.
40.2.3.3 Inherited Function: binom-dist-test
40.2.3.3.1 Syntax
(binom-dist-test d x size)
40.2.3.3.2 Description
- Input: sequence of frequency, sequence of class-value, size of Bernoulli trials
- Output( 3 values of p-list )
- result (:D-SIZE total-frequency :PROBABILITY population-rate)
- table (:FREQ frequency :P probability :E expectation)
- result2 (:CHI-SQ Chi-square-statistics :D.F. Degree-of-freedom :P-VALUE p-value)
40.2.3.4 Inherited Function: binomial-distribution
40.2.3.4.1 Syntax
(binomial-distribution size probability)
40.2.3.4.2 Description
- Parameters: size, probability
40.2.3.5 Inherited Function: binomial-distribution-estimate
40.2.3.5.1 Syntax
(binomial-distribution-estimate size successes)
40.2.3.5.2 Description
Maximum likelihood estimate.
40.2.3.6 Inherited Function: cauchy-distribution
40.2.3.6.1 Syntax
(cauchy-distribution location scale)
40.2.3.6.2 Description
- Parameters: location, scale
40.2.3.7 Inherited Function: cauchy-distribution-estimate
40.2.3.7.1 Syntax
(cauchy-distribution-estimate lst &optional (iterations 100))
40.2.3.7.2 Description
40.2.3.8 Inherited Function: cdf
40.2.3.8.1 Syntax
(cdf distribution x)
40.2.3.8.2 Description
Cumulative distribution function of DISTRIBUTION at X.
40.2.3.9 Inherited Function: chi-square-distribution
40.2.3.9.1 Syntax
(chi-square-distribution freedom)
40.2.3.9.2 Description
- Parameters: degree
- Estimators: [none]
40.2.3.10 Inherited Function: correlation-coefficient
40.2.3.10.1 Syntax
(correlation-coefficient seq1 seq2)
40.2.3.10.2 Description
Returns the correlation coefficient of SEQ1 and SEQ2, ie. covariance / (standard-deviation1 * standard-deviation2).
40.2.3.11 Inherited Function: count-values
40.2.3.11.1 Syntax
(count-values seq &key (test #'equal))
40.2.3.11.2 Description
40.2.3.12 Inherited Function: covariance
40.2.3.12.1 Syntax
(covariance seq1 seq2)
40.2.3.12.2 Description
Returns the covariance of SEQ1 and SEQ2.
40.2.3.13 Inherited Function: density
40.2.3.13.1 Syntax
(density continuous-distribution x)
40.2.3.13.2 Description
Density function of DISTRIBUTION at X.
40.2.3.14 Inherited Function: discrete-quantile
40.2.3.14.1 Syntax
(discrete-quantile sequence cuts)
40.2.3.14.2 Description
Returns the quantile(s) of SEQ at the given cut point(s). CUTS can be a single value or a list. (Variant: discrete-quantile-on-sorted (sorted-seq cuts))
The function gives the mean of the two numbers closest to the given ratio if the ratio does not give an exact (whole) position. This is what LISP-STAT does, but returning (LINEAR-COMBINATION (ELT SEQUENCE Q) R (ELT SEQUENCE (1+ Q))) may be better. More on this at http://mathworld.wolfram.com/Quantile.html.
CUTS is a single number or a list of numbers, each in the interval [0,1].
40.2.3.15 Inherited Function: discrete-quantile-on-sorted
40.2.3.15.1 Syntax
(discrete-quantile-on-sorted sequence cuts)
40.2.3.15.2 Description
Returns the quantile(s) of SEQ at the given cut point(s). CUTS can be a single value or a list. (Variant: discrete-quantile-on-sorted (sorted-seq cuts))
The function gives the mean of the two numbers closest to the given ratio if the ratio does not give an exact (whole) position. This is what LISP-STAT does, but returning (LINEAR-COMBINATION (ELT SEQUENCE Q) R (ELT SEQUENCE (1+ Q))) may be better. More on this at http://mathworld.wolfram.com/Quantile.html.
CUTS is a single number or a list of numbers, each in the interval [0,1].
40.2.3.16 Inherited Function: erlang-distribution
40.2.3.16.1 Syntax
(erlang-distribution scale shape)
40.2.3.16.2 Description
40.2.3.17 Inherited Function: erlang-distribution-estimate
40.2.3.17.1 Syntax
(erlang-distribution-estimate sequence)
40.2.3.17.2 Description
Estimates by matching moments.
40.2.3.18 Inherited Function: exponential-distribution
40.2.3.18.1 Syntax
(exponential-distribution scale-or-hazard &optional (hazardp t))
40.2.3.18.2 Description
(EXPONENTIAL-DISTRIBUTION SCALE T) or (EXPONENTIAL-DISTRIBUTION HAZARD).
40.2.3.19 Inherited Function: exponential-distribution-estimate
40.2.3.19.1 Syntax
(exponential-distribution-estimate sequence)
40.2.3.19.2 Description
Unbiased maximum likelihood estimate.
40.2.3.20 Inherited Function: f-distribution
40.2.3.20.1 Syntax
(f-distribution freedom1 freedom2)
40.2.3.20.2 Description
- Parameters: degree1 degree2
- Estimators: [none]
40.2.3.21 Inherited Function: five-number-summary
40.2.3.21.1 Syntax
(five-number-summary sequence)
40.2.3.21.2 Description
Returns the
40.2.3.22 Inherited Function: five-number-summary-on-sorted
40.2.3.22.1 Syntax
(five-number-summary-on-sorted sequence)
40.2.3.22.2 Description
Returns the
40.2.3.23 Inherited Function: gamma-distribution
40.2.3.23.1 Syntax
(gamma-distribution scale shape)
40.2.3.23.2 Description
- Parameters: scale, shape
- (Variant: erlang-distribution [shape is an integer])
- Numerical calculation: If there is a numerical problem with QUANTILE, QUANTILE-ILI would be solve it.\ ILI is abbreviation of the numerical calculation method of Inverse-Linear-Interpolation.\ However this is slower than Newton-Raphson(for QUANTILE).
40.2.3.24 Inherited Function: gamma-distribution-estimate
40.2.3.24.1 Syntax
(gamma-distribution-estimate sequence)
40.2.3.24.2 Description
Estimates by matching moments.
40.2.3.25 Inherited Function: geometric-distribution
40.2.3.25.1 Syntax
(geometric-distribution probability)
40.2.3.25.2 Description
- Parameters: probability
- (Supported on k = 1, 2, … (the # of trials until a success, inclusive))
40.2.3.26 Inherited Function: geometric-distribution-estimate
40.2.3.26.1 Syntax
(geometric-distribution-estimate trials)
40.2.3.26.2 Description
Maximum likelihood estimate.
40.2.3.27 Inherited Function: hypergeometric-distribution
40.2.3.27.1 Syntax
(hypergeometric-distribution elements successes samples)
40.2.3.27.2 Description
40.2.3.28 Inherited Function: hypergeometric-distribution-estimate-elements
40.2.3.28.1 Syntax
(hypergeometric-distribution-estimate-elements successes samples sample-successes)
40.2.3.28.2 Description
Maximum likelihood estimation.
40.2.3.29 Inherited Function: hypergeometric-distribution-estimate-successes-maximum-likelihood
:function:
40.2.3.29.1 Syntax
(hypergeometric-distribution-estimate-successes-maximum-likelihood elements samples sample-successes)
40.2.3.29.2 Description
40.2.3.30 Inherited Function: hypergeometric-distribution-estimate-successes-unbiased
:function:
40.2.3.30.1 Syntax
(hypergeometric-distribution-estimate-successes-unbiased elements samples sample-successes)
40.2.3.30.2 Description
40.2.3.31 Inherited Function: interquartile-range
40.2.3.31.1 Syntax
(interquartile-range sequence)
40.2.3.31.2 Description
40.2.3.32 Inherited Function: interquartile-range-on-sorted
40.2.3.32.1 Syntax
(interquartile-range-on-sorted sequence)
40.2.3.32.2 Description
40.2.3.33 Inherited Function: kendall-rank-correlation
40.2.3.33.1 Syntax
(kendall-rank-correlation seq1 seq2)
40.2.3.33.2 Description
Returns the Kendall
40.2.3.34 Inherited Function: linear-regression
40.2.3.34.1 Syntax
(linear-regression seq1 seq2)
40.2.3.34.2 Description
Fits a line y = A + Bx on the data points from SEQ1 x SEQ2. Returns (A B).
40.2.3.35 Inherited Function: log-normal-distribution
40.2.3.35.1 Syntax
(log-normal-distribution average std)
40.2.3.35.2 Description
- Parameters: expected-value, deviation
- Estimators: log-normal-distribution-estimate-unbiased, log-normal-distribution-estimate-maximum-likelihood
40.2.3.36 Inherited Function: log-normal-distribution-estimate-maximum-likelihood
:function:
40.2.3.36.1 Syntax
(log-normal-distribution-estimate-maximum-likelihood lst)
40.2.3.36.2 Description
40.2.3.37 Inherited Function: log-normal-distribution-estimate-unbiased
40.2.3.37.1 Syntax
(log-normal-distribution-estimate-unbiased lst)
40.2.3.37.2 Description
40.2.3.38 Inherited Function: logistic-distribution
40.2.3.38.1 Syntax
(logistic-distribution location scale)
40.2.3.38.2 Description
- Parameters: location, scale
40.2.3.39 Inherited Function: logistic-distribution-estimate
40.2.3.39.1 Syntax
(logistic-distribution-estimate sequence &optional (iteration 100) (tolerance 1.e-10))
40.2.3.39.2 Description
Maximal likelihood estimate.
40.2.3.40 Inherited Function: mean
40.2.3.40.1 Syntax
(mean obj)
40.2.3.40.2 Description
Returns the mean of SEQ.
40.2.3.41 Inherited Function: mean-deviation
40.2.3.41.1 Syntax
(mean-deviation sequence)
40.2.3.41.2 Description
Returns the mean deviation of SEQ.
40.2.3.42 Inherited Function: median
40.2.3.42.1 Syntax
(median sequence)
40.2.3.42.2 Description
Returns the median of SEQ. (Variant: median-on-sorted (sorted-seq))
40.2.3.43 Inherited Function: median-on-sorted
40.2.3.43.1 Syntax
(median-on-sorted sequence)
40.2.3.43.2 Description
Returns the median of SEQ. (Variant: median-on-sorted (sorted-seq))
40.2.3.44 Inherited Function: mode
40.2.3.44.1 Syntax
(mode obj &optional test)
40.2.3.44.2 Description
40.2.3.45 Inherited Function: negative-binomial-distribution
40.2.3.45.1 Syntax
(negative-binomial-distribution successes probability)
40.2.3.45.2 Description
- Parameters: successes, probability, failuresp
- Estimators: negative-binomial-distribution-estimate-unbiased, negative-binomial-distribution-estimate-maximum-likelihood
- When failuresp is NIL, the distribution is supported on k = s, s+1, … (the # of trials until a given number of successes, inclusive))
- When failuresp is T (the default), it is supported on k = 0, 1, … (the # of failures until a given number of successes, inclusive)
- Estimators also have the failuresp parameter
- (Variant: geometric-distribution [successes = 1, failuresp = nil])
Number of failures until a given number of successes, extended to real numbers. If FAILURESP is NIL, we look at the number of all trials, not just the failures.
40.2.3.46 Inherited Function: negative-binomial-distribution-estimate-maximum-likelihood
:function:
40.2.3.46.1 Syntax
(negative-binomial-distribution-estimate-maximum-likelihood successes trials)
40.2.3.46.2 Description
Estimate based on the number of successes in a given number of trials. FAILURESP works as in NEGATIVE-BINOMIAL-DISTRIBUTION.
40.2.3.47 Inherited Function: negative-binomial-distribution-estimate-unbiased
:function:
40.2.3.47.1 Syntax
(negative-binomial-distribution-estimate-unbiased successes trials)
40.2.3.47.2 Description
Estimate based on the number of successes in a given number of trials. FAILURESP works as in NEGATIVE-BINOMIAL-DISTRIBUTION.
40.2.3.48 Inherited Function: normal-dist-test
40.2.3.48.1 Syntax
(normal-dist-test freq-seq inf width precision)
40.2.3.48.2 Description
- Input: frequation sequence, infimum of the first class, class width, precision
- Output( 3 values of property-list )
- result (:TOTAL total-frequency :MEAN mean :VARIANCE variance :SD standard-deviation)
- table (:MID mid-value-of-each-class :FREQ frequency-of-each-class :Z standard-score :CDF cummulative-distribution-frequency :EXPECTATION expectation)
- result2 (:CHI-SQ Chi-square-statistics :D.F. Degree-of-freedom :P-VALUE p-value)
40.2.3.49 Inherited Function: normal-distribution
40.2.3.49.1 Syntax
(normal-distribution average std)
40.2.3.49.2 Description
- Parameters: expected-value, deviation
- Estimators: normal-distribution-estimate-unbiased, normal-distribution-estimate-maximum-likelihood
- (Variant: standard-normal-distribution)
40.2.3.50 Inherited Function: normal-distribution-estimate-maximum-likelihood
40.2.3.50.1 Syntax
(normal-distribution-estimate-maximum-likelihood sequence)
40.2.3.50.2 Description
40.2.3.51 Inherited Function: normal-distribution-estimate-unbiased
40.2.3.51.1 Syntax
(normal-distribution-estimate-unbiased sequence)
40.2.3.51.2 Description
40.2.3.52 Inherited Function: poisson-dist-test
40.2.3.52.1 Syntax
(poisson-dist-test d)
40.2.3.52.2 Description
- Input: sequence of frequency
- Output( 3 values of p-list )
- result (:N total-frequency :MEAN mean)
- table (:C-ID assumed-class-value :FREQ frequency :P probability :E expectation)
- result2 (:CHI-SQ Chi-square-statistics :D.F. Degree-of-freedom :P-VALUE p-value)
40.2.3.53 Inherited Function: poisson-distribution
40.2.3.53.1 Syntax
(poisson-distribution rate)
40.2.3.53.2 Description
- Parameters: rate
40.2.3.54 Inherited Function: poisson-distribution-estimate
40.2.3.54.1 Syntax
(poisson-distribution-estimate sequence)
40.2.3.54.2 Description
Maximum likelihood estimate, also unbiased and minimum variance.
40.2.3.55 Inherited Function: quantile
40.2.3.55.1 Syntax
(quantile distribution p)
40.2.3.55.2 Description
Quantile of P according to DISTRIBUTION.
40.2.3.56 Inherited Function: quantile-ili
40.2.3.56.1 Syntax
(quantile-ili distribution p)
40.2.3.56.2 Description
40.2.3.57 Inherited Function: rand
40.2.3.57.1 Syntax
(rand distribution)
40.2.3.57.2 Description
Gives a random number according to DISTRIBUTION.
40.2.3.58 Inherited Function: rand-n
40.2.3.58.1 Syntax
(rand-n distribution n)
40.2.3.58.2 Description
N random numbers according to DISTRIBUTION.
40.2.3.59 Inherited Function: range
40.2.3.59.1 Syntax
(range sequence)
40.2.3.59.2 Description
Returns the interquartile range of SEQ, ie. the difference of the discrete quantiles at 3/4 and 1/4. (Variant: interquartile-range-on-sorted (sorted-seq))
40.2.3.60 Inherited Function: smirnov-grubbs
40.2.3.60.1 Syntax
(smirnov-grubbs seq alpha &key (type max) (recursive nil) (sig-p-hash nil))
40.2.3.60.2 Description
Smirnov-Grubbs method for outlier verification.
- return: nil | sequence
- arguments:
- seq : <sequence of number>
- alpha : <number> , significance level
- type : :min | :max, which side of outlier value
- recursive : nil | t
- reference: http://aoki2.si.gunma-u.ac.jp/lecture/Grubbs/Grubbs.html
length of seq must be more than 4
40.2.3.61 Inherited Function: smirnov-grubbs-p
40.2.3.61.1 Syntax
(smirnov-grubbs-p seq position alpha &key (sig-p-hash nil))
40.2.3.61.2 Description
40.2.3.62 Inherited Function: spearman-rank-correlation
40.2.3.62.1 Syntax
(spearman-rank-correlation seq1 seq2)
40.2.3.62.2 Description
Gives the correlation coefficient based on just the relative size of the given values.
40.2.3.63 Inherited Function: standard-deviation
40.2.3.63.1 Syntax
(standard-deviation sequence &key populationp)
40.2.3.63.2 Description
Sample standard deviation; or population standard deviation if POPULATIONP.
40.2.3.64 Inherited Function: standard-normal-distribution
40.2.3.64.1 Syntax
(standard-normal-distribution)
40.2.3.64.2 Description
40.2.3.65 Inherited Function: standard-uniform-distribution
40.2.3.65.1 Syntax
(standard-uniform-distribution)
40.2.3.65.2 Description
40.2.3.66 Inherited Function: t-distribution
40.2.3.66.1 Syntax
(t-distribution freedom)
40.2.3.66.2 Description
- Parameters: degree
- Estimators: [none]
40.2.3.67 Inherited Function: uniform-distribution
40.2.3.67.1 Syntax
(uniform-distribution from to)
40.2.3.67.2 Description
- Parameters: from, to
- Estimators: uniform-distribution-estimate-moments, uniform-distribution-estimate-maximum-likelihood
- (Variant: standard-uniform-distribution)
40.2.3.68 Inherited Function: uniform-distribution-estimate-maximum-likelihood
:function:
40.2.3.68.1 Syntax
(uniform-distribution-estimate-maximum-likelihood sequence)
40.2.3.68.2 Description
40.2.3.69 Inherited Function: uniform-distribution-estimate-moments
40.2.3.69.1 Syntax
(uniform-distribution-estimate-moments sequence)
40.2.3.69.2 Description
40.2.3.70 Inherited Function: variance
40.2.3.70.1 Syntax
(variance obj)
40.2.3.70.2 Description
40.2.3.71 Inherited Function: weibull-distribution
40.2.3.71.1 Syntax
(weibull-distribution scale shape)
40.2.3.71.2 Description
- Parameters: scale, shape
40.2.3.72 Inherited Function: weibull-distribution-estimate
40.2.3.72.1 Syntax
(weibull-distribution-estimate sequence)
40.2.3.72.2 Description
Maximum likelihood estimate.
40.3 Ambiguous Symbols
40.3.1 Cauchy-Distribution
Disambiguation.
- Function:
cauchy-distribution
- Class:
cauchy-distribution
40.3.2 Hypergeometric-Distribution
Disambiguation.
- Function:
hypergeometric distribution
- Class:
hypergeometric-distribution
40.3.3 Log-Normal-Distribution
Disambiguation.
- Function:
log-normal-distribution
- Class:
log-normal-distribution
40.3.4 Logistic-Distribution
Disambiguation.
- Function:
logistic-distribution
- Class:
logistic-distribution
40.3.5 T-Distribution
Disambiguation.
- Function:
t-distribution
- Class:
t-distribution
40.3.6 Beta-Distribution
Disambiguation.
- Function:
beta-distribution
- Class:
beta-distribution
40.3.7 Binomial-Distribution
Disambiguation.
- Function:
binomial-distribution
- Class:
binomial-distribution
40.3.8 Covariance
Disambiguation.
- Function:
covariance
- Class:
covariance
40.3.9 Gamma-Distribution
Disambiguation.
- Function:
gamma-distribution
- Class:
gamma-distribution
40.3.10 Negative-Binomial-Distribution
Disambiguation.
- Function:
negative-binomial distribution
- Class:
negative-binomial distribution
40.3.11 Normal-Distribution
Disambiguation.
- Function:
normal-distribution
- Class:
normal-distribution
40.3.12 F-Distribution
Disambiguation.
- Function:
f-distribution
- Class:
f-distribution
40.3.13 Geometric-Distribution
Disambiguation.
- Function:
geometric-distribution
- Class:
geometric-distribution
40.3.14 Chi-Square-Distribution
Disambiguation.
- Function:
chi-square-distribution
- Class:
chi-square-distribution
40.3.15 Poisson-Distribution
Disambiguation.
- Function:
poisson-distribution
- Class:
poisson-distribution
40.3.16 Mean
Disambiguation.
- Variable:
mean
- Function:
mean
40.3.17 Weibull-Distribution
Disambiguation.
- Function:
weibull-distribution
- Class:
weibull-distribution
40.3.18 Uniform-Distribution
Disambiguation.
- Function:
uniform-distribution
- Class:
uniform-distribution
40.3.19 Rand
Disambiguation.
- Function:
rand
- Package:
rand
40.3.20 Exponential-Distribution
Disambiguation.
- Function:
exponential-distribution
- Class:
exponential-distribution
40.3.21 Erlang-Distribution
Disambiguation.
- Function:
erlang-distribution
- Class:
erlang-distribution
41 Package: clml.statistics.rand
- Uses: common-lisp
- Used by: clml.statistics
41.1 Description
41.2 External Symbols
41.2.1 External Constants
41.2.1.1 Constant: +bit-operation-m+
41.2.1.1.1 Value
62
Type: integer
41.2.1.1.2 Description
41.2.2 External Macros
41.2.2.1 Internal Macro: dfloat
41.2.2.1.1 Syntax
(dfloat x)
41.2.2.1.2 Description
41.2.3 External Functions
41.2.3.1 Function: arcsine-inverse
41.2.3.1.1 Syntax
(arcsine-inverse)
41.2.3.1.2 Description
41.2.3.2 Function: arcsine-polar
41.2.3.2.1 Syntax
(arcsine-polar)
41.2.3.2.2 Description
41.2.3.3 Function: arcsine-random
41.2.3.3.1 Syntax
(arcsine-random)
41.2.3.3.2 Description
41.2.3.4 Function: bernoulli
41.2.3.4.1 Syntax
(bernoulli)
41.2.3.4.2 Description
41.2.3.5 Function: beta-random
41.2.3.5.1 Syntax
(beta-random)
41.2.3.5.2 Description
41.2.3.6 Function: binomial-convolution
41.2.3.6.1 Syntax
(binomial-convolution)
41.2.3.6.2 Description
41.2.3.7 Function: binomial-convolution-coinflip
41.2.3.7.1 Syntax
(binomial-convolution-coinflip)
41.2.3.7.2 Description
41.2.3.8 Function: binomial-convolution-recycle
41.2.3.8.1 Syntax
(binomial-convolution-recycle)
41.2.3.8.2 Description
41.2.3.9 Function: binomial-convolution-recycle-cached
41.2.3.9.1 Syntax
(binomial-convolution-recycle-cached)
41.2.3.9.2 Description
41.2.3.10 Function: binomial-inverse
41.2.3.10.1 Syntax
(binomial-inverse)
41.2.3.10.2 Description
41.2.3.11 Function: binomial-inverse-cached
41.2.3.11.1 Syntax
(binomial-inverse-cached)
41.2.3.11.2 Description
41.2.3.12 Function: binomial-inverse-mode
41.2.3.12.1 Syntax
(binomial-inverse-mode)
41.2.3.12.2 Description
41.2.3.13 Function: binomial-inverse-mode-cached
41.2.3.13.1 Syntax
(binomial-inverse-mode-cached)
41.2.3.13.2 Description
41.2.3.14 Function: binomial-random
41.2.3.14.1 Syntax
(binomial-random)
41.2.3.14.2 Description
41.2.3.15 Function: binomial-table
41.2.3.15.1 Syntax
(binomial-table)
41.2.3.15.2 Description
41.2.3.16 Function: binomial-table-histogram
41.2.3.16.1 Syntax
(binomial-table-histogram)
41.2.3.16.2 Description
41.2.3.17 Function: binomial-table-histogram-lookup
41.2.3.17.1 Syntax
(binomial-table-histogram-lookup)
41.2.3.17.2 Description
41.2.3.18 Function: binomial-table-lookup
41.2.3.18.1 Syntax
(binomial-table-lookup)
41.2.3.18.2 Description
41.2.3.19 Function: box-muller
41.2.3.19.1 Syntax
(box-muller)
41.2.3.19.2 Description
41.2.3.20 Function: cauchy-inverse
41.2.3.20.1 Syntax
(cauchy-inverse)
41.2.3.20.2 Description
41.2.3.21 Function: cauchy-monty-python
41.2.3.21.1 Syntax
(cauchy-monty-python)
41.2.3.21.2 Description
41.2.3.22 Function: cauchy-monty-python-bit
41.2.3.22.1 Syntax
(cauchy-monty-python-bit)
41.2.3.22.2 Description
41.2.3.23 Function: cauchy-polar
41.2.3.23.1 Syntax
(cauchy-polar)
41.2.3.23.2 Description
41.2.3.24 Function: cauchy-polar-gauss
41.2.3.24.1 Syntax
(cauchy-polar-gauss)
41.2.3.24.2 Description
41.2.3.25 Function: cauchy-random
41.2.3.25.1 Syntax
(cauchy-random)
41.2.3.25.2 Description
41.2.3.26 Function: cauchy-ziggurat-bit
41.2.3.26.1 Syntax
(cauchy-ziggurat-bit)
41.2.3.26.2 Description
41.2.3.27 Function: chi-square-convolution
41.2.3.27.1 Syntax
(chi-square-convolution)
41.2.3.27.2 Description
41.2.3.28 Function: chi-square-random
41.2.3.28.1 Syntax
(chi-square-random)
41.2.3.28.2 Description
41.2.3.29 Function: combination
41.2.3.29.1 Syntax
(combination)
41.2.3.29.2 Description
41.2.3.30 Function: erlang-convolution
41.2.3.30.1 Syntax
(erlang-convolution)
41.2.3.30.2 Description
41.2.3.31 Function: erlang-convolution-include-zero
41.2.3.31.1 Syntax
(erlang-convolution-include-zero)
41.2.3.31.2 Description
41.2.3.32 Function: erlang-random
41.2.3.32.1 Syntax
(erlang-random)
41.2.3.32.2 Description
41.2.3.33 Function: exp-inverse
41.2.3.33.1 Syntax
(exp-inverse)
41.2.3.33.2 Description
41.2.3.34 Function: exp-inverse-include-zero
41.2.3.34.1 Syntax
(exp-inverse-include-zero)
41.2.3.34.2 Description
41.2.3.35 Function: exp-random
41.2.3.35.1 Syntax
(exp-random)
41.2.3.35.2 Description
41.2.3.36 Function: exp-ziggurat-bit
41.2.3.36.1 Syntax
(exp-ziggurat-bit)
41.2.3.36.2 Description
41.2.3.37 Function: exp-ziggurat-bit-include-zero
41.2.3.37.1 Syntax
(exp-ziggurat-bit-include-zero)
41.2.3.37.2 Description
41.2.3.38 Function: f-random
41.2.3.38.1 Syntax
(f-random)
41.2.3.38.2 Description
41.2.3.39 Function: f-random-cached
41.2.3.39.1 Syntax
(f-random-cached)
41.2.3.39.2 Description
41.2.3.40 Function: gamma-compression
41.2.3.40.1 Syntax
(gamma-compression)
41.2.3.40.2 Description
41.2.3.41 Function: gamma-compression-shape-big
41.2.3.41.1 Syntax
(gamma-compression-shape-big)
41.2.3.41.2 Description
41.2.3.42 Function: gamma-compression-shape-big-cached
41.2.3.42.1 Syntax
(gamma-compression-shape-big-cached)
41.2.3.42.2 Description
41.2.3.43 Function: gamma-compression-shape-small
41.2.3.43.1 Syntax
(gamma-compression-shape-small)
41.2.3.43.2 Description
41.2.3.44 Function: gamma-compression-shape-small-cached
41.2.3.44.1 Syntax
(gamma-compression-shape-small-cached)
41.2.3.44.2 Description
41.2.3.45 Function: gamma-inverse
41.2.3.45.1 Syntax
(gamma-inverse)
41.2.3.45.2 Description
41.2.3.46 Function: gamma-inverse-shape-big
41.2.3.46.1 Syntax
(gamma-inverse-shape-big)
41.2.3.46.2 Description
41.2.3.47 Function: gamma-inverse-shape-big-cached
41.2.3.47.1 Syntax
(gamma-inverse-shape-big-cached)
41.2.3.47.2 Description
41.2.3.48 Function: gamma-inverse-shape-small
41.2.3.48.1 Syntax
(gamma-inverse-shape-small)
41.2.3.48.2 Description
41.2.3.49 Function: gamma-inverse-shape-small-cached
41.2.3.49.1 Syntax
(gamma-inverse-shape-small-cached)
41.2.3.49.2 Description
41.2.3.50 Function: gamma-random
41.2.3.50.1 Syntax
(gamma-random)
41.2.3.50.2 Description
41.2.3.51 Function: gauss-half-ziggurat-bit
41.2.3.51.1 Syntax
(gauss-half-ziggurat-bit)
41.2.3.51.2 Description
41.2.3.52 Function: gauss-monty-python
41.2.3.52.1 Syntax
(gauss-monty-python)
41.2.3.52.2 Description
41.2.3.53 Function: gauss-monty-python-bit
41.2.3.53.1 Syntax
(gauss-monty-python-bit)
41.2.3.53.2 Description
41.2.3.54 Function: gauss-polar
41.2.3.54.1 Syntax
(gauss-polar)
41.2.3.54.2 Description
41.2.3.55 Function: gauss-ziggurat
41.2.3.55.1 Syntax
(gauss-ziggurat)
41.2.3.55.2 Description
41.2.3.56 Function: gauss-ziggurat-bit
41.2.3.56.1 Syntax
(gauss-ziggurat-bit)
41.2.3.56.2 Description
41.2.3.57 Function: geometric-bernoulli
41.2.3.57.1 Syntax
(geometric-bernoulli)
41.2.3.57.2 Description
41.2.3.58 Function: geometric-bernoulli-coinflip
41.2.3.58.1 Syntax
(geometric-bernoulli-coinflip)
41.2.3.58.2 Description
41.2.3.59 Function: geometric-bernoulli-recycle
41.2.3.59.1 Syntax
(geometric-bernoulli-recycle)
41.2.3.59.2 Description
41.2.3.60 Function: geometric-bernoulli-recycle-cached
41.2.3.60.1 Syntax
(geometric-bernoulli-recycle-cached)
41.2.3.60.2 Description
41.2.3.61 Function: geometric-inverse
41.2.3.61.1 Syntax
(geometric-inverse)
41.2.3.61.2 Description
41.2.3.62 Function: geometric-inverse-cached
41.2.3.62.1 Syntax
(geometric-inverse-cached)
41.2.3.62.2 Description
41.2.3.63 Function: geometric-inverse-exp
41.2.3.63.1 Syntax
(geometric-inverse-exp)
41.2.3.63.2 Description
41.2.3.64 Function: geometric-inverse-exp-cached
41.2.3.64.1 Syntax
(geometric-inverse-exp-cached)
41.2.3.64.2 Description
41.2.3.65 Function: geometric-random
41.2.3.65.1 Syntax
(geometric-random)
41.2.3.65.2 Description
41.2.3.66 Function: geometric-table-histogram
41.2.3.66.1 Syntax
(geometric-table-histogram)
41.2.3.66.2 Description
41.2.3.67 Function: geometric-table-histogram-lookup
41.2.3.67.1 Syntax
(geometric-table-histogram-lookup)
41.2.3.67.2 Description
41.2.3.68 Function: half-integer-power
41.2.3.68.1 Syntax
(half-integer-power)
41.2.3.68.2 Description
41.2.3.69 Function: half-normal-random
41.2.3.69.1 Syntax
(half-normal-random)
41.2.3.69.2 Description
41.2.3.70 Function: hypergeometric-inverse
41.2.3.70.1 Syntax
(hypergeometric-inverse)
41.2.3.70.2 Description
41.2.3.71 Function: hypergeometric-inverse-cached
41.2.3.71.1 Syntax
(hypergeometric-inverse-cached)
41.2.3.71.2 Description
41.2.3.72 Function: hypergeometric-inverse-mode
41.2.3.72.1 Syntax
(hypergeometric-inverse-mode)
41.2.3.72.2 Description
41.2.3.73 Function: hypergeometric-inverse-mode-cached
41.2.3.73.1 Syntax
(hypergeometric-inverse-mode-cached)
41.2.3.73.2 Description
41.2.3.74 Function: hypergeometric-random
41.2.3.74.1 Syntax
(hypergeometric-random)
41.2.3.74.2 Description
41.2.3.75 Function: hypergeometric-simulate
41.2.3.75.1 Syntax
(hypergeometric-simulate)
41.2.3.75.2 Description
41.2.3.76 Function: hypergeometric-table-histogram
41.2.3.76.1 Syntax
(hypergeometric-table-histogram)
41.2.3.76.2 Description
41.2.3.77 Function: hypergeometric-table-histogram-lookup
41.2.3.77.1 Syntax
(hypergeometric-table-histogram-lookup)
41.2.3.77.2 Description
41.2.3.78 Function: int-power
41.2.3.78.1 Syntax
(int-power)
41.2.3.78.2 Description
41.2.3.79 Function: laplace-inverse
41.2.3.79.1 Syntax
(laplace-inverse)
41.2.3.79.2 Description
41.2.3.80 Function: laplace-ziggurat-bit
41.2.3.80.1 Syntax
(laplace-ziggurat-bit)
41.2.3.80.2 Description
41.2.3.81 Function: left-triangular-compare
41.2.3.81.1 Syntax
(left-triangular-compare)
41.2.3.81.2 Description
41.2.3.82 Function: left-triangular-compare-cached
41.2.3.82.1 Syntax
(left-triangular-compare-cached)
41.2.3.82.2 Description
41.2.3.83 Function: left-triangular-inverse
41.2.3.83.1 Syntax
(left-triangular-inverse)
41.2.3.83.2 Description
41.2.3.84 Function: left-triangular-inverse-cached
41.2.3.84.1 Syntax
(left-triangular-inverse-cached)
41.2.3.84.2 Description
41.2.3.85 Function: left-triangular-random
41.2.3.85.1 Syntax
(left-triangular-random a b)
41.2.3.85.2 Description
41.2.3.86 Function: logistic-inverse
41.2.3.86.1 Syntax
(logistic-inverse)
41.2.3.86.2 Description
41.2.3.87 Function: logistic-random
41.2.3.87.1 Syntax
(logistic-random)
41.2.3.87.2 Description
41.2.3.88 Function: logistic-ziggurat-bit
41.2.3.88.1 Syntax
(logistic-ziggurat-bit)
41.2.3.88.2 Description
41.2.3.89 Function: negative-binomial-compose
41.2.3.89.1 Syntax
(negative-binomial-compose)
41.2.3.89.2 Description
41.2.3.90 Function: negative-binomial-compose-cached
41.2.3.90.1 Syntax
(negative-binomial-compose-cached)
41.2.3.90.2 Description
41.2.3.91 Function: negative-binomial-convolution-integer
41.2.3.91.1 Syntax
(negative-binomial-convolution-integer)
41.2.3.91.2 Description
41.2.3.92 Function: negative-binomial-inverse
41.2.3.92.1 Syntax
(negative-binomial-inverse)
41.2.3.92.2 Description
41.2.3.93 Function: negative-binomial-inverse-cached
41.2.3.93.1 Syntax
(negative-binomial-inverse-cached)
41.2.3.93.2 Description
41.2.3.94 Function: negative-binomial-inverse-mode
41.2.3.94.1 Syntax
(negative-binomial-inverse-mode)
41.2.3.94.2 Description
41.2.3.95 Function: negative-binomial-inverse-mode-cached
41.2.3.95.1 Syntax
(negative-binomial-inverse-mode-cached)
41.2.3.95.2 Description
41.2.3.96 Function: negative-binomial-random
41.2.3.96.1 Syntax
(negative-binomial-random)
41.2.3.96.2 Description
41.2.3.97 Function: negative-binomial-table-histogram
41.2.3.97.1 Syntax
(negative-binomial-table-histogram)
41.2.3.97.2 Description
41.2.3.98 Function: negative-binomial-table-histogram-lookup
41.2.3.98.1 Syntax
(negative-binomial-table-histogram-lookup)
41.2.3.98.2 Description
41.2.3.99 Internal Function: normal-random
41.2.3.99.1 Syntax
(normal-random)
41.2.3.99.2 Description
41.2.3.100 Function: poisson-inverse
41.2.3.100.1 Syntax
(poisson-inverse)
41.2.3.100.2 Description
41.2.3.101 Function: poisson-inverse-cached
41.2.3.101.1 Syntax
(poisson-inverse-cached)
41.2.3.101.2 Description
41.2.3.102 Function: poisson-inverse-mode
41.2.3.102.1 Syntax
(poisson-inverse-mode)
41.2.3.102.2 Description
41.2.3.103 Function: poisson-inverse-mode-cached
41.2.3.103.1 Syntax
(poisson-inverse-mode-cached)
41.2.3.103.2 Description
41.2.3.104 Function: poisson-random
41.2.3.104.1 Syntax
(poisson-random)
41.2.3.104.2 Description
41.2.3.105 Function: poisson-simulate
41.2.3.105.1 Syntax
(poisson-simulate)
41.2.3.105.2 Description
41.2.3.106 Function: poisson-simulate-cached
41.2.3.106.1 Syntax
(poisson-simulate-cached)
41.2.3.106.2 Description
41.2.3.107 Function: poisson-simulate-exp
41.2.3.107.1 Syntax
(poisson-simulate-exp)
41.2.3.107.2 Description
41.2.3.108 Function: poisson-table-histogram
41.2.3.108.1 Syntax
(poisson-table-histogram)
41.2.3.108.2 Description
41.2.3.109 Function: poisson-table-histogram-lookup
41.2.3.109.1 Syntax
(poisson-table-histogram-lookup)
41.2.3.109.2 Description
41.2.3.110 Function: power-function-inverse
41.2.3.110.1 Syntax
(power-function-inverse)
41.2.3.110.2 Description
41.2.3.111 Function: power-function-inverse-cached
41.2.3.111.1 Syntax
(power-function-inverse-cached)
41.2.3.111.2 Description
41.2.3.112 Function: power-function-random
41.2.3.112.1 Syntax
(power-function-random)
41.2.3.112.2 Description
41.2.3.113 Function: power-function-with-gamma
41.2.3.113.1 Syntax
(power-function-with-gamma)
41.2.3.113.2 Description
41.2.3.114 Function: power-function-with-gamma-cached
41.2.3.114.1 Syntax
(power-function-with-gamma-cached)
41.2.3.114.2 Description
41.2.3.115 Function: right-triangular-compare
41.2.3.115.1 Syntax
(right-triangular-compare)
41.2.3.115.2 Description
41.2.3.116 Function: right-triangular-compare-cached
41.2.3.116.1 Syntax
(right-triangular-compare-cached)
41.2.3.116.2 Description
41.2.3.117 Function: right-triangular-inverse
41.2.3.117.1 Syntax
(right-triangular-inverse)
41.2.3.117.2 Description
41.2.3.118 Function: right-triangular-inverse-cached
41.2.3.118.1 Syntax
(right-triangular-inverse-cached)
41.2.3.118.2 Description
41.2.3.119 Function: right-triangular-random
41.2.3.119.1 Syntax
(right-triangular-random a b)
41.2.3.119.2 Description
41.2.3.120 Function: t-compression
41.2.3.120.1 Syntax
(t-compression)
41.2.3.120.2 Description
41.2.3.121 Function: t-compression-cached
41.2.3.121.1 Syntax
(t-compression-cached)
41.2.3.121.2 Description
41.2.3.122 Function: t-monty-python
41.2.3.122.1 Syntax
(t-monty-python)
41.2.3.122.2 Description
41.2.3.123 Function: t-monty-python-bit
41.2.3.123.1 Syntax
(t-monty-python-bit)
41.2.3.123.2 Description
41.2.3.124 Function: t-monty-python-bit-cached
41.2.3.124.1 Syntax
(t-monty-python-bit-cached)
41.2.3.124.2 Description
41.2.3.125 Function: t-monty-python-cached
41.2.3.125.1 Syntax
(t-monty-python-cached)
41.2.3.125.2 Description
41.2.3.126 Function: t-random
41.2.3.126.1 Syntax
(t-random)
41.2.3.126.2 Description
41.2.3.127 Function: t-with-gamma
41.2.3.127.1 Syntax
(t-with-gamma)
41.2.3.127.2 Description
41.2.3.128 Function: t-with-gamma-cached
41.2.3.128.1 Syntax
(t-with-gamma-cached)
41.2.3.128.2 Description
41.2.3.129 Function: test-random-moment
41.2.3.129.1 Syntax
(test-random-moment fn &optional (times 10000000))
41.2.3.129.2 Description
41.2.3.130 Function: unit-random
41.2.3.130.1 Syntax
(unit-random &optional mode)
41.2.3.130.2 Description
A random number in the range [0, 1), (0, 1], [0, 1] or (0, 1).
41.2.3.131 Function: weibull-inverse
41.2.3.131.1 Syntax
(weibull-inverse)
41.2.3.131.2 Description
41.2.3.132 Function: weibull-inverse-cached
41.2.3.132.1 Syntax
(weibull-inverse-cached)
41.2.3.132.2 Description
41.2.3.133 Function: weibull-random
41.2.3.133.1 Syntax
(weibull-random)
41.2.3.133.2 Description
42 Package: clml.svm.mu
- Uses: common-lisp, hjs.util.meta
- Used by: clml.test
42.1 Description
support vector machine package
Iterative solution, as in Multiplicative Updates for Nonnegative Quadratic Programming in Support Vector Machines, F. Sha, L. K. Saul, D. D. Lee. and the sum constraint is described in Multiplicative Updates for Large Margin Classifiers, F. Sha, L. K. Saul, D. D. Lee.
A nice and clear explanation of SVMs can be found in Support Vector Machines Explained, Tristan Fletcher, 2008
42.2 External Symbols
42.2.1 External Classes
42.2.1.1 Inherited Class: kernel
42.2.1.1.1 Inheritance
- Parent classes: standard-object
- Precedence list: kernel, standard-object, slot-object, t
- Direct subclasses: sigmoid-kernel, radial kernel, polynomial-kernel
42.2.1.1.2 Description
42.2.1.1.3 Direct Slots
biasedp
- Value type:
t
- Initial value:
NIL
- Initargs: biasedp
- Allocation: instance
biasedp
(biasedp object)
- (
biasedp
(kernelkernel
))
42.2.1.2 Inherited Class: polynomial-kernel
42.2.1.2.1 Inheritance
- Parent classes: kernel
- Precedence list: polynomial-kernel, kernel, standard-object, slot-object, t
- Direct subclasses: None.
42.2.1.2.2 Description
- reader:
- dimension
- homogeneousp
- generator:
- polynomial-kernel (dimension homogeneousp)
42.2.1.2.3 Direct Slots
biasedp
- Value type:
t
- Initial value:
T
- Initargs: none
- Allocation: instance
dimension
- Value type:
t
- Initial value:
NIL
- Initargs: dimension
- Allocation: instance
dimension
(dimension object)
- (
dimension
(polynomial-kernelpolynomial-kernel
))
homogeneousp
- Value type:
t
- Initial value:
NIL
- Initargs: homogeneousp
- Allocation: instance
homogeneousp
(homogeneousp object)
- (
homogeneousp
(polynomial-kernelpolynomial-kernel
))
42.2.1.3 Inherited Class: radial-kernel
42.2.1.3.1 Inheritance
- Parent classes: kernel
- Precedence list: radial-kernel, kernel, standard-object, slot-object, t
- Direct subclasses: None.
42.2.1.3.2 Description
- reader:
- gamma : <number> above 0
- generator:
- radial-kernel (gamma)
- gaussian-kernel (sigma2)
42.2.1.3.3 Direct Slots
biasedp
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
gamma
- Value type:
t
- Initial value:
NIL
- Initargs: gamma
- Allocation: instance
gamma
(gamma object)
- (
gamma
(radial-kernelradial-kernel
))
42.2.1.4 Inherited Class: sigmoid-kernel
42.2.1.4.1 Inheritance
- Parent classes: kernel
- Precedence list: sigmoid-kernel, kernel, standard-object, slot-object, t
- Direct subclasses: None.
42.2.1.4.2 Description
- reader:
- kappa : <number>
- shift : <number>
- generator:
- sigmoid-kernel (kappa shift)
42.2.1.4.3 Direct Slots
biasedp
- Value type:
t
- Initial value:
T
- Initargs: none
- Allocation: instance
kappa
- Value type:
t
- Initial value:
NIL
- Initargs: kappa
- Allocation: instance
kappa
(kappa object)
- (
kappa
(sigmoid-kernelsigmoid-kernel
))
shift
- Value type:
t
- Initial value:
NIL
- Initargs: shift
- Allocation: instance
shift
(shift object)
- (
shift
(sigmoid-kernelsigmoid-kernel
))
42.2.2 External Global Variables
42.2.2.1 Inherited Variable: +linear-kernel+
42.2.2.1.1 Value
#<POLYNOMIAL-KERNEL : D = 1 HOMOGENEOUS>
Type: polynomial-kernel
42.2.2.1.2 Description
42.2.2.2 Inherited Variable: svm
42.2.2.2.1 Value
#<CLOSURE (LAMBDA (CLML.SVM.PWSS3::POINT) :IN CLML.SVM.PWSS3::MAKE-DISCRIMINANT-FUNCTION) {1003880DBB}>
Type: function
42.2.2.2.2 Description
42.2.3 External Functions
42.2.3.1 Inherited Function: gaussian-kernel
42.2.3.1.1 Syntax
(gaussian-kernel sigma2)
42.2.3.1.2 Description
42.2.3.2 Inherited Function: kernel
42.2.3.2.1 Syntax
(kernel kernel x1 x2)
42.2.3.2.2 Description
42.2.3.3 Inherited Function: polynomial-kernel
42.2.3.3.1 Syntax
(polynomial-kernel dimension homogeneousp)
42.2.3.3.2 Description
42.2.3.4 Inherited Function: radial-kernel
42.2.3.4.1 Syntax
(radial-kernel gamma)
42.2.3.4.2 Description
For GAMMA > 0.
42.2.3.5 Inherited Function: sigmoid-kernel
42.2.3.5.1 Syntax
(sigmoid-kernel kappa shift)
42.2.3.5.2 Description
For some [not every] KAPPA > 0 and SHIFT < 0.
42.2.3.6 Inherited Function: svm
42.2.3.6.1 Syntax
(svm)
42.2.3.6.2 Description
- return: <Closure>
- return of <Closure>: two values, (result number)
- result : t(positive) | nil(negative)
- number : value of kernel-fn
- argument of <Closure>: <seq>, estimation target
- return of <Closure>: two values, (result number)
- arguments:
- kernel : <kernel-fn>
- positive-data : <seq seq>, training data e.g. '((8 8) (8 20) (8 44))
- negative-data : <seq seq>, training data
- iterations : <integer>
- lagrange-iterations : <integer>
- tolerance : <number>
Returns a decision function based on the given kernel function and training data.
SVM(8): (defparameter *positive-set* '((8.0 8.0) (8.0 20.0) (8.0 44.0) (8.0 56.0) (12.0 32.0) (16.0 16.0) (16.0 48.0) (24.0 20.0) (24.0 32.0) (24.0 44.0) (28.0 8.0) (32.0 52.0) (36.0 16.0))) SVM(9): (defparameter *negative-set* '((36.0 24.0) (36.0 36.0) (44.0 8.0) (44.0 44.0) (44.0 56.0) (48.0 16.0) (48.0 28.0) (56.0 8.0) (56.0 44.0) (56.0 52.0))) SVM(21): (setf linear-fcn (svm +linear-kernel+ *positive-set* *negative-set*)) #<Closure (:INTERNAL DECISION 0) @ #x212ebfc2> SVM(22): (funcall linear-fcn (car (last *positive-set*))) NIL -46.88582273865575 SVM(23): (setf polynomial-fcn (svm (polynomial-kernel 3 nil) *positive-set* *negative-set*)) #<Closure (:INTERNAL DECISION 0) @ #x20b7c122> SVM(24): (funcall polynomial-fcn (car (last *positive-set*))) T 4.849458930036461e+7 SVM(25): (funcall polynomial-fcn '(30.0 20.0)) T 2.3224182219070548e+8
42.3 Ambiguous Symbols
42.3.1 Sigmoid-Kernel
Disambiguation.
- Function:
sigmoid-kernel
- Class:
sigmoid-kernel
42.3.2 Radial-Kernel
Disambiguation.
- Function:
radial-kernel
- Class:
radial-kernel
42.3.3 Polynomial-Kernel
Disambiguation.
- Function:
polynomial-kernel
- Class:
polynomial-kernel
42.3.4 Kernel
Disambiguation.
- Function:
kernel
- Class:
kernel
42.3.5 Svm
Disambiguation.
- Variable:
svm
- Function:
svm
- Package:
svm
43 Package: clml.svm.one-class
- Uses: common-lisp, clml.svm.wss3, hjs.util.meta, hjs.util.vector, hjs.learn.read-data, hjs.util.matrix
- Used by: clml.test
43.1 Description
Support Vector Regression Package using SMO-type algorithm
Reference:
43.2 External Symbols
43.2.1 External Functions
43.2.1.1 Inherited Function: one-class-svm
43.2.1.1.1 Syntax
(one-class-svm data-vector &key nu gamma)
43.2.1.1.2 Description
- return: <Closure>, one-class-SVM
- arguments:
- data-vector : (SIMPLE-ARRAY T (* )) consist of (SIMPLE-ARRAY DOUBLE-FLOAT (* ))
- nu : 0 <= nu <= 1, parameter
- gamma : gamma of RBF-kernel
ONE-CLASS-SVM(15): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-train-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 338 POINTS ONE-CLASS-SVM(16): (setf data-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 4.0 4.0 5.0 7.0 10.0 3.0 2.0 1.0 1.0) #(6.0 8.0 8.0 1.0 3.0 4.0 3.0 7.0 1.0 1.0) #(8.0 10.0 10.0 8.0 7.0 10.0 9.0 7.0 1.0 -1.0) #(2.0 1.0 2.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(4.0 2.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 3.0 3.0 1.0 1.0 1.0) #(7.0 4.0 6.0 4.0 6.0 1.0 4.0 3.0 1.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(6.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) ...) ONE-CLASS-SVM(17): (setf one-class-svm (one-class-svm data-vector :nu 0.01 :gamma 0.005)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x1003db0772> ONE-CLASS-SVM(18): (funcall one-class-svm (svref data-vector 0)) 1.0 ;;normal value ONE-CLASS-SVM(19): (loop for data across data-vector if (= -1.0 (funcall one-class-svm data)) do (print data)) ;;outliers #(10.0 4.0 2.0 1.0 3.0 2.0 4.0 3.0 10.0 -1.0) #(6.0 10.0 2.0 8.0 10.0 2.0 7.0 8.0 10.0 -1.0) #(5.0 10.0 6.0 1.0 10.0 4.0 4.0 10.0 10.0 -1.0) #(1.0 1.0 1.0 1.0 10.0 1.0 1.0 1.0 1.0 1.0) #(10.0 8.0 10.0 10.0 6.0 1.0 3.0 1.0 10.0 -1.0) #(10.0 10.0 10.0 3.0 10.0 10.0 9.0 10.0 1.0 -1.0) #(9.0 1.0 2.0 6.0 4.0 10.0 7.0 7.0 2.0 -1.0) #(2.0 7.0 10.0 10.0 7.0 10.0 4.0 9.0 4.0 -1.0) #(3.0 10.0 3.0 10.0 6.0 10.0 5.0 1.0 4.0 -1.0) #(1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0) #(10.0 8.0 10.0 1.0 3.0 10.0 5.0 1.0 1.0 -1.0) #(10.0 2.0 2.0 1.0 2.0 6.0 1.0 1.0 2.0 -1.0) #(5.0 7.0 10.0 10.0 5.0 10.0 10.0 10.0 1.0 -1.0) NIL
43.2.1.2 Inherited Function: qp-solver
43.2.1.2.1 Syntax
(qp-solver training-vector kernel-function nu)
43.2.1.2.2 Description
for one-class-svm
43.3 Ambiguous Symbols
43.3.1 One-Class-Svm
Disambiguation.
- Function:
one-class-svm
- Package:
one-class-svm
44 Package: clml.svm.pwss3
- Uses: common-lisp, hjs.util.meta, hjs.util.vector, hjs.learn.read-data, hjs.util.matrix
- Used by: clml.test
44.1 Description
44.2 External Symbols
44.2.1 External Functions
44.2.1.1 Internal Function: load-svm-learner
44.2.1.1.1 Syntax
(load-svm-learner file-name kernel-function &key external-format)
44.2.1.1.2 Description
44.2.1.2 Internal Function: make-linear-kernel
44.2.1.2.1 Syntax
(make-linear-kernel)
44.2.1.2.2 Description
44.2.1.3 Internal Function: make-one-class-svm-kernel
44.2.1.3.1 Syntax
(make-one-class-svm-kernel &key gamma)
44.2.1.3.2 Description
44.2.1.4 Internal Function: make-polynomial-kernel
44.2.1.4.1 Syntax
(make-polynomial-kernel &key gamma r d)
44.2.1.4.2 Description
44.2.1.5 Internal Function: make-rbf-kernel
44.2.1.5.1 Syntax
(make-rbf-kernel &key gamma)
44.2.1.5.2 Description
44.2.1.6 Internal Function: make-svm-learner
44.2.1.6.1 Syntax
(make-svm-learner training-vector kernel-function &key c (weight 1.0) file-name external-format cache-size-in-mb)
44.2.1.6.2 Description
44.2.1.7 Internal Function: svm-validation
44.2.1.7.1 Syntax
(svm-validation svm-learner test-vector)
44.2.1.7.2 Description
45 Package: clml.svm.smo
- Uses: common-lisp, hjs.learn.read-data, hjs.util.vector, hjs.util.matrix, hjs.util.meta
- Used by: clml.test
45.1 Description
Support-Vector-Machine (Soft Margin) Support Vector Machine Package using SMO algorithm Reference: Jhon C. Platt.
45.2 External Symbols
45.2.1 External Macros
45.2.1.1 Inherited Macro: call-kernel-function-with-indices
45.2.1.1.1 Syntax
(call-kernel-function-with-indices kernel-function i1 i2)
45.2.1.1.2 Description
45.2.1.2 Inherited Macro: call-kernel-function-with-vectors
45.2.1.2.1 Syntax
(call-kernel-function-with-vectors kernel-function point1 point2)
45.2.1.2.2 Description
45.2.2 External Functions
45.2.2.1 Inherited Function: linear-kernel
45.2.2.1.1 Syntax
(linear-kernel z-i z-j)
45.2.2.1.2 Description
z-i =(x-i, y-i), x-i:input vector, y-i:label (+1 or -1)
45.2.2.2 Internal Function: load-svm-learner
45.2.2.2.1 Syntax
(load-svm-learner file-name kernel-function)
45.2.2.2.2 Description
- return: <Closure>, SVM
- argumtns:
- file-name : save file name of SVM
- kernel-function :<Closure>, used kernel function to make the SVM
- external-format : character code
45.2.2.3 Internal Function: make-polynomial-kernel
45.2.2.3.1 Syntax
(make-polynomial-kernel &key gamma r d)
45.2.2.3.2 Description
- return: <Closure>, polynomial kernel
- arguments:
- gamma, r, d : K(x,y) = (gamma*(x・y)+r)d
45.2.2.4 Internal Function: make-rbf-kernel
45.2.2.4.1 Syntax
(make-rbf-kernel &key gamma)
45.2.2.4.2 Description
- return: <Closure>, RBF kernel (Gaussian kernel)
- aregumrns:
- gamma : K(x,y) = exp(-gamma*|| x- y ||2)
45.2.2.5 Internal Function: make-svm-learner
45.2.2.5.1 Syntax
(make-svm-learner training-vector kernel-function c)
45.2.2.5.2 Description
- return: <Closure>, SVM
- arguments:
- training-vector : (SIMPLE-ARRAY T (* )) consist of (SIMPLE-ARRAY DOUBLE-FLOAT (* )), data-format : last column is a label (+1.0 or -1.0)
- kernel-function :<Closure>, kernel function
- c : penalty parameter of soft margin SVM
- weight : weight parameter of -1 class, default is 1.0
- file-name : file-name to save the SVM
- external-format : character code
- cache-size-in-MB : Cache size (default 100)
- reference: Working Set Selection Using Second Order Information for Training SVM. Chih-Jen Lin. Joint work with Rong-En Fan and Pai-Hsuen Chen.
45.2.2.6 Internal Function: svm-validation
45.2.2.6.1 Syntax
(svm-validation svm-learner test-vector)
45.2.2.6.2 Description
- return : classification result, accuracy
- arguments:
- svm-learner : SVM
- test-vector
SVM.WSS3(44): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-train-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 338 POINTS SVM.WSS3(45): (setf training-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 4.0 4.0 5.0 7.0 10.0 3.0 2.0 1.0 1.0) #(6.0 8.0 8.0 1.0 3.0 4.0 3.0 7.0 1.0 1.0) #(8.0 10.0 10.0 8.0 7.0 10.0 9.0 7.0 1.0 -1.0) #(2.0 1.0 2.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(4.0 2.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 3.0 3.0 1.0 1.0 1.0) #(7.0 4.0 6.0 4.0 6.0 1.0 4.0 3.0 1.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(6.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) ...) SVM.WSS3(46): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-test-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 345 POINTS SVM.WSS3(47): (setf test-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(3.0 1.0 1.0 1.0 2.0 2.0 3.0 1.0 1.0 1.0) #(4.0 1.0 1.0 3.0 2.0 1.0 3.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 10.0 3.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 1.0 1.0 5.0 1.0) #(1.0 1.0 1.0 1.0 1.0 1.0 3.0 1.0 1.0 1.0) #(5.0 3.0 3.0 3.0 2.0 3.0 4.0 4.0 1.0 -1.0) #(8.0 7.0 5.0 10.0 7.0 9.0 5.0 5.0 4.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(10.0 7.0 7.0 6.0 4.0 10.0 4.0 1.0 2.0 -1.0) ...) SVM.WSS3(49): (setf kernel (make-rbf-kernel :gamma 0.05)) #<Closure (:INTERNAL MAKE-RBF-KERNEL 0) @ #x101ba6a6f2> SVM.WSS3(50): (setf svm (make-svm-learner training-vector kernel :c 10 :file-name "svm-sample" :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101bc76a12> SVM.WSS3(51): (funcall svm (svref test-vector 0)) 1.0 SVM.WSS3(52): (svm-validation svm test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478 SVM.WSS3(53): (setf svm2 (load-svm-learner "svm-sample" kernel :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101be9db02> SVM.WSS3(54): (svm-validation svm2 test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478
46 Package: clml.svm.svr
- Uses: common-lisp, clml.svm.wss3, hjs.util.meta, hjs.util.vector, hjs.learn.read-data, hjs.util.matrix
- Used by: clml.test
46.1 Description
Support-Vector-Regression
Support Vector Regression Package using SMO-type algorithm Reference:
46.2 External Symbols
46.2.1 External Functions
46.2.1.1 Inherited Function: load-svr-learner
46.2.1.1.1 Syntax
(load-svr-learner file-name kernel-function &key external-format)
46.2.1.1.2 Description
- return: <Closure>, epsilon-SVR
- argumetns:
- file-name : save file name of SVR
- kernel-function :<Closure>, used kernel function to make the SVR
- external-format : character code
46.2.1.2 Inherited Function: make-svr-learner
46.2.1.2.1 Syntax
(make-svr-learner training-vector kernel-function &key c epsilon file-name external-format)
46.2.1.2.2 Description
- return: <Closure>, epsilon-SVR
- arguments:
- training-vector : (SIMPLE-ARRAY T (* )) consist of (SIMPLE-ARRAY DOUBLE-FLOAT (* )), data-format : last column is a target value
- kernel-function :<Closure>, kernel function
- c : penalty parameter
- epsilon : width of epsilon-tube
- file-name : file-name to save the SVR
- external-format : character code
- reference: A Study on SMO-type Decomposition Methods for Support Vector Machines. Pai-Hsuen Chen, Rong-En Fan, and Chih-Jen Lin
46.2.1.3 Inherited Function: svr-validation
46.2.1.3.1 Syntax
(svr-validation svr-learner test-vector)
46.2.1.3.2 Description
- return : MSE (Mean Squared Error)
- arguments:
- svr-learner
- test-vector
SVR(251): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-train-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 338 POINTS SVR(252): (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)) #<NUMERIC-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC NUMBER OF DIMENSIONS: 10 NUMERIC DATA POINTS: 338 POINTS SVR(253): (setf training-vector (choice-dimensions '("Cl.thickness" "Cell.shape" "Marg.adhesion" "Epith.c.size" "Bare.nuclei" "Bl.cromatin" "Normal.nucleoli" "Mitoses" "Class" "Cell.size") *)) #(#(5.0 4.0 5.0 7.0 10.0 3.0 2.0 1.0 1.0 4.0) #(6.0 8.0 1.0 3.0 4.0 3.0 7.0 1.0 1.0 8.0) #(8.0 10.0 8.0 7.0 10.0 9.0 7.0 1.0 -1.0 10.0) #(2.0 2.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0 1.0) #(4.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0 2.0) #(2.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0 1.0) #(1.0 1.0 1.0 2.0 3.0 3.0 1.0 1.0 1.0 1.0) #(7.0 6.0 4.0 6.0 1.0 4.0 3.0 1.0 -1.0 4.0) #(4.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0 1.0) #(6.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0 1.0) ...) SVR(254): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-test-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 345 POINTS SVR(255): (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)) #<NUMERIC-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC NUMBER OF DIMENSIONS: 10 NUMERIC DATA POINTS: 345 POINTS SVR(256): (setf test-vector (choice-dimensions '("Cl.thickness" "Cell.shape" "Marg.adhesion" "Epith.c.size" "Bare.nuclei" "Bl.cromatin" "Normal.nucleoli" "Mitoses" "Class" "Cell.size") *)) #(#(5.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0 1.0) #(3.0 1.0 1.0 2.0 2.0 3.0 1.0 1.0 1.0 1.0) #(4.0 1.0 3.0 2.0 1.0 3.0 1.0 1.0 1.0 1.0) #(1.0 1.0 1.0 2.0 10.0 3.0 1.0 1.0 1.0 1.0) #(2.0 1.0 1.0 2.0 1.0 1.0 1.0 5.0 1.0 1.0) #(1.0 1.0 1.0 1.0 1.0 3.0 1.0 1.0 1.0 1.0) #(5.0 3.0 3.0 2.0 3.0 4.0 4.0 1.0 -1.0 3.0) #(8.0 5.0 10.0 7.0 9.0 5.0 5.0 4.0 -1.0 7.0) #(4.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0 1.0) #(10.0 7.0 6.0 4.0 10.0 4.0 1.0 2.0 -1.0 7.0) ...) SVR(257): (setf kernel (make-rbf-kernel :gamma 0.001)) #<Closure (:INTERNAL MAKE-RBF-KERNEL 0) @ #x100dd4de92> SVR(258): (setf svr (make-svr-learner training-vector kernel :c 10 :epsilon 0.01 :file-name "sample-svr" :external-format :utf-8)) #<Closure (:INTERNAL MAKE-REGRESSION-FUNCTION 0) @ #x1018e12f72> SVR(259): (funcall svr (svref test-vector 0)) 1.0226811804369387 SVR(260): (svr-validation svr test-vector) 1.4198010745021363 SVR(261): (setf svr2 (load-svr-learner "sample-svr" kernel :external-format :utf-8)) #<Closure (:INTERNAL MAKE-REGRESSION-FUNCTION 0) @ #x1019594222> SVR(262): (svr-validation svr2 test-vector) 1.4198010745021363
47 Package: clml.svm.wss3
- Uses: common-lisp, hjs.util.meta, hjs.util.vector, hjs.learn.read-data, hjs.util.matrix
- Used by: clml.test, clml.classifiers.logistic-regression, clml.svm.svr, clml.svm.one class
47.1 Description
47.2 External Symbols
47.2.1 External Macros
47.2.1.1 Inherited Macro: call-kernel-function
47.2.1.1.1 Syntax
(call-kernel-function kernel-function point1 point2)
47.2.1.1.2 Description
47.2.1.2 Inherited Macro: call-kernel-function-uncached
47.2.1.2.1 Syntax
(call-kernel-function-uncached kernel-function point1 point2)
47.2.1.2.2 Description
47.2.1.3 Inherited Macro: define-kernel-function
47.2.1.3.1 Syntax
(define-kernel-function (point1-var point2-var &optional (name unknown)) &body body)
47.2.1.3.2 Description
47.2.2 External Functions
47.2.2.1 Internal Function: load-svm-learner
47.2.2.1.1 Syntax
(load-svm-learner file-name kernel-function &key external-format)
47.2.2.1.2 Description
47.2.2.2 Internal Function: make-linear-kernel
47.2.2.2.1 Syntax
(make-linear-kernel)
47.2.2.2.2 Description
47.2.2.3 Internal Function: make-one-class-svm-kernel
47.2.2.3.1 Syntax
(make-one-class-svm-kernel &key gamma)
47.2.2.3.2 Description
47.2.2.4 Internal Function: make-polynomial-kernel
47.2.2.4.1 Syntax
(make-polynomial-kernel &key gamma r d)
47.2.2.4.2 Description
47.2.2.5 Internal Function: make-rbf-kernel
47.2.2.5.1 Syntax
(make-rbf-kernel &key gamma)
47.2.2.5.2 Description
47.2.2.6 Internal Function: make-svm-learner
47.2.2.6.1 Syntax
(make-svm-learner training-vector kernel-function &key c (weight 1.0) file-name external-format cache-size-in-mb)
47.2.2.6.2 Description
47.2.2.7 Inherited Function: sign
47.2.2.7.1 Syntax
(sign x)
47.2.2.7.2 Description
47.2.2.8 Internal Function: svm-validation
47.2.2.8.1 Syntax
(svm-validation svm-learner test-vector)
47.2.2.8.2 Description
48 Package: clml.test
- Uses: common-lisp, hjs.learn.vars, hjs.learn.read data, clml.statistics, clml.clustering.cluster-validation, clml.time-series.util, clml.time-series.read-data, clml.time-series.statistics, clml.time-series.state-space, clml.time-series.autoregression, clml.time-series.anomaly-detection, clml.time-series.exponential smoothing, clml.time-series.burst detection, clml.time series.changefinder, clml.clustering.hc, hjs.util.matrix, hjs.util.vector, hjs.learn.k means, hjs.util.missing-value, clml.clustering.nmf, clml.clustering.optics, clml.clustering.spectral-clustering, clml.svm.mu, clml.svm.smo, clml.svm.wss3, clml.svm.pwss3, clml.svm.one class, clml.svm.svr, clml.classifiers.linear-regression, clml.classifiers.nbayes, clml.nonparametric.hdp-lda, clml.decision-tree.random-forest, clml.text.utilities, clml.association-rule, clml.som
- Used by: None.
48.1 Description
48.2 External Symbols
49 Package: clml.text.utilities
- Uses: common-lisp, hjs.learn.read-data
- Used by: clml.test
49.1 Description
Text Utilities
49.1.0.1 sample usage
TEXT-UTILS(4): (calculate-string-similarity "kitten" "sitting" :type :lev) 0.5384615384615384 TEXT-UTILS(5): (calculate-string-similarity "kitten" "sitting" :type :lcs) 0.6153846153846154 TEXT.UTILS(42): (setf data (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/equivalence-class.csv") :type :csv :csv-type-spec '(string string double-float) :external-format :utf-8)) #<UNSPECIALIZED-DATASET> DIMENSIONS: string1 | string2 | label TYPES: UNKNOWN | UNKNOWN | UNKNOWN DATA POINTS: 7 POINTS TEXT-UTILS(43): (dataset-points data) #(#("x" "y" 1.0) #("y" "z" 1.0) #("x" "w" -1.0) #("a" "b" 1.0) #("c" "c" 1.0) #("e" "f" -1.0) #("f" "x" 1.0)) TEXT-UTILS(44): (equivalence-clustering *) (("e") ("f" "z" "y" "x") ("c") ("b" "a") ("w"))
49.2 External Symbols
49.2.1 External Functions
49.2.1.1 Inherited Function: calculate-lcs-distance
49.2.1.1.1 Syntax
(calculate-lcs-distance str1 str2)
49.2.1.1.2 Description
49.2.1.2 Inherited Function: calculate-levenshtein-similarity
49.2.1.2.1 Syntax
(calculate-levenshtein-similarity str1 str2)
49.2.1.2.2 Description
49.2.1.3 Inherited Function: calculate-string-similarity
49.2.1.3.1 Syntax
(calculate-string-similarity str1 str2 &key (type lev))
49.2.1.3.2 Description
- return: number of similarity
- arguments:
- str1: <string>
- str2: <string>
- type: :lev | :lcs
- comments:
:lev for type, calculate similarity by levenshtein distance.\
:lcs for type, calculate similarity by lcs distance.
49.2.1.4 Inherited Function: equivalence-clustering
49.2.1.4.1 Syntax
(equivalence-clustering data-vector)
49.2.1.4.2 Description
- return: clustering results list
- arguments:
- data-vector : #(string-a,string-b,…,label), label = 1.0 <->(a~b), label = -1.0 <-> not (a~b)
Based on Knuth's equivalence clustering algorithm
50 Package: clml.time-series.anomaly-detection
- Uses: common-lisp, hjs.learn.read-data, hjs.util.meta, hjs.util.vector, hjs.util.matrix, hjs.learn.vars, hjs.util.missing-value, clml.statistics, clml.utility.csv, clml.time-series.util, clml.time-series.statistics, clml.time-series.read-data, clml.time-series.state-space, clml.time-series.autoregression
- Used by: clml.test
50.1 Description
Direction-based anomaly detector * Reference T.Ide and H.Kashima "Eigenspace-based Anomaly Detection in Computer Systems" sec.5
50.1.0.1 sample usage for make-db-detector and make-periodic-detector
TS-ANOMALY-DETECTION(4): (setf sample-ts (time-series-data (read-data-from-file "https://mmaul.github.io/clml.data/sample/traffic-balance.csv" :type :csv :csv-type-spec (cons 'string (make-list 6 :initial-element 'double-float))) :frequency 12 :except '(0) :time-label 0)) ; Autoloading for (SETF EOL-CONVENTION): ; Fast loading from bundle code/efmacs.fasl. ; Fast loading from bundle code/ef-e-anynl.fasl. ; Fast loading from bundle code/ef-e-crlf.fasl. ; Fast loading from bundle code/ef-e-cr.fasl. ; Fast loading from bundle code/ef-e-crcrlf.fasl. #<TIME-SERIES-DATASET > DIMENSIONS: IF1 | IF2 | IF3 | IF4 | IF5 | IF6 TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC NUMBER OF DIMENSIONS: 6 FREQUENCY: 12 START: (1 1) END: (85 7) POINTS: 1015 TIME-LABEL: TIME TS-ANOMALY-DETECTION(5): (loop with detector = (make-db-detector (sub-ts sample-ts :start '(1 1) :end '(2 12))) for p across (ts-points (sub-ts sample-ts :start '(3 1))) collect (funcall detector (ts-p-pos p))) (7.689004308083502e-4 8.690742068634405e-4 0.0014640360422599752 9.645504419952822e-4 0.002189430044882701 0.0022804402419548397 8.653971028227403e-4 0.0021245846566718685 0.0021297890535286745 0.003035579690776613 ...) TS-ANOMALY-DETECTION(6): (loop with detector = (make-periodic-detector (sub-ts sample-ts :start '(1 1) :end '(2 12))) for p across (ts-points (sub-ts sample-ts :start '(3 1))) collect (funcall detector (ts-p-pos p))) ((:SCORE 0.15980001156818346 :LOCAL-SCORES (-0.011247495797210605 0.04067641708837213 0.07657475988236122 0.026173388386296143 -0.001005722797717759 -0.13117336322290166)) (:SCORE 0.16606559269099325 :LOCAL-SCORES (-0.04404576382434579 0.08836079938698248 0.06427181525186569 0.008060984870295258 6.037724071195098e-5 -0.11672432427082227)) (:SCORE 0.0835963350476519 :LOCAL-SCORES (0.02860344056963936 0.02049834345000817 0.018558627759386243 0.005805395166900154 -1.7563302955435247e-4 -0.07329208280202894)) (:SCORE 0.10895276517361178 :LOCAL-SCORES (0.06171796944486013 0.02627577908981959 -0.0013938026860552477 7.108933807211727e-4 -0.0015292225676566903 -0.08581498358943485)) (:SCORE 0.14372822478142372 :LOCAL-SCORES (0.019119719424318164 0.06530386435337952 -0.03223066630047898 0.05779465755012304 -0.0021226015789952857 -0.10789806554381363)) (:SCORE 0.1214316386275602 :LOCAL-SCORES (0.08180945936566704 -0.01666669357385849 0.01789677418744477 -0.08623381474472612 -5.783555512765765e-4 0.003743461124108086)) (:SCORE 0.16328621183435152 :LOCAL-SCORES (0.09252923344792947 0.04206473653695766 0.03524081165133149 -0.10442527700870255 -6.866050459105892e-4 -0.06471611713622019)) (:SCORE 0.17165824330218574 :LOCAL-SCORES (0.1124055553487212 -0.04483642919806279 0.06943579226133692 -0.08609866163195316 -1.3815655640593742e-4 -0.05081348776600684)) (:SCORE 0.14705276128118872 :LOCAL-SCORES (0.03176665855145954 -0.05169044126068538 0.11199895677113193 -0.020881754613730465 -0.0013360512015534781 -0.06969391195126472)) (:SCORE 0.1753941034019109 :LOCAL-SCORES (0.0926869320817864 -0.04500698002481467 0.08111355541737571 -0.010867820410934509 -0.0027675310185543865 -0.11509576770374046)) ...)
50.1.0.2 sample usage for SNN and EEC
TS-ANOMALY-DETECTION(8): (setf exchange (time-series-data (read-data-from-file "https://mmaul.github.io/clml.data/sample/exchange.csv" :type :csv :csv-type-spec (cons 'string (make-list 10 :initial-element 'double-float))) :except '(0) :time-label 0)) #<TIME-SERIES-DATASET > DIMENSIONS: CAD/USD | EUR/USD | JPY/USD | GBP/USD | CHF/USD | AUD/USD | HKD/USD | NZD/USD | KRW/USD | MXN/USD TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC NUMBER OF DIMENSIONS: 10 FREQUENCY: 1 START: (1 1) END: (753 1) POINTS: 753 TIME-LABEL: YYYY/MM/DD TS-ANOMALY-DETECTION(9): (let ((target-snn (make-snn (sub-ts exchange :start 1 :end 150) 3)) (reference-snn (make-snn (sub-ts exchange :start 600 :end 700) 3))) (e-scores target-snn reference-snn)) (("AUD/USD" . 0.47406298323897705) ("CAD/USD" . 0.5240011355714634) ("CHF/USD" . 0.5325785438502517) ("EUR/USD" . 0.731769158687747) ("GBP/USD" . 0.596827444239165) ("HKD/USD" . 0.5766733684269696) ("JPY/USD" . 0.5117506042665696) ("KRW/USD" . 0.5198055610159624) ("MXN/USD" . 0.7027828954312578) ("NZD/USD" . 0.2842836687583187)) TS-ANOMALY-DETECTION(10): (loop with detector = (make-eec-detector (sub-ts exchange :start 1 :end 60) 20) for p across (ts-points (sub-ts exchange :start 60)) collect (funcall detector (ts-p-pos p))) ((:SCORE 2.700571112024573 :LOCAL-SCORES (-3.7189814823543945 1.0326461685226247 -0.09199334202340251 -1.5304334860393167 1.6336817412409927 0.09973192007442783 -1.7705007982055647 -1.3659133055436354 1.6229166989275772 -2.456418564898763)) (:SCORE 2.2333558257821577 :LOCAL-SCORES (-3.905638387254389 1.0111353552477693 -0.16180107817711298 -0.06211424245500806 2.444035892878855 -0.7941221366494797 -2.0601881585490758 -0.6032554617242315 1.3644194991066583 -2.94095956222471)) (:SCORE 1.9868164604264957 :LOCAL-SCORES (-4.071453905957172 0.09987314488820478 -0.5124850991763434 0.3572466274370432 1.985594397643084 -1.2627672914256596 -2.0286025799206437 -2.0180011854462823 1.0031799987968517 -3.349034884667727)) (:SCORE 1.99119158115065 :LOCAL-SCORES (-4.21295552995317 3.6696601922048 0.13498367839300002 2.202025796055173 1.5652235278554427 -1.5185993444794728 -1.9951097435792884 -2.141676229907566 0.536949673309007 0.13587904258754527)) (:SCORE 1.655330278980456 :LOCAL-SCORES (-3.940751233076124 1.4944533102503788 -1.134801399167889 1.0953740695897256 0.8538413750781987 -2.6483828385806047 -1.9833372992457443 -2.1457229135357965 -0.25535073809135234 -1.1228770376956778)) (:SCORE 1.6026376553309072 :LOCAL-SCORES (-0.034554670356311185 1.2292838508330988 1.132721967732395 -0.7371812412223815 -1.2217525313170159 -3.7170161170631384 -0.8394971355287675 -2.309275510777308 -0.6893891878271913 -1.2247368414257422)) (:SCORE 1.4921358653856052 :LOCAL-SCORES (-1.1119582168928317 0.13109381389384833 0.03822852402739136 -1.2567269843174933 -1.0016538526115792 -3.7378375887102315 0.0018749768626725657 -2.1904933121802066 -1.0031674527371155 -1.8580823578222343)) (:SCORE 1.834987095608023 :LOCAL-SCORES (-2.411063158982719 -0.9462790230517837 -0.5412882072844031 -1.8686452258034443 -2.4080116434386505 -4.2224169886297185 -0.19950597770025008 -2.1142292908200604 0.49105626655832846 -1.4030218415732563)) (:SCORE 1.0321828011949825 :LOCAL-SCORES (-3.2832950290358296 -1.7201312662081096 -0.806431510082311 -0.49749735373008097 -2.3879869063190085 -4.243481779019334 -1.1894302963419576 -2.5038090216601767 -0.1556970436113533 -1.4378596777323336)) (:SCORE 0.5533902042593536 :LOCAL-SCORES (-3.7083233694175766 -1.6133834329235863 -0.01938368944029429 -0.6476096999243521 0.03650134747649691 -3.3240586306405393 -1.8620675130088626 -1.7836998046168742 -0.875130410874981 -1.9750969929005304)) ...)
50.2 External Symbols
50.2.1 External Functions
50.2.1.1 Inherited Function: e-scores
50.2.1.1.1 Syntax
(e-scores t r)
50.2.1.1.2 Description
- return: alist (key:name-of-parameter, value:E-score)
- arguments:
- target-snn : <snn>, target SNN
- reference-snn : <snn>, reference SNN
- descriptions:
- reference: T.Ide, S.Papadimitriou, M.Vlachos Computing Correlation Anomaly Scores using Stochastic Nearest Neighbors
- Graph-based (correlation) anomaly detection
50.2.1.2 Inherited Function: make-db-detector
50.2.1.2.1 Syntax
(make-db-detector ts &key beta (typical svd) (pc 0.005) (normalize t))
50.2.1.2.2 Description
- return: <Closure>
- arguments:
- ts : <time-series-dataset>, time series data for initialization
- beta : 0 < <double-float> < 1, discounting parameter
- typical : :svd | :mean, method for typical pattern, :svd for singular valur decomposition, :mean for average
- pc : 0 < <double-float> < 1, upper cumulative probability for threshold calculation
- normalize : nil | t, normalize vector (t) or not (nil)
- arguments for <Closure>:
- new-dvec : vector representing time series data point
- return of <Closure>: (values score threshold typical-pattern-vector)
- descriptions:
- Direction-based anomaly detection
- reference: T.Ide and H.Kashima "Eigenspace-based Anomaly Detection in Computer Systems" section 5
- The number of points in ts is window size.
50.2.1.3 Inherited Function: make-eec-detector
50.2.1.3.1 Syntax
(make-eec-detector ts ws &key (xi 0.8) (global-m 3))
50.2.1.3.2 Description
- return: <Closure>
- arguments:
- ts : <time-series-dataset>, time series data for initialization
- window-size : positive integer, window size
- xi : 0 < <double-float> < 1, threshold for correlation strength
- global-m : positive integer, the number of eigen values for global feature
- arguments for <Closure>:
- new-dvec : vector representing time series data point
- return of <Closure>: plist (:score for anomaly score, :local-scores for local anomaly scores)
- descriptions:
- reference: S.Hirose, et.al "Network Anomaly Detection based on Eigen Equation Compression"
- Correlation-based anomaly detection
50.2.1.4 Inherited Function: make-periodic-detector
50.2.1.4.1 Syntax
(make-periodic-detector ts &key (r 0.5))
50.2.1.4.2 Description
- return: <Closure>
- arguments:
- ts : <time-series-dataset>, time series data for initialization
- r : 0 < <double-float> < 1, discounting parameter
- arguments for <Closure>:
- new-dvec : vector representing time series data point
- return of <Closure>: plist (:score for anomaly score, :local-scores for local anomaly scores)
- descriptions:
- Anomaly detection in consideration of the periodicity
- Define the multidimensional normal distribution at each point within a cycle, to a local anomaly score standard score abnormality score, conditional Gaussian Mahalanobis distance.
- The value of r is used for updating of multidimensional normal distribution.
- The value of ts-freq for ts is regarded as the number of points in a cycle.
50.2.1.5 Inherited Function: make-snn
50.2.1.5.1 Syntax
(make-snn ts k &key (sigma-i 1.0))
50.2.1.5.2 Description
- return: <snn>
- arguments:
- ts : <time-series-dataset>
- k : number of neighbors
- sigma-i : Lagrange-multiplier * const.
51 Package: clml.time-series.autoregression
- Uses: common-lisp, hjs.learn.read-data, hjs.util.meta, hjs.util.vector, hjs.util.matrix, hjs.learn.vars, clml.statistics, clml.time-series.util, clml.time-series.statistics, clml.time-series.read-data, clml.time-series.state-space
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.time-series.anomaly-detection
51.1 Description
Package for AutoRegression model
51.1.0.1 sample usage
TS-AR(128): (defparameter ukgas (time-series-data (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/UKgas.sexp")) :range '(1) :time-label 0 :start 1960 :frequency 4)) TS-AR(14): (setq model (ar ukgas)) #<AR-MODEL> method: BURG Coefficients: a1 0.17438913366790465 a2 -0.20966263354643136 a3 0.459202505071864 a4 1.0144694385486095 a5 0.2871426375860843 a6 -0.09273505423571009 a7 -0.13087574744684466 a8 -0.34467398543738703 a9 -0.1765456124104221 Order selected 9, sigma^2 estimated as 1231.505368951319 TS-AR(15): (predict model :n-ahead 12) #<TIME-SERIES-DATASET> DIMENSIONS: UKgas TYPES: NUMERIC FREQUENCY: 4 START: (1962 2) END: (1989 4) POINTS: 111 TIME-LABEL: year season #<TIME-SERIES-DATASET> DIMENSIONS: standard error TYPES: NUMERIC FREQUENCY: 4 START: (1962 2) END: (1989 4) POINTS: 111 TIME-LABEL: year season TS-AR(16): (ar-prediction ukgas :method :burg :n-learning 80 :n-ahead 12) #<TIME-SERIES-DATASET> DIMENSIONS: UKgas TYPES: NUMERIC FREQUENCY: 4 START: (1962 2) END: (1983 1) POINTS: 84 TIME-LABEL: year season #<AR-MODEL> method: BURG Coefficients: a1 0.03855018085036885 a2 -0.16131564249720193 a3 0.43498481388230215 a4 1.050917089787715 a5 0.5797305440261313 a6 -0.13363258905263287 a7 -0.16163235104434967 a8 -0.3748978324320104 a9 -0.3151508389321235 Order selected 9, sigma^2 estimated as 741.5626361893945 #<TIME-SERIES-DATASET> DIMENSIONS: standard error TYPES: NUMERIC FREQUENCY: 4 START: (1962 2) END: (1983 1) POINTS: 84 TIME-LABEL: year season TS-AR(6): (setq traffic (time-series-data (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/mawi-traffic/pointF-20090330-0402.sexp")) :except '(0) :time-label 0)) #<TIME-SERIES-DATASET> DIMENSIONS: [ 32- 63] | [ 64- 127] | [ 128- 255] | [ 256- 511] | [ 512- 1023] | ... TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | ... FREQUENCY: 1 START: (1 1) END: (385 1) POINTS: 385 TIME-LABEL: Time TS-AR(7): (parcor-filtering traffic :ppm-fname "traffic.ppm") #<TIME-SERIES-DATASET> DIMENSIONS: [ 32- 63] | [ 64- 127] | [ 128- 255] | [ 256- 511] | [ 512- 1023] | ... TYPES: NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | NUMERIC | ... FREQUENCY: 1 START: (1 1) END: (35 1) POINTS: 35 TIME-LABEL: Time
51.2 External Symbols
51.2.1 External Functions
51.2.1.1 Inherited Function: ar
51.2.1.1.1 Syntax
(ar d &key order-max (demean t) (method burg) (aic t))
51.2.1.1.2 Description
- return: <ar-model>
- arguments:
- d : <time-series-dataset>
- order-max : <positive integer>
- method : :yule-walker | :burg
- aic : nil | t
- demean : nil | t
- comments: when aic is t, minimize aic to choose the order (max is order-max) of model. when aic is nil, order-max is the order of model.
51.2.1.2 Inherited Function: ar-prediction
51.2.1.2.1 Syntax
(ar-prediction d &key (method yule-walker) (aic t) order-max n-learning (n-ahead 0) (demean t) target-col)
51.2.1.2.2 Description
- return: (values <time-series-dataset> <ar-model> <time-series-dataset>)
- arguments:
- d : <time-series-dataset>
- order-max : <positive integer>
- method : :yule-walker | :burg
- aic : nil | t
- demean : nil | t
- n-ahead : <non-negative integer>
- n-learning : nil | <positive integer>, number of points for learning
- target-col : nil | <string>, name of target parameter
51.2.1.3 Inherited Function: parcor
51.2.1.3.1 Syntax
(parcor ts &key (order 1) (method burg) ppm-file)
51.2.1.3.2 Description
51.2.1.4 Inherited Function: parcor-filtering
51.2.1.4.1 Syntax
(parcor-filtering ts &key (divide-length 15) (parcor-order 1) (n-ahead 10) ppm-fname)
51.2.1.4.2 Description
- return: <time-series-dataset>, values for parcor picture
- arguments:
- ts : <time-series-dataset>
- divide-length : <positive integer>
- parcor-order : <positive integer> below divide-length
- n-ahead : <non-negative integer>, number for ar-prediction on parcor picture
- ppm-fname : <string> | <pathname>, name for parcor picture
- comments: Refer section 3.2.1 of paper http://www.neurosci.aist.go.jp/~kurita/lecture/statimage.pdf \ Divide time series data by divide-length. And make 'parcor picture' for each range.
52 Package: clml.time-series.burst-detection
- Uses: common-lisp, hjs.learn.read-data, hjs.util.missing value, clml.time-series.util, clml.time-series.statistics, clml.time-series.read-data
- Used by: clml.test
52.1 Description
52.2 External Symbols
52.2.1 External Functions
52.2.1.1 Inherited Function: continuous-kleinberg
52.2.1.1.1 Syntax
(continuous-kleinberg offsets &key (if-overlap error) (gamma 1) (s 2) (time-reader nil) (column-number nil))
52.2.1.1.2 Description
52.2.1.2 Inherited Function: enumerate-kleinberg
52.2.1.2.1 Syntax
(enumerate-kleinberg batches &key (scaling-param 2) (gamma 1))
52.2.1.2.2 Description
52.2.1.3 Inherited Function: print-burst-indices
52.2.1.3.1 Syntax
(print-burst-indices burst-indices &key (stream t) (type graph))
52.2.1.3.2 Description
53 Package: clml.time-series.changefinder
- Uses: common-lisp, hjs.learn.read-data, hjs.util.meta, hjs.util.vector, hjs.util.matrix, clml.statistics, clml.time series.util, clml.time series.statistics, clml.time series.read-data, hjs.util.missing-value
- Used by: clml.test
53.1 Description
ChangeFinder Package for
53.2 External Symbols
53.2.1 External Functions
53.2.1.1 Inherited Function: init-changefinder
53.2.1.1.1 Syntax
(init-changefinder ts &key (score-type log) (ts-wsize 5) (score-wsize 5) (sdar-k 4) (discount 0.005))
53.2.1.1.2 Description
- return: <changefinder>
- arguments:
- ts : <time-series-dataset>
- score-type : :log | :hellinger, :log for logarithmic loss, :hellinger for hellinger distance
- ts-wsize : <positive integer>, window size for 1st smoothing
- score-wsize : <positive integer>, window size for 2nd smoothing
- sdar-k : <positive integer>, degree for AR
- discount : 0 < <double-float> < 1, discounting parameter
53.2.1.2 Inherited Function: update-changefinder
53.2.1.2.1 Syntax
(update-changefinder cf new-dvec)
53.2.1.2.2 Description
- return: (values score score-before-smoothing)
- arguments:
- cf : <changefinder>, return value of #'init-changefinder
- new-dvec : vector representing time series data point
54 Package: clml.time-series.exponential-smoothing
- Uses: common-lisp, iterate, clml.time-series.util, clml.time-series.statistics, hjs.util.meta, hjs.util.vector, hjs.learn.vars, hjs.learn.read-data, clml.time series.read-data
- Used by: clml.test
54.1 Description
54.1.0.1 sample usage
EXPL-SMTHING(106): (setq ukgas (time-series-data (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/UKgas.sexp")) :range '(1) :time-label 0 :frequency 4)) #<TIME-SERIES-DATASET> DIMENSIONS: UKgas TYPES: NUMERIC FREQUENCY: 4 START: (1 1) END: (27 4) POINTS: 108 TIME-LABEL: year season EXPL-SMTHING(108): (setq model (holtwinters ukgas :seasonal :multiplicative)) #<HOLTWINTERS-MODEL> alpha: 0.1, beta: 0.2, gamma: 0.7999999999999999 seasonal: MULTIPLICATIVE error: 1132.6785446257877 ( MSE ) EXPL-SMTHING(109): (predict model :n-ahead 12) #<TIME-SERIES-DATASET> DIMENSIONS: UKgas TYPES: NUMERIC FREQUENCY: 4 START: (1 2) END: (30 4) POINTS: 119 EXPL-SMTHING(110): (holtwinters-prediction ukgas :seasonal :multiplicative :n-learning 80 :n-ahead 12) #<TIME-SERIES-DATASET> DIMENSIONS: UKgas TYPES: NUMERIC FREQUENCY: 4 START: (1 2) END: (30 4) POINTS: 119 #<HOLTWINTERS-MODEL> alpha: 0.1, beta: 0.2, gamma: 0.7999999999999999 seasonal: MULTIPLICATIVE error: 1132.6785446257877 ( MSE )
54.2 External Symbols
54.2.1 External Functions
54.2.1.1 Inherited Function: best-double-exp-parameters
54.2.1.1.1 Syntax
(best-double-exp-parameters sequence &key (step 0.01) (measure 'mse))
54.2.1.1.2 Description
54.2.1.2 Inherited Function: best-single-exp-parameters
54.2.1.2.1 Syntax
(best-single-exp-parameters sequence &key (step 0.01) (measure 'mse))
54.2.1.2.2 Description
54.2.1.3 Inherited Function: best-triple-exp-parameters
54.2.1.3.1 Syntax
(best-triple-exp-parameters sequence &key (step 0.01) frequency (measure 'mse) (seasonal additive) l)
54.2.1.3.2 Description
54.2.1.4 Inherited Function: holtwinters
54.2.1.4.1 Syntax
(holtwinters d &key alpha beta gamma (err-measure 'mse) (optim-step 0.1) (seasonal additive))
54.2.1.4.2 Description
- return: <holtwinters-model>
- arguments:
- alpha : nil | 0 <= <double-float> <= 1
- beta : nil | 0 <= <double-float> <= 1
- gamma : nil | 0 <= <double-float> <= 1
- err-measure : 'mse | 'mape | 'rae | 're | 'rr
- optim-step : 0 <= <double-float> <= 1, step for optimizing alpha, beta and gamma
- seasonal : :additive | :multiplicative
- comments: when alpha, beta and gamma are nil, optimize those parameters by optim-step and err-measure.\ Minimize the value of err-measure to choose alpha, beta and gamma with optimization step specified by optim-step.\ Accordinglly, for example, optim-step = 0.001d0 takes a long time.
54.2.1.5 Inherited Function: holtwinters-prediction
54.2.1.5.1 Syntax
(holtwinters-prediction d &key alpha beta gamma (seasonal additive) (err-measure 'mse) (optim-step 0.1) n-learning (n-ahead 0) target-col)
54.2.1.5.2 Description
- return: (values <time-series-dataset> <holtwinters-model>)
- arguments:
- d : <time-series-dataset>
- alpha : nil | 0 <= <double-float> <= 1
- beta : nil | 0 <= <double-float> <= 1
- gamma : nil | 0 <= <double-float> <= 1
- err-measure : 'mse | 'mape | 'rae | 're | 'rr
- optim-step : 0 <= <double-float> <= 1
- seasonal : :additive | :multiplicative
- n-ahead : <non-negative integer>
- n-learning : nil | <positive integer>, number of points for learning
- target-col : nil | <string>, name of target parameter
55 Package: clml.time-series.read-data
- Uses: common-lisp, hjs.util.meta, hjs.util.vector, hjs.learn.vars, hjs.learn.read data, hjs.util.missing-value
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.time-series.burst-detection, clml.time-series.exponential-smoothing, clml.time-series.anomaly detection, clml.time series.changefinder, clml.time series.autoregression, clml.time series.state-space, clml.time series.statistics, clml.time-series.util
55.1 Description
Time-Series-Read-Data
package for reading time series data
55.1.0.1 sample usage
SVM.WSS3(44): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-train-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 338 POINTS SVM.WSS3(45): (setf training-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 4.0 4.0 5.0 7.0 10.0 3.0 2.0 1.0 1.0) #(6.0 8.0 8.0 1.0 3.0 4.0 3.0 7.0 1.0 1.0) #(8.0 10.0 10.0 8.0 7.0 10.0 9.0 7.0 1.0 -1.0) #(2.0 1.0 2.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(4.0 2.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 3.0 3.0 1.0 1.0 1.0) #(7.0 4.0 6.0 4.0 6.0 1.0 4.0 3.0 1.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(6.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) ...) SVM.WSS3(46): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-test-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 345 POINTS SVM.WSS3(47): (setf test-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(3.0 1.0 1.0 1.0 2.0 2.0 3.0 1.0 1.0 1.0) #(4.0 1.0 1.0 3.0 2.0 1.0 3.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 10.0 3.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 1.0 1.0 5.0 1.0) #(1.0 1.0 1.0 1.0 1.0 1.0 3.0 1.0 1.0 1.0) #(5.0 3.0 3.0 3.0 2.0 3.0 4.0 4.0 1.0 -1.0) #(8.0 7.0 5.0 10.0 7.0 9.0 5.0 5.0 4.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(10.0 7.0 7.0 6.0 4.0 10.0 4.0 1.0 2.0 -1.0) ...) SVM.WSS3(49): (setf kernel (make-rbf-kernel :gamma 0.05)) #<Closure (:INTERNAL MAKE-RBF-KERNEL 0) @ #x101ba6a6f2> SVM.WSS3(50): (setf svm (make-svm-learner training-vector kernel :c 10 :file-name "svm-sample" :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101bc76a12> SVM.WSS3(51): (funcall svm (svref test-vector 0)) 1.0 SVM.WSS3(52): (svm-validation svm test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478 SVM.WSS3(53): (setf svm2 (load-svm-learner "svm-sample" kernel :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101be9db02> SVM.WSS3(54): (svm-validation svm2 test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478
55.2 External Symbols
55.2.1 External Classes
55.2.1.1 Inherited Class: time-series-dataset
55.2.1.1.1 Inheritance
- Parent classes: specialized-dataset
- Precedence list: time-series-dataset, specialized-dataset, dataset, standard-object, slot-object, t
- Direct subclasses: None.
55.2.1.1.2 Description
- accessor
- ts-points : vector of ts-point
- ts-freq : number of observed values per a cycle
- ts-start : time for the first observed value, ts-point is represented as list of time and freq. Please refer to the sample usage.
- ts-end : time for the last observed value, the form is same as ts-start.
The dataset for time-series data. Values are specialized in numeric
55.2.1.1.3 Direct Slots
frequency
- Value type:
number
- Initial value:
NIL
- Initargs: frequency
- Allocation: instance
ts-freq
(ts-freq object)
- (
ts-freq
(time-series-datasettime-series-dataset
))
start
- Value type:
t
- Initial value:
NIL
- Initargs: start
- Allocation: instance
ts-start
(ts-start object)
- (
ts-start
(time-series-datasettime-series-dataset
))
end
- Value type:
t
- Initial value:
NIL
- Initargs: end
- Allocation: instance
ts-end
(ts-end object)
- (
ts-end
(time-series-datasettime series-dataset
))
ts-type
- Value type:
t
- Initial value:
NIL
- Initargs: ts-type
- Allocation: instance
ts-type
(ts-type object)
- (
ts-type
(time-series-datasettime-series-dataset
))
ts-points
- Value type:
t
- Initial value:
NIL
- Initargs: ts-points
- Allocation: instance
ts-points
(ts-points object)
- (
ts-points
(time-series-datasettime-series-dataset
))
time-label-name
- Value type:
t
- Initial value:
NIL
- Initargs: time-label-name
- Allocation: instance
time-label-name
(time-label-name object)
- (
time-label-name
(time-series-datasettime-series-dataset
))
55.2.1.1.4 Indirect Slots
dimensions
- Value type:
simple-array
- Initial value:
(ERROR "Must specify the dimension information for the dataset.")
- Initargs: dimensions
- Allocation: instance
55.2.2 External Functions
55.2.2.1 Inherited Function: copy-ts
55.2.2.1.1 Syntax
(copy-ts d)
55.2.2.1.2 Description
55.2.2.2 Inherited Function: make-constant-time-series-data
55.2.2.2.1 Syntax
(make-constant-time-series-data all-column-names data &key (start '(1 1)) end (freq 1) time-labels time-label-name)
55.2.2.2.2 Description
55.2.2.3 Inherited Function: make-ts-point
55.2.2.3.1 Syntax
(make-ts-point time freq label pos)
55.2.2.3.2 Description
55.2.2.4 Inherited Function: tf-gap
55.2.2.4.1 Syntax
(tf-gap tf1 tf2 &key (freq 1))
55.2.2.4.2 Description
55.2.2.5 Inherited Function: tf-incl
55.2.2.5.1 Syntax
(tf-incl tf-list num &key (freq 1))
55.2.2.5.2 Description
55.2.2.6 Inherited Function: time-label-name
55.2.2.6.1 Syntax
(time-label-name object)
55.2.2.6.2 Description
55.2.2.7 Inherited Function: time-series-data
55.2.2.7.1 Syntax
(time-series-data d &key (start 1) end (frequency 1) (ts-type constant) (range all) except time-label)
55.2.2.7.2 Description
- return: <time-series-dataset>
- arguments:
- d : <unspecialized-dataset>
- start : <list integer integer> | integer, specify the start time, integer larger than 1 or a list of integer of such kind. e.g. (1861 3)
- end : <list integer integer> | integer, specify the end time, format same as start. When unspecified, all the lines will be read in.
- frequency : integer >= 1, specify the frequency
- range : :all | <list integer>, indices of columns used in the result, start from 0, e.g. '(0 1 3 4)
- except : <list integer>, the opposite of :range, indices of columns which will be excluded from the result, start from 0. e.g. '(2)
- time-label : integer, index of column which represents the labels of time series data points, no labels when not specified.
55.2.2.8 Inherited Function: ts-cleaning
55.2.2.8.1 Syntax
(ts-cleaning d &key interp-types-alist outlier-types-alist outlier-values-alist)
55.2.2.8.2 Description
- return: <time-series-dataset>
- arguments:
- d : <time-series-dataset>
- interp-types-alist : a-list (key: column name, datum: interpolation(:zero :min :max :mean :median :mode :spline)) | nil\
- outlier-types-alist : a-list (key: column name, datum: outlier-verification(:std-dev :mean-dev :user :smirnov-grubbs :freq)) | nil\
- outlier-values-alist : a-list (key: outlier-verification datum: the value according to outlier-verification) | nil
- comment: Same as dataset-cleaning in read-data package.
55.2.2.9 Inherited Function: ts-end
55.2.2.9.1 Syntax
(ts-end object)
55.2.2.9.2 Description
55.2.2.10 Inherited Function: ts-freq
55.2.2.10.1 Syntax
(ts-freq object)
55.2.2.10.2 Description
55.2.2.11 Inherited Function: ts-p-freq
55.2.2.11.1 Syntax
(ts-p-freq instance)
55.2.2.11.2 Description
55.2.2.12 Inherited Function: ts-p-label
55.2.2.12.1 Syntax
(ts-p-label instance)
55.2.2.12.2 Description
55.2.2.13 Inherited Function: ts-p-pos
55.2.2.13.1 Syntax
(ts-p-pos instance)
55.2.2.13.2 Description
55.2.2.14 Inherited Function: ts-p-time
55.2.2.14.1 Syntax
(ts-p-time instance)
55.2.2.14.2 Description
55.2.2.15 Inherited Function: ts-points
55.2.2.15.1 Syntax
(ts-points object)
55.2.2.15.2 Description
55.2.2.16 Inherited Function: ts-start
55.2.2.16.1 Syntax
(ts-start object)
55.2.2.16.2 Description
55.2.2.17 Inherited Function: ts-type
55.2.2.17.1 Syntax
(ts-type object)
55.2.2.17.2 Description
56 Package: clml.time-series.state-space
- Uses: common-lisp, hjs.learn.read-data, hjs.util.meta, hjs.util.vector, hjs.util.matrix, clml.statistics, clml.time series.util, clml.time series.statistics, clml.time series.read-data, hjs.util.missing-value
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.time-series.anomaly-detection, clml.time-series.autoregression
56.1 Description
Package for state space model. Classes and methods for representing various time series model. Reference: 時系列解析入門 著:北川源四郎 岩波書店 9 章以降
56.1.0.1 sample usage
TS-STSP(123): (defparameter tokyo (time-series-data (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/tokyo-temperature.sexp")))) TOKYO TS-STSP(7): (trend tokyo :k 2 :opt-t^2 t) #<TREND-MODEL> K: 2 T^2: 0.1 AIC: 2395.073754930766 TS-STSP(8): (predict * :n-ahead 10) #<TIME-SERIES-DATASET> DIMENSIONS: trend TYPES: NUMERIC FREQUENCY: 1 START: (1 1) END: (458 1) POINTS: 458 #<TIME-SERIES-DATASET> DIMENSIONS: standard error TYPES: NUMERIC FREQUENCY: 1 START: (1 1) END: (458 1) POINTS: 458
56.2 External Symbols
56.2.1 External Functions
56.2.1.1 Inherited Function: seasonal
56.2.1.1.1 Syntax
(seasonal d &key (degree 1) freq (t^2 0.0) (s^2 1.0))
56.2.1.1.2 Description
56.2.1.2 Inherited Function: seasonal-adj
56.2.1.2.1 Syntax
(seasonal-adj d &key (tr-k 1) (tr-t^2 0.0) (s-deg 1) s-freq (s-t^2 0.0) (s^2 1.0))
56.2.1.2.2 Description
56.2.1.3 Inherited Function: trend
56.2.1.3.1 Syntax
(trend d &key (k 1) (t^2 0.0) (opt-t^2 nil) (s^2 1.0) (delta 0.1) (search-width 10))
56.2.1.3.2 Description
- return: <trend-model>
- arguments:
- d : <time-series-dataset>
- k : <positive-integer>
- t2 : <positive-number>
- opt-t2 : nil | t
- delta : <positive-number>
- search-width : <positive-integer>
- comments:
- In general, degree for model k is 1 or 2. When k = 1, assume the trend is locally fixed. When k = 2, assume the trend is locally linear.
- When opt-t2 is t, t2 is automatically estimated according to delta and search-width.\ In the range t2 - delta * search-width <= t2 + delta * search-width, minimize AIC of the model.\ And delta decides the step for t2.
56.2.1.4 Inherited Function: trend-prediction
56.2.1.4.1 Syntax
(trend-prediction d &key (k 1) (t^2 0.1) (n-ahead 0) (delta 0.1) (search-width 10))
56.2.1.4.2 Description
57 Package: clml.time-series.statistics
- Uses: common-lisp, hjs.learn.read-data, hjs.util.meta, hjs.util.vector, hjs.util.matrix, clml.statistics, hjs.learn.vars, clml.time-series.read-data, clml.time-series.util, clml.numeric.fast-fourier-transform
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.time-series.burst-detection, clml.time-series.exponential-smoothing, clml.time-series.anomaly detection, clml.time series.changefinder, clml.time series.autoregression, clml.time series.state-space
57.1 Description
Time-Series-Statistics Package for statistic utils for time-series-dataset.
57.1.0.1 sample usage
SVM.WSS3(44): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-train-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 338 POINTS SVM.WSS3(45): (setf training-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 4.0 4.0 5.0 7.0 10.0 3.0 2.0 1.0 1.0) #(6.0 8.0 8.0 1.0 3.0 4.0 3.0 7.0 1.0 1.0) #(8.0 10.0 10.0 8.0 7.0 10.0 9.0 7.0 1.0 -1.0) #(2.0 1.0 2.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(4.0 2.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 3.0 3.0 1.0 1.0 1.0) #(7.0 4.0 6.0 4.0 6.0 1.0 4.0 3.0 1.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(6.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) ...) SVM.WSS3(46): (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc-test-for-svm.csv") :type :csv :csv-type-spec (make-list 10 :initial-element 'double-float)) #<UNSPECIALIZED-DATASET> DIMENSIONS: Cl.thickness | Cell.size | Cell.shape | Marg.adhesion | Epith.c.size | Bare.nuclei | Bl.cromatin | Normal.nucleoli | Mitoses | Class TYPES: UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN NUMBER OF DIMENSIONS: 10 DATA POINTS: 345 POINTS SVM.WSS3(47): (setf test-vector (dataset-points (pick-and-specialize-data * :data-types (make-list 10 :initial-element :numeric)))) #(#(5.0 1.0 1.0 1.0 2.0 1.0 3.0 1.0 1.0 1.0) #(3.0 1.0 1.0 1.0 2.0 2.0 3.0 1.0 1.0 1.0) #(4.0 1.0 1.0 3.0 2.0 1.0 3.0 1.0 1.0 1.0) #(1.0 1.0 1.0 1.0 2.0 10.0 3.0 1.0 1.0 1.0) #(2.0 1.0 1.0 1.0 2.0 1.0 1.0 1.0 5.0 1.0) #(1.0 1.0 1.0 1.0 1.0 1.0 3.0 1.0 1.0 1.0) #(5.0 3.0 3.0 3.0 2.0 3.0 4.0 4.0 1.0 -1.0) #(8.0 7.0 5.0 10.0 7.0 9.0 5.0 5.0 4.0 -1.0) #(4.0 1.0 1.0 1.0 2.0 1.0 2.0 1.0 1.0 1.0) #(10.0 7.0 7.0 6.0 4.0 10.0 4.0 1.0 2.0 -1.0) ...) SVM.WSS3(49): (setf kernel (make-rbf-kernel :gamma 0.05)) #<Closure (:INTERNAL MAKE-RBF-KERNEL 0) @ #x101ba6a6f2> SVM.WSS3(50): (setf svm (make-svm-learner training-vector kernel :c 10 :file-name "svm-sample" :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101bc76a12> SVM.WSS3(51): (funcall svm (svref test-vector 0)) 1.0 SVM.WSS3(52): (svm-validation svm test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478 SVM.WSS3(53): (setf svm2 (load-svm-learner "svm-sample" kernel :external-format :utf-8)) #<Closure (:INTERNAL MAKE-DISCRIMINANT-FUNCTION 0) @ #x101be9db02> SVM.WSS3(54): (svm-validation svm2 test-vector) (((1.0 . -1.0) . 2) ((-1.0 . -1.0) . 120) ((-1.0 . 1.0) . 10) ((1.0 . 1.0) . 213)) 96.52173913043478
57.2 External Symbols
57.2.1 External Functions
57.2.1.1 Inherited Function: acf
57.2.1.1.1 Syntax
(acf d &key (type correlation) (plot nil) (print t) max-k)
57.2.1.1.2 Description
- return: nil | <list>
- arguments:
- d : <time-series-dataset>
- type : :covariance | :correlation
- max-k : <positive integer>
- plot : nil | t, when plot is t, result will be plotted by R.
- print : nil | t, when print is t, result will be printed.
57.2.1.2 Inherited Function: ccf
57.2.1.2.1 Syntax
(ccf d1 d2 &key (type correlation) (plot nil) (print t) max-k)
57.2.1.2.2 Description
- return: nil | <list>
- arguments:
- d1, d2 : <time-series-dataset>, one dimensional
- type : :covariance | :correlation
- max-k : <positive integer>
- plot : nil | t, when plot is t, result picture will be plotted by R.
- print : nil | t, when print is t, result will be printed.
57.2.1.3 Inherited Function: diff
57.2.1.3.1 Syntax
(diff d &key (lag 1) (differences 1))
57.2.1.3.2 Description
- return: <time-series-dataset>
- arguments:
- d : <time-series-dataset>
- lag : <integer>, degree of lag
- differences : <integer> >= 1, number of difference
- comments: Calculate the Difference. e.g. Suppose the trend of time-series-dataset is linear. It will be eliminated by differences = 1.
57.2.1.4 Inherited Function: lag
57.2.1.4.1 Syntax
(lag d &key (k 1))
57.2.1.4.2 Description
57.2.1.5 Inherited Function: ma
57.2.1.5.1 Syntax
(ma d &key (k 5) weight)
57.2.1.5.2 Description
- return: <time-series-dataset>
- arguments:
- d : <time-series-dataset>, one dimensional
- k : <positive integer>, range of calculation for average
- weight : nil | <list>, when weight is nil, it will be all same weight.
57.2.1.6 Inherited Function: periodgram
57.2.1.6.1 Syntax
(periodgram d &key step (print t) (plot nil) (log t) (smoothing raw))
57.2.1.6.2 Description
57.2.1.7 Inherited Function: ts-correlation
57.2.1.7.1 Syntax
(ts-correlation d &key (k 0))
57.2.1.7.2 Description
- return: <matrix>, auto-correlation matrix with lag k
- arguments:
- d : <time-series-dataset>
- k : <positive integer>, degree of lag
57.2.1.8 Inherited Function: ts-covariance
57.2.1.8.1 Syntax
(ts-covariance d &key (k 0) (demean t))
57.2.1.8.2 Description
- return: <matrix>, auto-covariance or auto-correlation matrix with lag k
- arguments:
- d : <time-series-dataset>
- k : <positive integer>, degree of lag
57.2.1.9 Inherited Function: ts-demean
57.2.1.9.1 Syntax
(ts-demean d)
57.2.1.9.2 Description
- argument: <time-series-dataset>
57.2.1.10 Inherited Function: ts-log
57.2.1.10.1 Syntax
(ts-log d &key (logit-transform nil) (log-base (exp 1)))
57.2.1.10.2 Description
- return: <time-series-dataset>
- arguments:
- d : <time-series-dataset>
- logit-transform : t | nil, logit transformation is effective for (0, 1) values ts data
57.2.1.11 Inherited Function: ts-max
57.2.1.11.1 Syntax
(ts-max d)
57.2.1.11.2 Description
- argument: <time-series-dataset>
57.2.1.12 Inherited Function: ts-mean
57.2.1.12.1 Syntax
(ts-mean d)
57.2.1.12.2 Description
- argument: <time-series-dataset>
57.2.1.13 Inherited Function: ts-median
57.2.1.13.1 Syntax
(ts-median d)
57.2.1.13.2 Description
- argument: <time-series-dataset>
57.2.1.14 Inherited Function: ts-min
57.2.1.14.1 Syntax
(ts-min d)
57.2.1.14.2 Description
- argument: <time-series-dataset>
57.2.1.15 Inherited Function: ts-ratio
57.2.1.15.1 Syntax
(ts-ratio d &key (lag 1))
57.2.1.15.2 Description
58 Package: clml.time-series.util
- Uses: common-lisp, hjs.learn.read-data, hjs.util.meta, hjs.util.vector, hjs.util.matrix, clml.statistics, clml.time-series.read-data
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.time-series.burst-detection, clml.time-series.exponential-smoothing, clml.time-series.anomaly detection, clml.time series.changefinder, clml.time series.autoregression, clml.time series.state-space, clml.time series.statistics
58.1 Description
Utility generally relating to
- Time conversion
- String manip
- External Program invocation
Regarding external program invocation, work needs to be done, nameley converting alisp specific calls to uiop. Also external program invocation is used to spawn R for graph generation. Would be better to use
58.2 External Symbols
58.2.1 External Classes
58.2.1.1 Inherited Class: timeseries-model
58.2.1.1.1 Inheritance
- Parent classes: standard-object
- Precedence list: timeseries-model, standard object, slot-object, t
- Direct subclasses: holtwinters-model, state-space-model
58.2.1.1.2 Description
58.2.1.1.3 Direct Slots
observed-ts
- Value type:
time-series-dataset
- Initial value:
(ERROR "Must specify the observed timeseries data")
- Initargs: observed-ts
- Allocation: instance
observed-ts
(observed-ts object)
- (
observed-ts
(timeseries-modeltimeseries model
))
58.2.2 External Global Variables
58.2.2.1 Inherited Variable: *r-stream*
58.2.2.1.1 Value
NIL
Type: null
58.2.2.1.2 Description
58.2.3 External Macros
58.2.3.1 Inherited Macro: with-r
58.2.3.1.1 Syntax
(with-r &rest body)
58.2.3.1.2 Description
58.2.4 External Functions
58.2.4.1 Inherited Function: compose-ts
58.2.4.1.1 Syntax
(compose-ts d &key (range all) except (composer #'+) (column-name composed value))
58.2.4.1.2 Description
58.2.4.2 Inherited Function: date-time-to-ut
58.2.4.2.1 Syntax
(date-time-to-ut date-time &optional daylight-saving-time-p)
58.2.4.2.2 Description
58.2.4.3 Inherited Function: draw-ppm
58.2.4.3.1 Syntax
(draw-ppm data-list fname &key (width-unit 10) (height-unit 10))
58.2.4.3.2 Description
58.2.4.4 Inherited Function: merge-ts
58.2.4.4.1 Syntax
(merge-ts d1 d2)
58.2.4.4.2 Description
58.2.4.5 Inherited Function: observed-ts
58.2.4.5.1 Syntax
(observed-ts object)
58.2.4.5.2 Description
58.2.4.6 Inherited Function: open-eps-file
58.2.4.6.1 Syntax
(open-eps-file f-name)
58.2.4.6.2 Description
58.2.4.7 Inherited Function: predict
58.2.4.7.1 Syntax
(predict m &key (n-ahead 0) (n-ahead 0) (n-ahead 0))
58.2.4.7.2 Description
- return: <time-series-dataset>
- arguments:
- model : <holtwinters-model>
- n-ahead : <non-negative integer>
58.2.4.8 Inherited Function: statvis
58.2.4.8.1 Syntax
(statvis ts &key (external-format default) (fname temp))
58.2.4.8.2 Description
58.2.4.9 Inherited Function: sub-ts
58.2.4.9.1 Syntax
(sub-ts d &key start end (range all) except)
58.2.4.9.2 Description
58.2.4.10 Inherited Function: ts-
58.2.4.10.1 Syntax
(ts- d1 d2)
58.2.4.10.2 Description
58.2.4.11 Inherited Function: ts-to-sta
58.2.4.11.1 Syntax
(ts-to-sta d f-name &key (external-format default) (fit t))
58.2.4.11.2 Description
58.2.4.12 Inherited Function: ut-to-date-time
58.2.4.12.1 Syntax
(ut-to-date-time ut &optional daylight-saving-time-p)
58.2.4.12.2 Description
59 Package: clml.utility.csv
- Uses: common-lisp, iterate, org.mapcar.parse-number
- Used by: clml.graph.graph-anomaly detection, clml.time series.anomaly-detection
59.1 Description
59.2 External Symbols
59.2.1 External Functions
59.2.1.1 Function: read-csv-file
59.2.1.1.1 Syntax
(read-csv-file filename &key (header t) type-spec map-fns (external-format *csv-default-external-format*) (os anynl-dos) (start 0) end)
59.2.1.1.2 Description
Read from stream until eof and return a csv table.
A csv table is a vector of csv records. A csv record is a vector of elements.
Type spec should be a list of type specifier (symbols). If the type specifier is nil or t, it will be treated as string. If type-spec is nil (the default case), then all will be treated as string.
map-fns is a list of functions of one argument and output one result. each function in it will be applied to the parsed element. If any function in the list is nil or t, it equals to #'identity. If map-fns is nil, then nothing will be applied.
external-format (default is shift-jis) is a valid AllegroCL external-format type.
OS is a set to eol-convention of the file stream.
start and end specifies how many elements per record will be included. If start or end is negative, it counts from the end. -1 is the last element.
59.2.1.2 Function: read-csv-file-and-sort
59.2.1.2.1 Syntax
(read-csv-file-and-sort filename sort-order &key (header t) (order ascend) type-spec map-fns (external-format *csv-default-external-format*))
59.2.1.2.2 Description
59.2.1.3 Function: read-csv-stream
59.2.1.3.1 Syntax
(read-csv-stream stream &key (header t) type-spec map-fns (start 0) end)
59.2.1.3.2 Description
Read from stream until eof and return a csv table.
A csv table is a vector of csv records. A csv record is a vector of elements.
Type spec should be a list of type specifier (symbols). If the type specifier is nil or t, it will be treated as string. If type-spec is nil (the default case), then all will be treated as string.
map-fns is a list of functions of one argument and output one result. each function in it will be applied to the parsed element. If any function in the list is nil or t, it equals to #'identity. If map-fns is nil, then nothing will be applied.
start and end specifies how many elements per record will be included. If start or end is negative, it counts from the end. -1 is the last element.
59.2.1.4 Function: write-csv-file
59.2.1.4.1 Syntax
(write-csv-file filename table &key (external-format *csv-default-external-format*))
59.2.1.4.2 Description
Accept a filename and a table and output the table as csv form to the file.
A table is a sequence of lines. A line is a sequence of elements. Elements can be any types
59.2.1.5 Function: write-csv-stream
59.2.1.5.1 Syntax
(write-csv-stream stream table)
59.2.1.5.2 Description
Accept a stream and a table and output the table as csv form to the stream.
A table is a sequence of lines. A line is a sequence of elements. Elements can be any types
60 Package: clml.utility.data
- Uses: common-lisp
- Used by: None.
60.1 Description
60.2 External Symbols
60.2.1 External Functions
60.2.1.1 Function: fetch
60.2.1.1.1 Syntax
(fetch url-or-path &key (cache t) (dir (namestring (system-relative-pathname 'clml sample/))) (flush nil))
60.2.1.1.2 Description
-return: path to file or nil if unable to fetch -arguments: -url-or-path: <string> pathname or url string identifying file to be fetched. -cache: <T|NIL> if T looks for file in -dir and uses that as source if NIL then the a fresh copy of the file is fetched -dir: location to store fetched file, default location is in the sample directory in the top level of the clml source tree. -flush: if T fetch does not download the file it deletes the existing file.
Fetch file from url-or-location
if not cached in dir
stores the file in the location specified by dir if url or file is url the file
is stored in dir~/~uri-host~/~uri-path
.
Note that it is important to ensure that dir and subdir if used end in a /
61 Package: clml.utility.priority-que
- Uses: common-lisp
- Used by: clml.graph.shortest-path, clml.nearest-search.nearest
61.1 Description
61.2 External Symbols
61.2.1 External Functions
61.2.1.1 Function: after-decrease-key-prique
61.2.1.1.1 Syntax
(after-decrease-key-prique q ib)
61.2.1.1.2 Description
61.2.1.2 Function: delete-min-prique
61.2.1.2.1 Syntax
(delete-min-prique q)
61.2.1.2.2 Description
61.2.1.3 Function: find-min-prique
61.2.1.3.1 Syntax
(find-min-prique q)
61.2.1.3.2 Description
61.2.1.4 Function: insert-prique
61.2.1.4.1 Syntax
(insert-prique q item)
61.2.1.4.2 Description
61.2.1.5 Function: make-prique
61.2.1.5.1 Syntax
(make-prique implementation &key (maxcount nil) (lessp #'<) (key #'identity))
61.2.1.5.2 Description
61.2.1.6 Function: prique-box-item
61.2.1.6.1 Syntax
(prique-box-item q)
61.2.1.6.2 Description
61.2.1.7 Function: prique-empty-p
61.2.1.7.1 Syntax
(prique-empty-p q)
61.2.1.7.2 Description
61.2.1.8 Function: union-prique
61.2.1.8.1 Syntax
(union-prique q1 q2)
61.2.1.8.2 Description
62 Package: fork-future
- Uses: common-lisp
- Used by: None.
62.1 Description
62.2 External Symbols
62.2.1 External Classes
62.2.1.1 Internal Class: future
62.2.1.1.1 Inheritance
- Parent classes: standard-object
- Precedence list: future, standard-object, slot-object, t
- Direct subclasses: None.
62.2.1.1.2 Description
62.2.1.1.3 Direct Slots
pid
- Value type:
t
- Initial value:
NIL
- Initargs: pid
- Allocation: instance
pid-of
(pid-of object)
- (
pid-of
(futurefork-future:future
))
code
- Value type:
t
- Initial value:
(ERROR "Must provide code for future")
- Initargs: code
- Allocation: instance
code-of
(code-of object)
- (
code-of
(futurefork-future:future
))
lambda
- Value type:
t
- Initial value:
(ERROR "Must provide lambda for future")
- Initargs: lambda
- Allocation: instance
lambda-of
(lambda-of object)
- (
lambda-of
(futurefork-future:future
))
result
- Value type:
t
- Initial value: ='FORK-FUTURE::UNBOUND=
- Initargs: none
- Allocation: instance
result-of
(result-of object)
- (
result-of
(futurefork-future:future
))
exit-status
- Value type:
t
- Initial value: ='FORK-FUTURE::UNKNOWN=
- Initargs: none
- Allocation: instance
exit-status-of
(exit-status-of object)
- (
exit-status-of
(futurefork future:future
))
62.2.2 External Global Variables
62.2.2.1 Variable: *after-fork-hooks*
62.2.2.1.1 Value
(FORK-FUTURE::CLOSE-SWANK-CONNECTIONS)
Type: cons
62.2.2.1.2 Description
62.2.2.2 Variable: *before-fork-hooks*
62.2.2.2.1 Value
NIL
Type: null
62.2.2.2.2 Description
62.2.2.3 Variable: *fork-future-max-processes*
62.2.2.3.1 Value
4
Type: integer
62.2.2.3.2 Description
62.2.2.4 Variable: *future-result-file-template*
62.2.2.4.1 Value
"/tmp/future-result.~d.tmp~~"
Type: simple-array
62.2.2.4.2 Description
62.2.3 External Macros
62.2.3.1 Internal Macro: future
62.2.3.1.1 Syntax
(future &body body)
62.2.3.1.2 Description
Evaluate expr in parallel using a forked child process. Returns a 'future' object whose value can be retrieved using touch. No side-effects made in <expr> will be visible from the calling process.
62.2.3.2 Macro: with-new-environment
62.2.3.2.1 Syntax
(with-new-environment nil &body body)
62.2.3.2.2 Description
62.2.4 External Functions
62.2.4.1 Function: initialize-environment
62.2.4.1.1 Syntax
(initialize-environment &key kill-current-futures-p force-p)
62.2.4.1.2 Description
62.2.4.2 Function: kill-all-futures
62.2.4.2.1 Syntax
(kill-all-futures &optional force)
62.2.4.2.2 Description
62.2.4.3 Function: kill-future
62.2.4.3.1 Syntax
(kill-future future &optional force)
62.2.4.3.2 Description
62.2.4.4 Function: touch
62.2.4.4.1 Syntax
(touch future)
62.2.4.4.2 Description
62.2.4.5 Function: wait-for-all-futures
62.2.4.5.1 Syntax
(wait-for-all-futures)
62.2.4.5.2 Description
62.2.4.6 Function: wait-for-any-future
62.2.4.6.1 Syntax
(wait-for-any-future &optional error-p (warn-p t))
62.2.4.6.2 Description
62.2.4.7 Function: wait-for-future
62.2.4.7.1 Syntax
(wait-for-future future)
62.2.4.7.2 Description
62.3 Ambiguous Symbols
62.3.1 Future
Disambiguation.
- Macro:
fork-future:future
- Class:
fork-future:future
- Package:
fork-future:future
63 Package: future
- Uses: common-lisp
- Used by: None.
63.1 Description
63.2 External Symbols
63.2.1 External Structures
63.2.1.1 Internal Structure: future
63.2.1.1.1 Description
63.2.1.1.2 Slots
63.2.2 External Global Variables
63.2.2.1 Variable: *after-finish-hooks*
63.2.2.1.1 Value
NIL
Type: null
63.2.2.1.2 Description
63.2.2.2 Variable: *before-start-hooks*
63.2.2.2.1 Value
NIL
Type: null
63.2.2.2.2 Description
63.2.3 External Macros
63.2.3.1 Internal Macro: future
63.2.3.1.1 Syntax
(future &body body)
63.2.3.1.2 Description
63.2.3.2 Macro: with-new-environment
63.2.3.2.1 Syntax
(with-new-environment nil &body body)
63.2.3.2.2 Description
63.2.4 External Functions
63.2.4.1 Function: future-funcall
63.2.4.1.1 Syntax
(future-funcall function &optional args future)
63.2.4.1.2 Description
63.2.4.2 Function: future-max-threads
63.2.4.2.1 Syntax
(future-max-threads)
63.2.4.2.2 Description
63.2.4.3 Function: initialize-environment
63.2.4.3.1 Syntax
(initialize-environment &key kill-current-futures-p)
63.2.4.3.2 Description
63.2.4.4 Function: kill-all-futures
63.2.4.4.1 Syntax
(kill-all-futures)
63.2.4.4.2 Description
63.2.4.5 Function: kill-future
63.2.4.5.1 Syntax
(kill-future future)
63.2.4.5.2 Description
63.2.4.6 Function: touch
63.2.4.6.1 Syntax
(touch future)
63.2.4.6.2 Description
63.2.4.7 Function: wait-for-all-futures
63.2.4.7.1 Syntax
(wait-for-all-futures futures)
63.2.4.7.2 Description
63.2.4.8 Function: wait-for-any-future
63.2.4.8.1 Syntax
(wait-for-any-future)
63.2.4.8.2 Description
63.2.4.9 Function: wait-for-future
63.2.4.9.1 Syntax
(wait-for-future future)
63.2.4.9.2 Description
63.3 Ambiguous Symbols
63.3.1 Future
Disambiguation.
- Macro:
future:future
- Structure:
future:future
- Package:
future:future
64 Package: hjs.learn.k-means
- Uses: common-lisp, hjs.util.vector, hjs.util.meta, hjs.learn.read-data, clml.statistics, hjs.util.matrix, iterate, hjs.learn.vars
- Used by: clml.test, clml.clustering.cluster-validation
64.1 Description
64.1.0.1 sample usage
64.2 External Symbols
64.2.1 External Structures
64.2.1.1 Inherited Structure: cluster
64.2.1.1.1 Description
64.2.1.1.2 Slots
id
- Value type:
id
- Initial value:
-1
- Initargs: none
- Allocation: instance
center
- Value type:
dvec
- Initial value:
#()
- Initargs: none
- Allocation: instance
old-center
- Value type:
dvec
- Initial value:
#()
- Initargs: none
- Allocation: instance
size
- Value type:
fixnum
- Initial value:
0
- Initargs: none
- Allocation: instance
points
- Value type:
list
- Initial value:
NIL
- Initargs: none
- Allocation: instance
64.2.1.2 Inherited Structure: point
64.2.1.2.1 Description
64.2.1.2.2 Slots
id
- Value type:
id
- Initial value:
-1
- Initargs: none
- Allocation: instance
pos
- Value type:
dvec
- Initial value:
#()
- Initargs: none
- Allocation: instance
owner
- Value type:
t
- Initial value:
NIL
- Initargs: none
- Allocation: instance
64.2.2 External Types
64.2.2.1 Inherited Type: id
64.2.3 External Functions
64.2.3.1 Inherited Function: %make-point
64.2.3.1.1 Syntax
(%make-point id pos)
64.2.3.1.2 Description
64.2.3.2 Inherited Function: c-center
64.2.3.2.1 Syntax
(c-center instance)
64.2.3.2.2 Description
64.2.3.3 Inherited Function: c-points
64.2.3.3.1 Syntax
(c-points instance)
64.2.3.3.2 Description
64.2.3.4 Inherited Function: c-size
64.2.3.4.1 Syntax
(c-size instance)
64.2.3.4.2 Description
64.2.3.5 Inherited Function: copy-point
64.2.3.5.1 Syntax
(copy-point instance)
64.2.3.5.2 Description
64.2.3.6 Inherited Function: get-cluster-centroids
64.2.3.6.1 Syntax
(get-cluster-centroids object)
64.2.3.6.2 Description
64.2.3.7 Inherited Function: get-cluster-points
64.2.3.7.1 Syntax
(get-cluster-points object cid)
64.2.3.7.2 Description
64.2.3.8 Inherited Function: k-means
64.2.3.8.1 Syntax
(k-means k d &key (distance-fn *distance-function*) standardization (max-iteration *max-iteration*) (num-of-trials *num-of-trials*) (random-state *k-means-random-state*) debug)
64.2.3.8.2 Description
- return: (best-result table)
- best-result : points, clusters, distance infomation, etc.
- table : lookup table for normalized vecs and original vecs, might be removed later.
- arguments:
- k : <integer>, number of clusters
- dataset : <numeric-dataset> | <category-dataset> | <numeric-or-category-dataset>
- distance-fn : #'euclid-distance | #'manhattan-distance | #'cosine-distance
- standardization : t | nil, whether to standardize the inputs
- max-iteration : maximum number of iterations of one trial
- num-of-trials : number of trials, every trial changes the initial position of the clusters
- random-state : (for testing), specify the random-state of the random number generator
- debug : (for debugging) print out some debugging information
64.2.3.9 Inherited Function: make-cluster
64.2.3.9.1 Syntax
(make-cluster id center)
64.2.3.9.2 Description
64.2.3.10 Inherited Function: make-random-state-with-seed
64.2.3.10.1 Syntax
(make-random-state-with-seed seed)
64.2.3.10.2 Description
64.2.3.11 Inherited Function: p-owner
64.2.3.11.1 Syntax
(p-owner instance)
64.2.3.11.2 Description
64.2.3.12 Inherited Function: p-pos
64.2.3.12.1 Syntax
(p-pos instance)
64.2.3.12.2 Description
64.2.3.13 Inherited Function: pw-clusters
64.2.3.13.1 Syntax
(pw-clusters instance)
64.2.3.13.2 Description
64.2.3.14 Inherited Function: pw-points
64.2.3.14.1 Syntax
(pw-points instance)
64.2.3.14.2 Description
64.3 Ambiguous Symbols
64.3.1 K-Means
Disambiguation.
- Function:
k-means
- Package:
k-means
65 Package: hjs.learn.read-data
- Uses: common-lisp, hjs.util.meta, hjs.util.vector, hjs.learn.vars, hjs.util.matrix, hjs.util.missing-value
- Used by: clml.test, clml.text.utilities, clml.association-rule, clml.graph.graph-anomaly-detection, clml.graph.shortest-path, clml.time-series.burst-detection, clml.time-series.exponential-smoothing, clml.time-series.anomaly detection, clml.time series.changefinder, clml.time series.autoregression, clml.time series.state-space, clml.time series.statistics, clml.time-series.util, clml.time-series.read-data, clml.classifiers.nbayes, clml.classifiers.logistic-regression, clml.classifiers.linear regression, clml.clustering.optics, clml.clustering.nmf, clml.clustering.hc, clml.nearest-search.k-nn-new, clml.nearest-search.nearest, clml.nearest-search.k-nn, clml.svm.svr, clml.svm.smo, clml.svm.pwss3, clml.svm.one class, clml.svm.wss3, clml.pca, clml.decision tree.random-forest, clml.decision tree.decision-tree, hjs.learn.k-means
65.1 Description
package for reading data for machine learning
65.2 External Symbols
65.2.1 External Classes
65.2.1.1 Inherited Class: numeric-and-category-dataset
65.2.1.1.1 Inheritance
- Parent classes: numeric-dataset, category dataset
- Precedence list: numeric-and-category-dataset, numeric-dataset, category dataset, specialized-dataset, dataset, standard-object, slot-object, t
- Direct subclasses: None.
65.2.1.1.2 Description
Dataset specialized in both numeric and category values.
65.2.1.1.3 Direct Slots
65.2.1.1.4 Indirect Slots
numeric-points
- Value type:
simple-array
- Initial value:
(ERROR "Must specify points of the dataset.")
- Initargs: numeric-points
- Allocation: instance
category-points
- Value type:
simple-array
- Initial value:
(ERROR "Must specify points of the dataset.")
- Initargs: category-points
- Allocation: instance
dimensions
- Value type:
simple-array
- Initial value:
(ERROR "Must specify the dimension information for the dataset.")
- Initargs: dimensions
- Allocation: instance
65.2.1.2 Inherited Class: numeric-dataset
65.2.1.2.1 Inheritance
- Parent classes: specialized-dataset
- Precedence list: numeric-dataset, specialized-dataset, dataset, standard-object, slot-object, t
- Direct subclasses: numeric-and-category-dataset
65.2.1.2.2 Description
Dataset specialized in numeric values.
65.2.1.2.3 Direct Slots
numeric-points
- Value type:
simple-array
- Initial value:
(ERROR "Must specify points of the dataset.")
- Initargs: numeric-points
- Allocation: instance
dataset-numeric-points
(dataset-numeric-points object)
- (
dataset-numeric-points
(numeric-matrix-datasetnumeric-matrix-dataset
)) - (
dataset-numeric-points
(numeric-datasetnumeric-dataset
))
65.2.1.2.4 Indirect Slots
dimensions
- Value type:
simple-array
- Initial value:
(ERROR "Must specify the dimension information for the dataset.")
- Initargs: dimensions
- Allocation: instance
65.2.1.3 Inherited Class: numeric-matrix-and-category-dataset
65.2.1.3.1 Inheritance
- Parent classes: numeric-matrix-dataset, category-dataset
- Precedence list: numeric-matrix-and-category dataset, numeric-matrix-dataset, category-dataset, specialized dataset, dataset, standard object, slot-object, t
- Direct subclasses: None.
65.2.1.3.2 Description
Dataset specialized in both numeric (as matrix) and category values.
65.2.1.3.3 Direct Slots
65.2.1.3.4 Indirect Slots
numeric-points
- Value type:
dmat
- Initial value:
(ERROR "Must specify points of the dataset.")
- Initargs: numeric-points
- Allocation: instance
category-points
- Value type:
simple-array
- Initial value:
(ERROR "Must specify points of the dataset.")
- Initargs: category-points
- Allocation: instance
dimensions
- Value type:
simple-array
- Initial value:
(ERROR "Must specify the dimension information for the dataset.")
- Initargs: dimensions
- Allocation: instance
65.2.1.4 Inherited Class: numeric-matrix-dataset
65.2.1.4.1 Inheritance
- Parent classes: specialized-dataset
- Precedence list: numeric-matrix-dataset, specialized-dataset, dataset, standard-object, slot-object, t
- Direct subclasses: numeric-matrix-and-category dataset
65.2.1.4.2 Description
Dataset represented as matrix (2-dim CL array)
65.2.1.4.3 Direct Slots
numeric-points
- Value type:
dmat
- Initial value:
(ERROR "Must specify points of the dataset.")
- Initargs: numeric-points
- Allocation: instance
dataset-numeric-points
(dataset-numeric-points object)
- (
dataset-numeric-points
(numeric-matrix-datasetnumeric-matrix-dataset
)) - (
dataset-numeric-points
(numeric-datasetnumeric-dataset
))
65.2.1.4.4 Indirect Slots
dimensions
- Value type:
simple-array
- Initial value:
(ERROR "Must specify the dimension information for the dataset.")
- Initargs: dimensions
- Allocation: instance
65.2.1.5 Inherited Class: specialized-dataset
65.2.1.5.1 Inheritance
- Parent classes: dataset
- Precedence list: specialized-dataset, dataset, standard-object, slot-object, t
- Direct subclasses: time-series-dataset, numeric-matrix-dataset, category dataset, numeric-dataset
65.2.1.5.2 Description
Abstract datatype for specialized datasets.
65.2.1.5.3 Direct Slots
65.2.1.5.4 Indirect Slots
dimensions
- Value type:
simple-array
- Initial value:
(ERROR "Must specify the dimension information for the dataset.")
- Initargs: dimensions
- Allocation: instance
65.2.1.6 Inherited Class: unspecialized-dataset
65.2.1.6.1 Inheritance
- Parent classes: dataset
- Precedence list: unspecialized-dataset, dataset, standard-object, slot-object, t
- Direct subclasses: None.
65.2.1.6.2 Description
Unspecialized data, numeric value and category value are stored in one array.
65.2.1.6.3 Direct Slots
points
- Value type:
simple-array
- Initial value:
(ERROR "Must specify points of the dataset.")
- Initargs: points
- Allocation: instance
dataset-points
(dataset-points object)
- (
dataset-points
(datasetspecialized dataset
)) - (
dataset-points
(unspecialized-datasetunspecialized-dataset
))
65.2.1.6.4 Indirect Slots
dimensions
- Value type:
simple-array
- Initial value:
(ERROR "Must specify the dimension information for the dataset.")
- Initargs: dimensions
- Allocation: instance
65.2.2 External Functions
65.2.2.1 Inherited Function: choice-a-dimension
65.2.2.1.1 Syntax
(choice-a-dimension name data)
65.2.2.1.2 Description
Pick up a dimension as vector
65.2.2.2 Inherited Function: choice-dimensions
65.2.2.2.1 Syntax
(choice-dimensions names data)
65.2.2.2.2 Description
Pick up several dimensions as (vector vector)
65.2.2.3 Inherited Function: copy-dataset
65.2.2.3.1 Syntax
(copy-dataset dataset)
65.2.2.3.2 Description
65.2.2.4 Inherited Function: copy-dimension
65.2.2.4.1 Syntax
(copy-dimension dimension)
65.2.2.4.2 Description
65.2.2.5 Inherited Function: dataset-category-points
65.2.2.5.1 Syntax
(dataset-category-points object)
65.2.2.5.2 Description
65.2.2.6 Inherited Function: dataset-cleaning
65.2.2.6.1 Syntax
(dataset-cleaning d &key interp-types-alist outlier-types-alist outlier-values-alist)
65.2.2.6.2 Description
Cleaning: Outlier verification and Interpolation
65.2.2.7 Inherited Function: dataset-dimensions
65.2.2.7.1 Syntax
(dataset-dimensions object)
65.2.2.7.2 Description
65.2.2.8 Inherited Function: dataset-numeric-points
65.2.2.8.1 Syntax
(dataset-numeric-points object)
65.2.2.8.2 Description
65.2.2.9 Inherited Function: dataset-points
65.2.2.9.1 Syntax
(dataset-points object)
65.2.2.9.2 Description
65.2.2.10 Inherited Function: dimension-index
65.2.2.10.1 Syntax
(dimension-index object)
65.2.2.10.2 Description
65.2.2.11 Inherited Function: dimension-metadata
65.2.2.11.1 Syntax
(dimension-metadata object)
65.2.2.11.2 Description
65.2.2.12 Inherited Function: dimension-name
65.2.2.12.1 Syntax
(dimension-name object)
65.2.2.12.2 Description
65.2.2.13 Inherited Function: dimension-type
65.2.2.13.1 Syntax
(dimension-type object)
65.2.2.13.2 Description
65.2.2.14 Inherited Function: divide-dataset
65.2.2.14.1 Syntax
(divide-dataset dataset &key divide-ratio random range except (range all))
65.2.2.14.2 Description
Divide dataset and restrict column
65.2.2.15 Inherited Function: make-bootstrap-sample-datasets
65.2.2.15.1 Syntax
(make-bootstrap-sample-datasets dataset &key (number-of-datasets 10))
65.2.2.15.2 Description
65.2.2.16 Inherited Function: make-dimension
65.2.2.16.1 Syntax
(make-dimension name type index &key metadata)
65.2.2.16.2 Description
65.2.2.17 Inherited Function: make-numeric-and-category-dataset
65.2.2.17.1 Syntax
(make-numeric-and-category-dataset all-column-names numeric-data numeric-indices category-data category-indices)
65.2.2.17.2 Description
65.2.2.18 Inherited Function: make-numeric-dataset
65.2.2.18.1 Syntax
(make-numeric-dataset all-column-names specialized-data)
65.2.2.18.2 Description
65.2.2.19 Inherited Function: make-numeric-matrix-and-category-dataset
65.2.2.19.1 Syntax
(make-numeric-matrix-and-category-dataset all-column-names numeric-data numeric-indices category-data category-indices)
65.2.2.19.2 Description
65.2.2.20 Inherited Function: make-numeric-matrix-dataset
65.2.2.20.1 Syntax
(make-numeric-matrix-dataset all-column-names specialized-matrix-data)
65.2.2.20.2 Description
65.2.2.21 Inherited Function: make-unspecialized-dataset
65.2.2.21.1 Syntax
(make-unspecialized-dataset all-column-names data &key (missing-value-check t) missing-values-list (missing-value-test #'equalp))
65.2.2.21.2 Description
65.2.2.22 Inherited Function: pick-and-specialize-data
65.2.2.22.1 Syntax
(pick-and-specialize-data d &key (range all) except data-types store-numeric-data-as-matrix)
65.2.2.22.2 Description
65.2.2.23 Inherited Function: read-data-from-file
65.2.2.23.1 Syntax
(read-data-from-file filename &key (type sexp) (external-format default external-format-p) csv-type-spec (csv-header-p t) (missing-value-check t) missing-values-list)
65.2.2.23.2 Description
Convention: first line is column name.
66 Package: hjs.learn.vars
- Uses: common-lisp
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.graph.graph-centrality, clml.time-series.exponential-smoothing, clml.time-series.anomaly detection, clml.time series.autoregression, clml.time series.statistics, clml.time series.read-data, clml.pca, hjs.learn.k-means, hjs.learn.read data
66.1 Description
66.2 External Symbols
66.2.1 External Constants
66.2.1.1 Inherited Constant: *most-negative-exp-able-float*
66.2.1.1.1 Value
-744.4400719213812
Type: double-float
66.2.1.1.2 Description
66.2.1.2 Inherited Constant: *most-positive-exp-able-float*
66.2.1.2.1 Value
709.782712893384
Type: double-float
66.2.1.2.2 Description
66.2.2 External Global Variables
66.2.2.1 Inherited Variable: *epsilon*
66.2.2.1.1 Value
1.e-8
Type: double-float
66.2.2.1.2 Description
66.2.2.2 Inherited Variable: *workers*
66.2.2.2.1 Value
4
Type: integer
66.2.2.2.2 Description
67 Package: hjs.util.eigensystems
- Uses: common-lisp, hjs.util.meta, hjs.util.vector, hjs.util.matrix, blas, lapack
- Used by: clml.pca
67.1 Description
67.2 External Symbols
67.2.1 External Functions
67.2.1.1 Function: balanc
67.2.1.1.1 Syntax
(balanc a &key (radix 2.0))
67.2.1.1.2 Description
67.2.1.2 Function: eigen-by-householder-ql
67.2.1.2.1 Syntax
(eigen-by-householder-ql a)
67.2.1.2.2 Description
67.2.1.3 Function: eigen-by-jacobi
67.2.1.3.1 Syntax
(eigen-by-jacobi a)
67.2.1.3.2 Description
67.2.1.4 Function: eigen-by-power
67.2.1.4.1 Syntax
(eigen-by-power mat &key eigen-thld (from max) (precision 1.e-8))
67.2.1.4.2 Description
assume that mat is a positive definite matrix
67.2.1.5 Function: eigsrt
67.2.1.5.1 Syntax
(eigsrt d v)
67.2.1.5.2 Description
67.2.1.6 Function: elmhes
67.2.1.6.1 Syntax
(elmhes a)
67.2.1.6.2 Description
67.2.1.7 Function: jacobi
67.2.1.7.1 Syntax
(jacobi a)
67.2.1.7.2 Description
67.2.1.8 Function: tqli
67.2.1.8.1 Syntax
(tqli)
67.2.1.8.2 Description
67.2.1.9 Function: tred2
67.2.1.9.1 Syntax
(tred2)
67.2.1.9.2 Description
68 Package: hjs.util.matrix
- Uses: common-lisp, hjs.util.meta, hjs.util.vector, blas, lapack
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.graph.graph-centrality, clml.graph.shortest-path, clml.graph.graph-utils, clml.graph.read-graph, clml.time-series.anomaly-detection, clml.time-series.changefinder, clml.time-series.autoregression, clml.time-series.state-space, clml.time-series.statistics, clml.time-series.util, clml.classifiers.logistic-regression, clml.classifiers.linear-regression, clml.clustering.k-means2, clml.clustering.spectral-clustering, clml.clustering.optics, clml.clustering.nmf, clml.clustering.hc, clml.nearest-search.nearest, clml.nonparametric.lfm, clml.nonparametric.dpm, clml.nonparameteric.statistics, clml.svm.svr, clml.svm.smo, clml.svm.pwss3, clml.svm.one class, clml.svm.wss3, clml.pca, clml.decision tree.decision-tree, hjs.util.eigensystems, hjs.learn.k-means, hjs.learn.read-data
68.1 Description
68.2 External Symbols
68.2.1 External Types
68.2.1.1 Inherited Type: dmat
68.2.1.2 Inherited Type: dmat
68.2.2 External Macros
68.2.2.1 Inherited Macro: make-dmat
68.2.2.1.1 Syntax
(make-dmat a b)
68.2.2.1.2 Description
68.2.2.2 Inherited Macro: ncol
68.2.2.2.1 Syntax
(ncol matrix)
68.2.2.2.2 Description
68.2.2.3 Inherited Macro: nrow
68.2.2.3.1 Syntax
(nrow matrix)
68.2.2.3.2 Description
68.2.3 External Functions
68.2.3.1 Inherited Function: append-mat
68.2.3.1.1 Syntax
(append-mat a b &key (direction diagonal))
68.2.3.1.2 Description
68.2.3.2 Inherited Function: c*mat
68.2.3.2.1 Syntax
(c*mat c mat)
68.2.3.2.2 Description
68.2.3.3 Inherited Function: copy-mat
68.2.3.3.1 Syntax
(copy-mat)
68.2.3.3.2 Description
68.2.3.4 Inherited Function: correlation-matrix
68.2.3.4.1 Syntax
(correlation-matrix trials &optional result)
68.2.3.4.2 Description
68.2.3.5 Inherited Function: covariance-matrix
68.2.3.5.1 Syntax
(covariance-matrix trials &optional result)
68.2.3.5.2 Description
68.2.3.6 Inherited Function: det
68.2.3.6.1 Syntax
(det mat)
68.2.3.6.2 Description
68.2.3.7 Inherited Function: diag
68.2.3.7.1 Syntax
(diag dim &optional (val 1.0))
68.2.3.7.2 Description
68.2.3.8 Inherited Function: flatmat2vecs
68.2.3.8.1 Syntax
(flatmat2vecs flatmat nrow &optional vecs)
68.2.3.8.2 Description
68.2.3.9 Inherited Function: flatmat2vecs
68.2.3.9.1 Syntax
(flatmat2vecs flatmat nrow &optional vecs)
68.2.3.9.2 Description
68.2.3.10 Inherited Function: m*m
68.2.3.10.1 Syntax
(m*m a b &optional result)
68.2.3.10.2 Description
68.2.3.11 Inherited Function: m*v
68.2.3.11.1 Syntax
(m*v m v &optional result)
68.2.3.11.2 Description
68.2.3.12 Inherited Function: mat2vecs
68.2.3.12.1 Syntax
(mat2vecs mat &optional vecs)
68.2.3.12.2 Description
68.2.3.13 Inherited Function: mat2vecs
68.2.3.13.1 Syntax
(mat2vecs mat &optional vecs)
68.2.3.13.2 Description
68.2.3.14 Inherited Function: mcm
68.2.3.14.1 Syntax
(mcm a b &key (c #'+))
68.2.3.14.2 Description
68.2.3.15 Inherited Function: m^-1
68.2.3.15.1 Syntax
(m^-1 a)
68.2.3.15.2 Description
68.2.3.16 Inherited Function: regularize-covariance
68.2.3.16.1 Syntax
(regularize-covariance cov-mat &key (alpha 0.01) (delta-min 1.e-8) (det-thld 1.e-8))
68.2.3.16.2 Description
68.2.3.17 Inherited Function: row-aref
68.2.3.17.1 Syntax
(row-aref mat nrow &optional row-vec)
68.2.3.17.2 Description
68.2.3.18 Inherited Function: specialize-mat
68.2.3.18.1 Syntax
(specialize-mat array &key check)
68.2.3.18.2 Description
68.2.3.19 Inherited Function: standard-deviations
68.2.3.19.1 Syntax
(standard-deviations trials &optional result)
68.2.3.19.2 Description
68.2.3.20 Inherited Function: standard-deviations-from-covariance
68.2.3.20.1 Syntax
(standard-deviations-from-covariance covariance &optional result)
68.2.3.20.2 Description
68.2.3.21 Inherited Function: standardize
68.2.3.21.1 Syntax
(standardize trials)
68.2.3.21.2 Description
68.2.3.22 Inherited Function: sum-mat
68.2.3.22.1 Syntax
(sum-mat matrix &key (by row) initial)
68.2.3.22.2 Description
68.2.3.23 Inherited Function: tr
68.2.3.23.1 Syntax
(tr mat)
68.2.3.23.2 Description
68.2.3.24 Inherited Function: trans
68.2.3.24.1 Syntax
(trans vmatrix &key (element-type t))
68.2.3.24.2 Description
68.2.3.25 Inherited Function: transpose
68.2.3.25.1 Syntax
(transpose matrix &optional result)
68.2.3.25.2 Description
68.2.3.26 Inherited Function: transposev
68.2.3.26.1 Syntax
(transposev vmatrix)
68.2.3.26.2 Description
68.2.3.27 Inherited Function: vcv
68.2.3.27.1 Syntax
(vcv v w &key (c #'+))
68.2.3.27.2 Description
68.2.3.28 Inherited Function: vdotv
68.2.3.28.1 Syntax
(vdotv v1 v2)
68.2.3.28.2 Description
68.2.3.29 Inherited Function: vecs2flatmat
68.2.3.29.1 Syntax
(vecs2flatmat vecs &optional flatmat)
68.2.3.29.2 Description
68.2.3.30 Inherited Function: vecs2flatmat
68.2.3.30.1 Syntax
(vecs2flatmat vecs &optional flatmat)
68.2.3.30.2 Description
68.2.3.31 Inherited Function: vecs2mat
68.2.3.31.1 Syntax
(vecs2mat vecs &optional mat)
68.2.3.31.2 Description
68.2.3.32 Inherited Function: vecs2mat
68.2.3.32.1 Syntax
(vecs2mat vecs &optional mat)
68.2.3.32.2 Description
69 Package: hjs.util.meta
- Uses: common-lisp
- Used by: clml.graph.graph-anomaly detection, clml.graph.graph centrality, clml.graph.shortest-path, clml.graph.graph-utils, clml.graph.read-graph, clml.time-series.exponential-smoothing, clml.time-series.anomaly detection, clml.time series.changefinder, clml.time series.autoregression, clml.time series.state-space, clml.time series.statistics, clml.time-series.util, clml.time-series.read-data, clml.numeric.fast-fourier-transform, clml.classifiers.linear regression, clml.clustering.k-means2, clml.clustering.cluster validation, clml.clustering.spectral-clustering, clml.clustering.nmf, clml.clustering.hc, clml.nearest-search.k-nn-new, clml.nearest-search.nearest, clml.nearest-search.k-nn, clml.nonparametric.lfm, clml.nonparametric.hdp-hmm, clml.nonparametric.ihmm, clml.nonparametric.blocked-hdp-hmm, clml.nonparametric.sticky-hdp hmm, clml.nonparametric.hdp, clml.nonparametric.hdp-lda, clml.nonparametric.dpm, clml.nonparameteric.statistics, clml.svm.svr, clml.svm.smo, clml.svm.pwss3, clml.svm.one class, clml.svm.wss3, clml.svm.mu, clml.pca, hjs.util.eigensystems, hjs.learn.k-means, hjs.learn.read data, hjs.util.missing-value, hjs.util.matrix, hjs.util.vector
69.1 Description
69.2 External Symbols
69.2.1 External Types
69.2.1.1 Type: array-index
69.2.1.2 Type: cvec
69.2.1.3 Inherited Type: dmat
69.2.1.4 Internal Type: dvec
69.2.2 External Macros
69.2.2.1 Macro: *fl
69.2.2.1.1 Syntax
(*fl &rest double-floats)
69.2.2.1.2 Description
69.2.2.2 Macro: +fl
69.2.2.2.1 Syntax
(+fl &rest double-floats)
69.2.2.2.2 Description
69.2.2.3 Macro: -fl
69.2.2.3.1 Syntax
(-fl &rest double-floats)
69.2.2.3.2 Description
69.2.2.4 Macro: /fl
69.2.2.4.1 Syntax
(/fl &rest double-floats)
69.2.2.4.2 Description
69.2.2.5 Macro: defdoublefunc
69.2.2.5.1 Syntax
(defdoublefunc name input-arguments)
69.2.2.5.2 Description
69.2.2.6 Macro: defun-speedy
69.2.2.6.1 Syntax
(defun-speedy name lambda-list &body body)
69.2.2.6.2 Description
69.2.2.7 Internal Macro: dfloat
69.2.2.7.1 Syntax
(dfloat x)
69.2.2.7.2 Description
69.2.2.8 Macro: gethash-or-set
69.2.2.8.1 Syntax
(gethash-or-set key table gen-value)
69.2.2.8.2 Description
69.2.2.9 Macro: once-only
69.2.2.9.1 Syntax
(once-only names &body body)
69.2.2.9.2 Description
69.2.2.10 Macro: safe-/
69.2.2.10.1 Syntax
(safe-/ a b)
69.2.2.10.2 Description
Returns 0.0d0 when dividing by zero.
69.2.2.11 Macro: with-unique-names
69.2.2.11.1 Syntax
(with-unique-names (&rest bindings) &body body)
69.2.2.11.2 Description
69.2.3 External Functions
69.2.3.1 Function: batch-elt
69.2.3.1.1 Syntax
(batch-elt seq indexes &key (result-type 'list))
69.2.3.1.2 Description
69.2.3.2 Function: d-exp
69.2.3.2.1 Syntax
(d-exp x)
69.2.3.2.2 Description
69.2.3.3 Function: d-expt
69.2.3.3.1 Syntax
(d-expt base power)
69.2.3.3.2 Description
69.2.3.4 Inherited Function: flatmat2vecs
69.2.3.4.1 Syntax
(flatmat2vecs flatmat nrow &optional vecs)
69.2.3.4.2 Description
69.2.3.5 Function: get-underlying-1d-array
69.2.3.5.1 Syntax
(get-underlying-1d-array array)
69.2.3.5.2 Description
69.2.3.6 Inherited Function: make-dvec
69.2.3.6.1 Syntax
(make-dvec size &optional initial-element)
69.2.3.6.2 Description
69.2.3.7 Inherited Function: mat2vecs
69.2.3.7.1 Syntax
(mat2vecs mat &optional vecs)
69.2.3.7.2 Description
69.2.3.8 Function: split-seq-odd-even
69.2.3.8.1 Syntax
(split-seq-odd-even seq)
69.2.3.8.2 Description
69.2.3.9 Inherited Function: vecs2flatmat
69.2.3.9.1 Syntax
(vecs2flatmat vecs &optional flatmat)
69.2.3.9.2 Description
69.2.3.10 Inherited Function: vecs2mat
69.2.3.10.1 Syntax
(vecs2mat vecs &optional mat)
69.2.3.10.2 Description
70 Package: hjs.util.missing-value
- Uses: common-lisp, hjs.util.vector, clml.statistics, hjs.util.meta
- Used by: clml.test, clml.graph.graph-anomaly-detection, clml.graph.shortest-path, clml.time-series.burst-detection, clml.time-series.anomaly-detection, clml.time-series.changefinder, clml.time-series.state-space, clml.time-series.read-data, hjs.learn.read-data
70.1 Description
70.2 External Symbols
70.2.1 External Constants
70.2.1.1 Inherited Constant: *+inf*
70.2.1.1.1 Value
#.SB-EXT:DOUBLE-FLOAT-POSITIVE-INFINITY
Type: double-float
70.2.1.1.2 Description
70.2.1.2 Inherited Constant: *-inf*
70.2.1.2.1 Value
#.SB-EXT:DOUBLE-FLOAT-NEGATIVE-INFINITY
Type: double-float
70.2.1.2.2 Description
70.2.1.3 Inherited Constant: *c-nan*
70.2.1.3.1 Value
0
Type: bit
70.2.1.3.2 Description
70.2.1.4 Inherited Constant: *missing-values*
70.2.1.4.1 Value
(NIL "" "NA")
Type: cons
70.2.1.4.2 Description
70.2.1.5 Inherited Constant: *na*
70.2.1.5.1 Value
:NA
Type: keyword
70.2.1.5.2 Description
70.2.1.6 Inherited Constant: *nan*
70.2.1.6.1 Value
#<DOUBLE-FLOAT quiet NaN>
Type: double-float
70.2.1.6.2 Description
70.2.2 External Functions
70.2.2.1 Inherited Function: c-nan-p
70.2.2.1.1 Syntax
(c-nan-p value)
70.2.2.1.2 Description
70.2.2.2 Inherited Function: fill-na
70.2.2.2.1 Syntax
(fill-na seq &optional (predicate #'missing-value-p))
70.2.2.2.2 Description
70.2.2.3 Inherited Function: interpolate
70.2.2.3.1 Syntax
(interpolate seq &key (na-interp t) na-string (interp zero) (seq-type numeric))
70.2.2.3.2 Description
70.2.2.4 Inherited Function: missing-value-p
70.2.2.4.1 Syntax
(missing-value-p value &key (missing-values-list *missing-values*) (test #'equalp))
70.2.2.4.2 Description
70.2.2.5 Inherited Function: na-p
70.2.2.5.1 Syntax
(na-p value &key na-string (type numeric))
70.2.2.5.2 Description
70.2.2.6 Inherited Function: nan-p
70.2.2.6.1 Syntax
(nan-p value)
70.2.2.6.2 Description
70.2.2.7 Inherited Function: outlier-verification
70.2.2.7.1 Syntax
(outlier-verification seq &key (type smirnov-grubbs) (outlier-value 0.05) (user-test #'=) (seq-type numeric))
70.2.2.7.2 Description
71 Package: hjs.util.vector
- Uses: common-lisp, hjs.util.meta
- Used by: clml.test, clml.association-rule, clml.graph.graph-anomaly-detection, clml.graph.graph-centrality, clml.graph.shortest-path, clml.graph.graph-utils, clml.graph.read-graph, clml.time-series.exponential-smoothing, clml.time-series.anomaly-detection, clml.time-series.changefinder, clml.time-series.autoregression, clml.time-series.state-space, clml.time-series.statistics, clml.time-series.util, clml.time-series.read-data, clml.classifiers.logistic-regression, clml.clustering.k-means2, clml.clustering.cluster-validation, clml.clustering.hc, clml.nearest-search.k-nn-new, clml.nearest-search.nearest, clml.nearest-search.k-nn, clml.nonparametric.lfm, clml.nonparametric.dpm, clml.nonparameteric.statistics, clml.svm.svr, clml.svm.smo, clml.svm.pwss3, clml.svm.one class, clml.svm.wss3, clml.pca, hjs.util.eigensystems, hjs.learn.k-means, hjs.learn.read-data, hjs.util.missing value, hjs.util.matrix
71.1 Description
71.2 External Symbols
71.2.1 External Macros
71.2.1.1 Inherited Macro: do-vec
71.2.1.1.1 Syntax
(do-vec (var vector &key (type t) (start 0) end from-end setf-var index-var return) &body body &environment env)
71.2.1.1.2 Description
Iterate on array that is a kind of simple-array. e.g. (defun distance-to-origin (x) (declare (type dvec x)
#+allegro (:faslmode :immediate)) (let ((result 0.0)) (declare (type (double-float 0.0) result)) (do-vec (ex x :type double-float) (incf result (* ex ex))) (sqrt result)))
71.2.1.2 Inherited Macro: do-vecs
71.2.1.2.1 Syntax
(do-vecs (&rest binding-clauses) &body body &environment env)
71.2.1.2.2 Description
Parallelly iterate on multiple vectors. Accept parameters in do-vec except :return. e.g. (defun euclid-distance (x y) (declare (type dvec x y)
#+allegro (:faslmode :immediate)) (assert (= (length x) (length y))) (let ((result 0.0)) (declare (type (double-float 0.0) result)) (do-vecs ((ex x :type double-float) (ey y :type double-float)) (let ((diff (- ex ey))) (incf result (* diff diff)))) (sqrt result)))
71.2.1.3 Inherited Macro: par-do-vec
71.2.1.3.1 Syntax
(par-do-vec (var vector &key (type t) (start 0) end setf-var index-var return) &body body)
71.2.1.3.2 Description
71.2.2 External Functions
71.2.2.1 Inherited Function: copy-vec
71.2.2.1.1 Syntax
(copy-vec vec &optional target)
71.2.2.1.2 Description
71.2.2.2 Inherited Function: cosine-distance
71.2.2.2.1 Syntax
(cosine-distance)
71.2.2.2.2 Description
71.2.2.3 Inherited Function: distance-to-origin
71.2.2.3.1 Syntax
(distance-to-origin x)
71.2.2.3.2 Description
71.2.2.4 Inherited Function: euclid-distance
71.2.2.4.1 Syntax
(euclid-distance x y)
71.2.2.4.2 Description
71.2.2.5 Inherited Function: fill-vec
71.2.2.5.1 Syntax
(fill-vec vec default)
71.2.2.5.2 Description
71.2.2.6 Inherited Function: hausdorff-distance
71.2.2.6.1 Syntax
(hausdorff-distance xpts ypts &key (norm #'euclid-distance))
71.2.2.6.2 Description
71.2.2.7 Inherited Function: inner-product
71.2.2.7.1 Syntax
(inner-product x y)
71.2.2.7.2 Description
71.2.2.8 Inherited Function: inner-product-unsafe
71.2.2.8.1 Syntax
(inner-product-unsafe x y)
71.2.2.8.2 Description
71.2.2.9 Inherited Function: make-dvec
71.2.2.9.1 Syntax
(make-dvec size &optional initial-element)
71.2.2.9.2 Description
71.2.2.10 Inherited Function: make-dvec
71.2.2.10.1 Syntax
(make-dvec size &optional initial-element)
71.2.2.10.2 Description
71.2.2.11 Inherited Function: manhattan-distance
71.2.2.11.1 Syntax
(manhattan-distance)
71.2.2.11.2 Description
71.2.2.12 Inherited Function: mean-points
71.2.2.12.1 Syntax
(mean-points points &optional result)
71.2.2.12.2 Description
71.2.2.13 Inherited Function: normalize-vec
71.2.2.13.1 Syntax
(normalize-vec vec result)
71.2.2.13.2 Description
71.2.2.14 Inherited Function: reorder-dvec
71.2.2.14.1 Syntax
(reorder-dvec vector indices &optional (result (copy-seq vector)))
71.2.2.14.2 Description
71.2.2.15 Inherited Function: reorder-vec
71.2.2.15.1 Syntax
(reorder-vec vector indices &optional (result (copy-seq vector)))
71.2.2.15.2 Description
71.2.2.16 Inherited Function: specialize-vec
71.2.2.16.1 Syntax
(specialize-vec vector &key check)
71.2.2.16.2 Description
71.2.2.17 Inherited Function: v+
71.2.2.17.1 Syntax
(v+ x y result)
71.2.2.17.2 Description
71.2.2.18 Inherited Function: v-
71.2.2.18.1 Syntax
(v- x y result)
71.2.2.18.2 Description
71.2.2.19 Inherited Function: v-scale
71.2.2.19.1 Syntax
(v-scale vec n result)
71.2.2.19.2 Description
72 Package: lapack
- Uses: blas, common-lisp
- Used by: clml.clustering.nmf, hjs.util.eigensystems, hjs.util.matrix
72.1 Description
72.2 External Symbols
72.2.1 External Functions
72.2.1.1 Function: dbdsdc
72.2.1.1.1 Syntax
(dbdsdc uplo compq n d e u ldu vt ldvt q iq work iwork info)
72.2.1.1.2 Description
72.2.1.2 Function: dbdsqr
72.2.1.2.1 Syntax
(dbdsqr uplo n ncvt nru ncc d e vt ldvt u ldu c ldc work info)
72.2.1.2.2 Description
72.2.1.3 Function: ddisna
72.2.1.3.1 Syntax
(ddisna job m n d sep info)
72.2.1.3.2 Description
72.2.1.4 Function: dgebak
72.2.1.4.1 Syntax
(dgebak job side n ilo ihi scale m v ldv info)
72.2.1.4.2 Description
72.2.1.5 Function: dgebal
72.2.1.5.1 Syntax
(dgebal job n a lda ilo ihi scale info)
72.2.1.5.2 Description
72.2.1.6 Function: dgebd2
72.2.1.6.1 Syntax
(dgebd2 m n a lda d e tauq taup work info)
72.2.1.6.2 Description
72.2.1.7 Function: dgebrd
72.2.1.7.1 Syntax
(dgebrd m n a lda d e tauq taup work lwork info)
72.2.1.7.2 Description
72.2.1.8 Function: dgeev
72.2.1.8.1 Syntax
(dgeev jobvl jobvr n a lda wr wi vl ldvl vr ldvr work lwork info)
72.2.1.8.2 Description
72.2.1.9 Function: dgeevx
72.2.1.9.1 Syntax
(dgeevx balanc jobvl jobvr sense n a lda wr wi vl ldvl vr ldvr ilo ihi scale abnrm rconde rcondv work lwork iwork info)
72.2.1.9.2 Description
72.2.1.10 Function: dgehd2
72.2.1.10.1 Syntax
(dgehd2 n ilo ihi a lda tau work info)
72.2.1.10.2 Description
72.2.1.11 Function: dgehrd
72.2.1.11.1 Syntax
(dgehrd n ilo ihi a lda tau work lwork info)
72.2.1.11.2 Description
72.2.1.12 Function: dgelq2
72.2.1.12.1 Syntax
(dgelq2 m n a lda tau work info)
72.2.1.12.2 Description
72.2.1.13 Function: dgelqf
72.2.1.13.1 Syntax
(dgelqf m n a lda tau work lwork info)
72.2.1.13.2 Description
72.2.1.14 Function: dgeqr2
72.2.1.14.1 Syntax
(dgeqr2 m n a lda tau work info)
72.2.1.14.2 Description
72.2.1.15 Function: dgeqrf
72.2.1.15.1 Syntax
(dgeqrf m n a lda tau work lwork info)
72.2.1.15.2 Description
72.2.1.16 Function: dgesdd
72.2.1.16.1 Syntax
(dgesdd jobz m n a lda s u ldu vt ldvt work lwork iwork info)
72.2.1.16.2 Description
72.2.1.17 Function: dgesv
72.2.1.17.1 Syntax
(dgesv n nrhs a lda ipiv b ldb$ info)
72.2.1.17.2 Description
72.2.1.18 Function: dgesvd
72.2.1.18.1 Syntax
(dgesvd jobu jobvt m n a lda s u ldu vt ldvt work lwork info)
72.2.1.18.2 Description
72.2.1.19 Function: dgetf2
72.2.1.19.1 Syntax
(dgetf2 m n a lda ipiv info)
72.2.1.19.2 Description
72.2.1.20 Function: dgetrf
72.2.1.20.1 Syntax
(dgetrf m n a lda ipiv info)
72.2.1.20.2 Description
72.2.1.21 Function: dgetri
72.2.1.21.1 Syntax
(dgetri n a lda ipiv work lwork info)
72.2.1.21.2 Description
72.2.1.22 Function: dgetrs
72.2.1.22.1 Syntax
(dgetrs trans n nrhs a lda ipiv b ldb$ info)
72.2.1.22.2 Description
72.2.1.23 Function: dhseqr
72.2.1.23.1 Syntax
(dhseqr job compz n ilo ihi h ldh wr wi z ldz work lwork info)
72.2.1.23.2 Description
72.2.1.24 Function: dlabad
72.2.1.24.1 Syntax
(dlabad small large)
72.2.1.24.2 Description
72.2.1.25 Function: dlabrd
72.2.1.25.1 Syntax
(dlabrd m n nb a lda d e tauq taup x ldx y ldy)
72.2.1.25.2 Description
72.2.1.26 Function: dlacon
72.2.1.26.1 Syntax
(dlacon n v x isgn est kase)
72.2.1.26.2 Description
72.2.1.27 Function: dlacpy
72.2.1.27.1 Syntax
(dlacpy uplo m n a lda b ldb$)
72.2.1.27.2 Description
72.2.1.28 Function: dladiv
72.2.1.28.1 Syntax
(dladiv a b c d p q)
72.2.1.28.2 Description
72.2.1.29 Function: dlaed6
72.2.1.29.1 Syntax
(dlaed6 kniter orgati rho d z finit tau info)
72.2.1.29.2 Description
72.2.1.30 Function: dlaexc
72.2.1.30.1 Syntax
(dlaexc wantq n t$ ldt q ldq j1 n1 n2 work info)
72.2.1.30.2 Description
72.2.1.31 Function: dlahqr
72.2.1.31.1 Syntax
(dlahqr wantt wantz n ilo ihi h ldh wr wi iloz ihiz z ldz info)
72.2.1.31.2 Description
72.2.1.32 Function: dlahrd
72.2.1.32.1 Syntax
(dlahrd n k nb a lda tau t$ ldt y ldy)
72.2.1.32.2 Description
72.2.1.33 Function: dlaln2
72.2.1.33.1 Syntax
(dlaln2 ltrans na nw smin ca a lda d1 d2 b ldb$ wr wi x ldx scale xnorm info)
72.2.1.33.2 Description
72.2.1.34 Function: dlamc1
72.2.1.34.1 Syntax
(dlamc1 beta t$ rnd ieee1)
72.2.1.34.2 Description
72.2.1.35 Function: dlamc2
72.2.1.35.1 Syntax
(dlamc2 beta t$ rnd eps emin rmin emax rmax)
72.2.1.35.2 Description
72.2.1.36 Function: dlamc3
72.2.1.36.1 Syntax
(dlamc3 a b)
72.2.1.36.2 Description
72.2.1.37 Function: dlamc4
72.2.1.37.1 Syntax
(dlamc4 emin start base)
72.2.1.37.2 Description
72.2.1.38 Function: dlamc5
72.2.1.38.1 Syntax
(dlamc5 beta p emin ieee emax rmax)
72.2.1.38.2 Description
72.2.1.39 Function: dlamch
72.2.1.39.1 Syntax
(dlamch cmach)
72.2.1.39.2 Description
72.2.1.40 Function: dlamrg
72.2.1.40.1 Syntax
(dlamrg n1 n2 a dtrd1 dtrd2 indx)
72.2.1.40.2 Description
72.2.1.41 Function: dlange
72.2.1.41.1 Syntax
(dlange norm m n a lda work)
72.2.1.41.2 Description
72.2.1.42 Function: dlanhs
72.2.1.42.1 Syntax
(dlanhs norm n a lda work)
72.2.1.42.2 Description
72.2.1.43 Function: dlanst
72.2.1.43.1 Syntax
(dlanst norm n d e)
72.2.1.43.2 Description
72.2.1.44 Function: dlanv2
72.2.1.44.1 Syntax
(dlanv2 a b c d rt1r rt1i rt2r rt2i cs sn)
72.2.1.44.2 Description
72.2.1.45 Function: dlapy2
72.2.1.45.1 Syntax
(dlapy2 x y)
72.2.1.45.2 Description
72.2.1.46 Function: dlaqtr
72.2.1.46.1 Syntax
(dlaqtr ltran lreal n t$ ldt b w scale x work info)
72.2.1.46.2 Description
72.2.1.47 Function: dlarf
72.2.1.47.1 Syntax
(dlarf side m n v incv tau c ldc work)
72.2.1.47.2 Description
72.2.1.48 Function: dlarfb
72.2.1.48.1 Syntax
(dlarfb side trans direct storev m n k v ldv t$ ldt c ldc work ldwork)
72.2.1.48.2 Description
72.2.1.49 Function: dlarfg
72.2.1.49.1 Syntax
(dlarfg n alpha x incx tau)
72.2.1.49.2 Description
72.2.1.50 Function: dlarft
72.2.1.50.1 Syntax
(dlarft direct storev n k v ldv tau t$ ldt)
72.2.1.50.2 Description
72.2.1.51 Function: dlarfx
72.2.1.51.1 Syntax
(dlarfx side m n v tau c ldc work)
72.2.1.51.2 Description
72.2.1.52 Function: dlartg
72.2.1.52.1 Syntax
(dlartg f g cs sn r)
72.2.1.52.2 Description
72.2.1.53 Function: dlas2
72.2.1.53.1 Syntax
(dlas2 f g h ssmin ssmax)
72.2.1.53.2 Description
72.2.1.54 Function: dlascl
72.2.1.54.1 Syntax
(dlascl type kl ku cfrom cto m n a lda info)
72.2.1.54.2 Description
72.2.1.55 Function: dlasd0
72.2.1.55.1 Syntax
(dlasd0 n sqre d e u ldu vt ldvt smlsiz iwork work info)
72.2.1.55.2 Description
72.2.1.56 Function: dlasd1
72.2.1.56.1 Syntax
(dlasd1 nl nr sqre d alpha beta u ldu vt ldvt idxq iwork work info)
72.2.1.56.2 Description
72.2.1.57 Function: dlasd2
72.2.1.57.1 Syntax
(dlasd2 nl nr sqre k d z alpha beta u ldu vt ldvt dsigma u2 ldu2 vt2 ldvt2 idxp idx idxc idxq coltyp info)
72.2.1.57.2 Description
72.2.1.58 Function: dlasd3
72.2.1.58.1 Syntax
(dlasd3 nl nr sqre k d q ldq dsigma u ldu u2 ldu2 vt ldvt vt2 ldvt2 idxc ctot z info)
72.2.1.58.2 Description
72.2.1.59 Function: dlasd4
72.2.1.59.1 Syntax
(dlasd4 n i d z delta rho sigma work info)
72.2.1.59.2 Description
72.2.1.60 Function: dlasd5
72.2.1.60.1 Syntax
(dlasd5 i d z delta rho dsigma work)
72.2.1.60.2 Description
72.2.1.61 Function: dlasd6
72.2.1.61.1 Syntax
(dlasd6 icompq nl nr sqre d vf vl alpha beta idxq perm givptr givcol ldgcol givnum ldgnum poles difl difr z k c s work iwork info)
72.2.1.61.2 Description
72.2.1.62 Function: dlasd7
72.2.1.62.1 Syntax
(dlasd7 icompq nl nr sqre k d z zw vf vfw vl vlw alpha beta dsigma idx idxp idxq perm givptr givcol ldgcol givnum ldgnum c s info)
72.2.1.62.2 Description
72.2.1.63 Function: dlasd8
72.2.1.63.1 Syntax
(dlasd8 icompq k d z vf vl difl difr lddifr dsigma work info)
72.2.1.63.2 Description
72.2.1.64 Function: dlasda
72.2.1.64.1 Syntax
(dlasda icompq smlsiz n sqre d e u ldu vt k difl difr z poles givptr givcol ldgcol perm givnum c s work iwork info)
72.2.1.64.2 Description
72.2.1.65 Function: dlasdq
72.2.1.65.1 Syntax
(dlasdq uplo sqre n ncvt nru ncc d e vt ldvt u ldu c ldc work info)
72.2.1.65.2 Description
72.2.1.66 Function: dlasdt
72.2.1.66.1 Syntax
(dlasdt n lvl nd inode ndiml ndimr msub)
72.2.1.66.2 Description
72.2.1.67 Function: dlaset
72.2.1.67.1 Syntax
(dlaset uplo m n alpha beta a lda)
72.2.1.67.2 Description
72.2.1.68 Function: dlasq1
72.2.1.68.1 Syntax
(dlasq1 n d e work info)
72.2.1.68.2 Description
72.2.1.69 Function: dlasq2
72.2.1.69.1 Syntax
(dlasq2 n z info)
72.2.1.69.2 Description
72.2.1.70 Function: dlasq3
72.2.1.70.1 Syntax
(dlasq3 i0 n0 z pp dmin sigma desig qmax nfail iter ndiv ieee)
72.2.1.70.2 Description
72.2.1.71 Function: dlasq4
72.2.1.71.1 Syntax
(dlasq4 i0 n0 z pp n0in dmin dmin1$ dmin2 dn dn1 dn2 tau ttype)
72.2.1.71.2 Description
72.2.1.72 Function: dlasq5
72.2.1.72.1 Syntax
(dlasq5 i0 n0 z pp tau dmin dmin1$ dmin2 dn dnm1 dnm2 ieee)
72.2.1.72.2 Description
72.2.1.73 Function: dlasq6
72.2.1.73.1 Syntax
(dlasq6 i0 n0 z pp dmin dmin1$ dmin2 dn dnm1 dnm2)
72.2.1.73.2 Description
72.2.1.74 Function: dlasr
72.2.1.74.1 Syntax
(dlasr side pivot direct m n c s a lda)
72.2.1.74.2 Description
72.2.1.75 Function: dlasrt
72.2.1.75.1 Syntax
(dlasrt id n d info)
72.2.1.75.2 Description
72.2.1.76 Function: dlassq
72.2.1.76.1 Syntax
(dlassq n x incx scale sumsq)
72.2.1.76.2 Description
72.2.1.77 Function: dlasv2
72.2.1.77.1 Syntax
(dlasv2 f g h ssmin ssmax snr csr snl csl)
72.2.1.77.2 Description
72.2.1.78 Function: dlaswp
72.2.1.78.1 Syntax
(dlaswp n a lda k1 k2 ipiv incx)
72.2.1.78.2 Description
72.2.1.79 Function: dlasy2
72.2.1.79.1 Syntax
(dlasy2 ltranl ltranr isgn n1 n2 tl ldtl tr ldtr b ldb$ scale x ldx xnorm info)
72.2.1.79.2 Description
72.2.1.80 Function: dorg2r
72.2.1.80.1 Syntax
(dorg2r m n k a lda tau work info)
72.2.1.80.2 Description
72.2.1.81 Function: dorgbr
72.2.1.81.1 Syntax
(dorgbr vect m n k a lda tau work lwork info)
72.2.1.81.2 Description
72.2.1.82 Function: dorghr
72.2.1.82.1 Syntax
(dorghr n ilo ihi a lda tau work lwork info)
72.2.1.82.2 Description
72.2.1.83 Function: dorgl2
72.2.1.83.1 Syntax
(dorgl2 m n k a lda tau work info)
72.2.1.83.2 Description
72.2.1.84 Function: dorglq
72.2.1.84.1 Syntax
(dorglq m n k a lda tau work lwork info)
72.2.1.84.2 Description
72.2.1.85 Function: dorgqr
72.2.1.85.1 Syntax
(dorgqr m n k a lda tau work lwork info)
72.2.1.85.2 Description
72.2.1.86 Function: dorm2r
72.2.1.86.1 Syntax
(dorm2r side trans m n k a lda tau c ldc work info)
72.2.1.86.2 Description
72.2.1.87 Function: dormbr
72.2.1.87.1 Syntax
(dormbr vect side trans m n k a lda tau c ldc work lwork info)
72.2.1.87.2 Description
72.2.1.88 Function: dorml2
72.2.1.88.1 Syntax
(dorml2 side trans m n k a lda tau c ldc work info)
72.2.1.88.2 Description
72.2.1.89 Function: dormlq
72.2.1.89.1 Syntax
(dormlq side trans m n k a lda tau c ldc work lwork info)
72.2.1.89.2 Description
72.2.1.90 Function: dormqr
72.2.1.90.1 Syntax
(dormqr side trans m n k a lda tau c ldc work lwork info)
72.2.1.90.2 Description
72.2.1.91 Function: dtrevc
72.2.1.91.1 Syntax
(dtrevc side howmny select n t$ ldt vl ldvl vr ldvr mm m work info)
72.2.1.91.2 Description
72.2.1.92 Function: dtrexc
72.2.1.92.1 Syntax
(dtrexc compq n t$ ldt q ldq ifst ilst work info)
72.2.1.92.2 Description
72.2.1.93 Function: dtrsna
72.2.1.93.1 Syntax
(dtrsna job howmny select n t$ ldt vl ldvl vr ldvr s sep mm m work ldwork iwork info)
72.2.1.93.2 Description
72.2.1.94 Function: dtrti2
72.2.1.94.1 Syntax
(dtrti2 uplo diag n a lda info)
72.2.1.94.2 Description
72.2.1.95 Function: dtrtri
72.2.1.95.1 Syntax
(dtrtri uplo diag n a lda info)
72.2.1.95.2 Description
72.2.1.96 Function: ieeeck
72.2.1.96.1 Syntax
(ieeeck ispec zero one)
72.2.1.96.2 Description
72.2.1.97 Function: ilaenv
72.2.1.97.1 Syntax
(ilaenv ispec name opts n1 n2 n3 n4)
72.2.1.97.2 Description
72.3 clml.statistics Statistics
72.4 Requirements
The package does not depend on any libraries (yet). Any ANSI-compliant Common Lisp should be enough. However, to load it easily, you need the ASDF package (http://www.cliki.net/asdf).
72.5 Usage
72.5.1 One-valued data
There is a range of functions that operate on a sequence of data.
72.5.1.1 mean (seq)
Returns the mean of SEQ.
72.5.1.2 median (seq)
Returns the median of SEQ. (Variant: median-on-sorted (sorted-seq))
72.5.1.3 discrete-quantile (seq cuts)
Returns the quantile(s) of SEQ at the given cut point(s). CUTS can be a single value or a list. (Variant: discrete-quantile-on-sorted (sorted-seq cuts))
72.5.1.4 five-number-summary (seq)
Returns the "five number summary" of SEQ, ie. the discrete quantiles at the cut points 0, 1/4, 1/2, 3/4 and 1. (Variant: five-number-summary-on-sorted (sorted-seq))
72.5.1.5 range (seq)
Returns the difference of the maximal and minimal element of SEQ.
72.5.1.6 interquartile-range (seq)
Returns the interquartile range of SEQ, ie. the difference of the discrete quantiles at 3/4 and 1/4. (Variant: interquartile-range-on-sorted (sorted-seq))
72.5.1.7 mean-deviation (seq)
Returns the mean deviation of SEQ.
72.5.1.8 variance (seq)
Returns the variance of SEQ.
72.5.1.9 standard-deviation (seq &key populationp)
Returns the standard deviation of SEQ. If populationp is true, the returned value is the population standard deviation. Otherwise, it is the sample standard deviation.
72.5.2 Two-valued data
These functions operate on two sequences.
72.5.2.1 covariance (seq1 seq2)
Returns the covariance of SEQ1 and SEQ2.
72.5.2.2 linear-regression (seq1 seq2)
Fits a line y = A + Bx on the data points from SEQ1 x SEQ2. Returns (A B).
72.5.2.3 correlation-coefficient (seq1 seq2)
Returns the correlation coefficient of SEQ1 and SEQ2, ie. covariance / (standard-deviation1 * standard-deviation2).
72.5.2.4 spearman-rank-correlation (seq1 seq2)
Returns the Spearman rank correlation, ie. the coefficient based on just the relative size of the given values.
72.5.2.5 kendall-rank-correlation (seq1 seq2)
Returns the Kendall "tau" rank correlation coefficient.
72.5.3 Distributions
Distributions are CLOS objects, and they are created by the constructor of the same name. The objects support the methods CDF (cumulative distribution function), DENSITY (MASS for discrete distributions), QUANTILE, RAND (gives a random number according to the given distribution), RAND-N (convenience function that gives n random numbers), MEAN and VARIANCE (giving the distribution's mean and variance, respectively). These take the distribution as their first parameter.
Most distributions can also be created with an estimator constructor. The estimator function has the form <distribution>-ESTIMATE, unless noted.
The following distributions are supported:
72.5.3.1 beta-distribution
- Parameters: shape1 shape2
72.5.3.2 binomial-distribution
- Parameters: size, probability
72.5.3.3 cauchy-distribution
- Parameters: location, scale
72.5.3.4 chi-square-distribution
- Parameters: degree
- Estimators: [none]
72.5.3.5 exponential-distribution
- Parameters: hazard (or scale)
72.5.3.6 f-distribution
- Parameters: degree1 degree2
- Estimators: [none]
72.5.3.7 gamma-distribution
- Parameters: scale, shape
- (Variant: erlang-distribution [shape is an integer])
- Numerical calculation:
If there is a numerical problem with QUANTILE, QUANTILE-ILI would be solve it.
ILI is abbreviation of the numerical calculation method of Inverse-Linear-Interpolation.
However this is slower than Newton-Raphson(for QUANTILE).
72.5.3.8 geometric-distribution
- Parameters: probability
- (Supported on k = 1, 2, … (the # of trials until a success, inclusive))
72.5.3.9 hypergeometric-distribution
- Parameters: elements, successes, samples
- Estimators: hypergeometric-distribution-estimate-successes-unbiased, hypergeometric-distribution-estimate-successes-maximum-likelihood, hypergeometric-distribution-estimate-elements
72.5.3.10 logistic-distribution
- Parameters: location, scale
72.5.3.11 log-normal-distribution
- Parameters: expected-value, deviation
- Estimators: log-normal-distribution-estimate-unbiased, log-normal-distribution-estimate-maximum-likelihood
72.5.3.12 negative-binomial-distribution
- Parameters: successes, probability, failuresp
- Estimators: negative-binomial-distribution-estimate-unbiased, negative-binomial-distribution-estimate-maximum-likelihood
- When failuresp is NIL, the distribution is supported on k = s, s+1, … (the # of trials until a given number of successes, inclusive))
- When failuresp is T (the default), it is supported on k = 0, 1, … (the # of failures until a given number of successes, inclusive)
- Estimators also have the failuresp parameter
- (Variant: geometric-distribution [successes = 1, failuresp = nil])
72.5.3.13 normal-distribution
- Parameters: expected-value, deviation
- Estimators: normal-distribution-estimate-unbiased, normal-distribution-estimate-maximum-likelihood
- (Variant: standard-normal-distribution)
72.5.3.14 poisson-distribution
- Parameters: rate
72.5.3.15 t-distribution
- Parameters: degree
- Estimators: [none]
72.5.3.16 uniform-distribution
- Parameters: from, to
- Estimators: uniform-distribution-estimate-moments, uniform-distribution-estimate-maximum-likelihood
- (Variant: standard-uniform-distribution)
72.5.3.17 weibull-distribution
- Parameters: scale, shape
72.5.4 Distribution tests
72.5.4.1 normal-dist-test
- Input: frequation sequence, infimum of the first class, class width, precision
- Output( 3 values of property-list )
- result (:TOTAL total-frequency :MEAN mean :VARIANCE variance :SD standard-deviation)
- table (:MID mid-value-of-each-class :FREQ frequency-of-each-class :Z standard-score :CDF cummulative-distribution-frequency :EXPECTATION expectation)
- result2 (:CHI-SQ Chi-square-statistics :D.F. Degree-of-freedom :P-VALUE p-value)
72.5.4.2 poisson-dist-test
- Input: sequence of frequency
- Output( 3 values of p-list )
- result (:N total-frequency :MEAN mean)
- table (:C-ID assumed-class-value :FREQ frequency :P probability :E expectation)
- result2 (:CHI-SQ Chi-square-statistics :D.F. Degree-of-freedom :P-VALUE p-value)
72.5.4.3 binom-dist-test
- Input: sequence of frequency, sequence of class-value, size of Bernoulli trials
- Output( 3 values of p-list )
- result (:D-SIZE total-frequency :PROBABILITY population-rate)
- table (:FREQ frequency :P probability :E expectation)
- result2 (:CHI-SQ Chi-square-statistics :D.F. Degree-of-freedom :P-VALUE p-value)
72.5.5 Outlier verification
72.5.5.1 smirnov-grubbs (seq alpha &key (type :max) (recursive nil))
Smirnov-Grubbs method for outlier verification.
- return: nil | sequence
- arguments:
- seq : <sequence of number>
- alpha : <number> , significance level
- type : :min | :max, which side of outlier value
- recursive : nil | t
- reference: http://aoki2.si.gunma-u.ac.jp/lecture/Grubbs/Grubbs.html
72.5.6 Sample listener log
72.5.6.1 Loading without ASDF
(assuming you are in the directory where the library resides) CL-USER> (load "package") T CL-USER> (load "utilities") T CL-USER> (load "math") T CL-USER> (load "statistics") T CL-USER> (load "distribution-test") T CL-USER> (in-package :statistics) #STAT>
72.5.6.2 Loading with ASDF
(assuming that the path to statistics.asd is in ASDF:*CENTRAL-REGISTRY*) CL-USER> (asdf:operate 'asdf:load-op 'statistics) ; loading system definition from ~/.sbcl/systems/statistics.asd ; into #; registering # as STATISTICS NIL CL-USER> (in-package :statistics) # STAT>
72.5.6.3 Simple usage (examples taken from "Lisp-Statによる統計解析入門" by 垂水共之)
72.5.6.3.1 One-valued data
STAT> (defparameter height '(148 160 159 153 151 140 156 137 149 160 151 157 157 144)) HEIGHT STAT> (mean height) 1061/7 STAT> (+ (mean height) 0.0d0) 151.57142857142858d0 STAT> (median height) 152 STAT> (five-number-summary height) (137 297/2 152 157 160) STAT> (mapcar (lambda (x) (discrete-quantile height x)) '(0 1/4 1/2 3/4 1)) (137 297/2 152 157 160) STAT> (interquartile-range height) 17/2 STAT> (+ (mean-deviation height) 0.0d0) 5.857142857142857d0 STAT> (+ (variance height) 0.0d0) 50.10204081632653d0 STAT> (standard-deviation height) 7.345477789500419d0 STAT>
72.5.6.3.2 Two-valued data
STAT> (defparameter weight '(41 49 45 43 42 29 49 31 47 47 42 39 48 36)) WEIGHT STAT> (linear-regression height weight) (-70.15050916496945d0 0.7399185336048879d0) STAT> (+ (covariance height weight) 0.0d0) 39.92307692307692d0 STAT> (correlation-coefficient height weight) 0.851211920646571d0 STAT> (defparameter baseball-teams '((3 2 1 5 4 6) (2 6 3 5 1 4)) "Six baseball teams are ranked by two people in order of liking.") BASEBALL-TEAMS STAT> (+ (apply #'spearman-rank-correlation baseball-teams) 0.0d0) 0.02857142857142857d0 STAT> (+ (apply #'kendall-rank-correlation baseball-teams) 0.0d0) -0.06666666666666667d0 STAT>
72.5.6.3.3 Distributions
STAT> (quantile (standard-normal-distribution) 0.025d0) -1.9599639551896222d0 STAT> (density (standard-uniform-distribution) 1.5d0) 0 STAT> (cdf (standard-uniform-distribution) 0.3d0) 0.3d0 STAT> (defparameter normal-random (rand-n (standard-normal-distribution) 1000)) NORMAL-RANDOM STAT> (five-number-summary normal-random) (-3.048454339464769d0 -0.6562483981626692d0 -0.0378855048937908d0 0.6292440569288786d0 3.3461196116924925d0) STAT> (mean normal-random) -0.003980893528421081d0 STAT> (standard-deviation normal-random) 0.9586638291006542d0 STAT> (quantile (t-distribution 5) 0.05d0) -2.0150483733330242d0 STAT> (density (t-distribution 10) 1.0d0) 0.23036198922913856d0 STAT> (defparameter chi-random (rand-n (chi-square-distribution 10) 1000)) CHI-RANDOM STAT> (mean chi-random) 10.035727383909936d0 STAT> (standard-deviation chi-random) 4.540307733714504d0 STAT>
72.5.6.3.4 Distribution tests (examples taken from http://aoki2.si.gunma-u.ac.jp/R/)
STAT(6): (normal-dist-test '(4 19 86 177 105 33 2) 40 5 0.1) (:TOTAL 426 :MEAN 57.931225 :VARIANCE 26.352928 :SD 5.13351) (:MID (37.45 42.45 47.45 52.45 57.45 62.45 67.45 72.45 77.45) :FREQ (0 4 19 86 177 105 33 2 0) :Z (-3.5027153 -2.5287228 -1.5547304 -0.58073795 0.3932545 1.3672462 2.3412387 3.315231 4.2892237) :CDF (2.3027066827641107d-4 0.005493650023016494d0 0.0542812231219722d0 0.2207033969433026d0 0.3722256949242654d0 0.2612916822967053d0 0.07616414571442975d0 0.009152099332533692d0 4.578369754981715d-4) :EXPECTATION (0.09809530468575112d0 2.4383902144907776d0 23.123801049960157d0 94.01964709784691d0 158.56814603773705d0 111.31025665839645d0 32.44592607434708d0 4.093832867221574d0 0.19503855156222105d0)) (:CHI-SQ 6.000187256825313d0 :D.F. 4 :P-VALUE 0.19913428945535006d0) STAT(10): (poisson-dist-test '(27 61 77 71 54 35 20 11 6 2 1)) (:N 365 :MEAN 1092/365) (:C-ID (0 1 2 3 4 5 6 7 8 9 ...) :FREQ (27 61 77 71 54 35 20 11 6 2 ...) :P (0.050197963 0.1501813 0.22465476 0.22403927 0.1675691 0.100266 0.04999565 0.021368004 0.0079910485 0.002656385 ...) :E (18.322256 54.816174 81.998985 81.77434 61.162724 36.59709 18.248411 7.7993217 2.9167328 0.96958053 ...)) (:CHI-SQ 14.143778 :D.F. 8 :P-VALUE 0.07809402061210624d0) STAT(16): (binom-dist-test '(2 14 20 34 22 8) '(0 1 2 3 4 5) 5) (binom-dist-test '(2 14 20 34 22 8) '(0 1 2 3 4 5) 5) (:SIZE 6 :PROBABILITY 0.568) (:FREQ (2 14 20 34 22 8) :P (0.015045918 0.098912984 0.26010454 0.3419893 0.22482634 0.059121) :E (1.5045917 9.891298 26.010454 34.198933 22.482634 5.9121003)) (:CHI-SQ 4.007576 :D.F. 4 :P-VALUE 0.4049815220790788d0)
72.5.6.3.5 Outlier verification
STAT(6): (defparameter *sample* '(133 134 134 134 135 135 139 140 140 140 141 142 142 144 144 147 147 149 150 164)) STAT(7): (smirnov-grubbs *sample* 0.05 :type :max) Data: MAX = 164.000 t= 3.005, p-value = 2.557, df = 18 STAT(8): (smirnov-grubbs *sample* 0.05 :type :min) Data: MIN = 133.000 t= 1.172, p-value = 2.557, df = 18 STAT(11): (smirnov-grubbs *sample* 0.05 :type :max :recursive t) (133 134 134 134 135 135 139 140 140 140 ...) STAT(12): (set-difference *sample* *) (164)
72.6 Notes
- Numbers are not converted to (double) floats, for better accuracy with whole number data. This should be OK, since double data will generate double results (the number type is preserved).
- Places marked with TODO are not optimal or not finished (see the TODO file for more details).
73 Licensing
CLML is licensed under the terms of the Lisp Lesser GNU Public License, known as the LLGPL and distributed with CLML as the file "LICENSE". The LLGPL consists of a preamble and the LGPL, which is distributed with CLML as the file "LGPL". Where these conflict, the preamble takes precedence.
The LGPL is also available online at: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
The LLGPL is also available online at: http://opensource.franz.com/preamble.html
74 Supported CL implementations
This library supports ANSI Common Lisp. That said there are differences among implementations. SBCL and Allegro Lisp and Lisp Works should be the best supported. Currently Clozure Common Lisp is having issues with certain BLAS functionality so some portions may not work under that implementation.
Current development is taking place under Linux, that said this library should function under Windows and OSX.