CLML Common Lisp Machine Learning

Table of Contents

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 **
  1. Place code in ~/quicklisp/local-projects
  2. Start LISP and enter (ql:quickload :clml)
2.2.2.2 For ASDF3 only (Non quicklisp users)
  1. Place in a location on your ASDF search path path such as ~/common-lisp
  2. 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.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
16.2.1.1.2.0.1 sample usage
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
16.2.1.2.2.0.1 sample usage
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
16.2.1.3.2.0.1 sample usage
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)
16.2.1.4.2.0.1 sample usage
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.
16.2.1.5.2.0.1 sample usage
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).
16.2.1.6.2.0.1 sample usage
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
16.2.1.7.2.0.1 sample usage
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).
16.2.1.8.2.0.1 sample usage
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
16.2.1.9.2.0.1 sample usage
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>
17.2.1.2.2.0.1 sample usage
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:

  1. An eigen computation failed, or
  2. returned eigen values could not halve a cluster.
19.2.2.1.2.0.1 sample usage
 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"))
19.2.2.1.2.0.2 References:
  1. 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).
20.2.1.2.2.0.1 sample usage
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
20.2.1.13.2.0.1 sample usage
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
20.2.1.14.2.0.1 sample usage
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
20.2.1.17.2.0.1 sample usage
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

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
26.2.1.1.3.1 Slot: links
  • Value type: t
  • Initial value: NIL
  • Initargs: links
  • Allocation: instance
26.2.1.1.3.1.1 Accessors

26.2.1.1.3.1.1.1 Slot Accessor: links
26.2.1.1.3.1.1.1.1 Syntax
(links object)
26.2.1.1.3.1.1.1.2 Methods
  • (links (simple-graph clml.graph.read graph:simple-graph))
26.2.1.1.3.2 Slot: link-hashtab
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE :TEST #'EQUAL)
  • Initargs: none
  • Allocation: instance
26.2.1.1.3.2.1 Accessors

26.2.1.1.3.2.1.1 Slot Accessor: link-hashtab
26.2.1.1.3.2.1.1.1 Syntax
(link-hashtab object)
26.2.1.1.3.2.1.1.2 Methods
  • (link-hashtab (simple-graph clml.graph.read-graph:simple-graph))
26.2.1.1.3.3 Slot: directed-p
  • Value type: t
  • Initial value: NIL
  • Initargs: directed-p
  • Allocation: instance
26.2.1.1.3.3.1 Accessors

26.2.1.1.3.3.1.1 Slot Accessor: directed-p
26.2.1.1.3.3.1.1.1 Syntax
(directed-p object)
26.2.1.1.3.3.1.1.2 Methods
  • (directed-p (simple-graph clml.graph.read-graph:simple-graph))
26.2.1.1.4 Indirect Slots
26.2.1.1.4.1 Slot: node-hashtab
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE :TEST #'EQL)
  • Initargs: none
  • Allocation: instance
26.2.1.1.4.2 Slot: 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
26.2.1.2.3.1 Slot: graphs
  • Value type: t
  • Initial value: NIL
  • Initargs: graphs
  • Allocation: instance
26.2.1.2.3.1.1 Accessors

26.2.1.2.3.1.1.1 Slot Accessor: graphs
26.2.1.2.3.1.1.1.1 Syntax
(graphs object)
26.2.1.2.3.1.1.1.2 Methods
  • (graphs (simple-graph-series clml.graph.read-graph:simple-graph-series))
26.2.1.2.3.2 Slot: graph-labels
  • Value type: t
  • Initial value: NIL
  • Initargs: graph-labels
  • Allocation: instance
26.2.1.2.3.2.1 Accessors

26.2.1.2.3.2.1.1 Slot Accessor: graph-labels
26.2.1.2.3.2.1.1.1 Syntax
(graph-labels object)
26.2.1.2.3.2.1.1.2 Methods
  • (graph-labels (simple-graph-series clml.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
26.2.2.1.2.1 Internal Slot: weight
  • Value type: double-float
  • Initial value: 1.0
  • Initargs: none
  • Allocation: instance
26.2.2.1.2.2 Slot: node1
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
26.2.2.1.2.3 Slot: node2
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
26.2.2.1.2.4 Slot: 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
26.2.2.2.2.1 Inherited Slot: id
  • Value type: fixnum
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
26.2.2.2.2.2 Internal Slot: name
  • Value type: string
  • Initial value: =""=
  • Initargs: none
  • Allocation: instance
26.2.2.2.2.3 Slot: links
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
26.2.2.2.2.4 Slot: 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.
26.2.4.8.2.0.1 sample usage
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
30.2.1.1.4.1 Slot: candidates
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
  • Initargs: none
  • Allocation: instance
30.2.1.1.4.2 Slot: hash-fns
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.1.4.3 Slot: hash-bit
  • Value type: t
  • Initial value: NIL
  • Initargs: k
  • Allocation: instance
30.2.1.1.4.4 Slot: hash-length
  • Value type: t
  • Initial value: NIL
  • Initargs: l
  • Allocation: instance
30.2.1.1.4.5 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.1.4.6 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.1.4.7 Slot: 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
30.2.1.2.4.1 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: w
  • Allocation: instance
30.2.1.2.4.2 Slot: candidates
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
  • Initargs: none
  • Allocation: instance
30.2.1.2.4.3 Slot: hash-fns
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.2.4.4 Slot: hash-bit
  • Value type: t
  • Initial value: NIL
  • Initargs: k
  • Allocation: instance
30.2.1.2.4.5 Slot: hash-length
  • Value type: t
  • Initial value: NIL
  • Initargs: l
  • Allocation: instance
30.2.1.2.4.6 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.2.4.7 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.2.4.8 Slot: 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
30.2.1.3.4.1 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.3.4.2 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.3.4.3 Slot: 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
30.2.1.4.3.1 Slot: root-node
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.4.3.1.1 Accessors

30.2.1.4.3.1.1.1 Slot Accessor: root-node
30.2.1.4.3.1.1.1.1 Syntax
(root-node object)
30.2.1.4.3.1.1.1.2 Methods
  • (root-node (m-tree-search clml.nearest-search.nearest:m-tree-search))
  • (root-node (kd-tree-search clml.nearest-search.nearest:kd-tree-search))
30.2.1.4.3.2 Slot: compare-v
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.4.3.2.1 Accessors

30.2.1.4.3.2.1.1 Slot Accessor: compare-v
30.2.1.4.3.2.1.1.1 Syntax
(compare-v object)
30.2.1.4.3.2.1.1.2 Methods
  • (compare-v (kd-tree-search clml.nearest-search.nearest:kd-tree-search))
30.2.1.4.3.3 Slot: upper-bounds
  • Value type: t
  • Initial value: NIL
  • Initargs: upper-bounds
  • Allocation: instance
30.2.1.4.3.3.1 Accessors

30.2.1.4.3.3.1.1 Slot Accessor: upper-bounds
30.2.1.4.3.3.1.1.1 Syntax
(upper-bounds object)
30.2.1.4.3.3.1.1.2 Methods
  • (upper-bounds (kd-tree-search clml.nearest-search.nearest:kd-tree-search))
30.2.1.4.3.4 Slot: lower-bounds
  • Value type: t
  • Initial value: NIL
  • Initargs: lower-bounds
  • Allocation: instance
30.2.1.4.3.4.1 Accessors

30.2.1.4.3.4.1.1 Slot Accessor: lower-bounds
30.2.1.4.3.4.1.1.1 Syntax
(lower-bounds object)
30.2.1.4.3.4.1.1.2 Methods
  • (lower-bounds (kd-tree-search clml.nearest-search.nearest:kd-tree-search))
30.2.1.4.4 Indirect Slots
30.2.1.4.4.1 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.4.4.2 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.4.4.3 Slot: 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
30.2.1.5.3.1 Slot: hash-length
  • Value type: t
  • Initial value: NIL
  • Initargs: l
  • Allocation: instance
30.2.1.5.3.1.1 Accessors

30.2.1.5.3.1.1.1 Slot Accessor: hash-length
30.2.1.5.3.1.1.1.1 Syntax
(hash-length object)
30.2.1.5.3.1.1.1.2 Methods
  • (hash-length (locality-sensitive-hashing clml.nearest-search.nearest:locality-sensitive hashing))
30.2.1.5.3.2 Slot: hash-bit
  • Value type: t
  • Initial value: NIL
  • Initargs: k
  • Allocation: instance
30.2.1.5.3.2.1 Accessors

30.2.1.5.3.2.1.1 Slot Accessor: hash-bit
30.2.1.5.3.2.1.1.1 Syntax
(hash-bit object)
30.2.1.5.3.2.1.1.2 Methods
  • (hash-bit (locality-sensitive-hashing clml.nearest-search.nearest:locality-sensitive hashing))
30.2.1.5.3.3 Slot: hash-fns
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.5.3.3.1 Accessors

30.2.1.5.3.3.1.1 Slot Accessor: hash-fns
30.2.1.5.3.3.1.1.1 Syntax
(hash-fns object)
30.2.1.5.3.3.1.1.2 Methods
  • (hash-fns (locality-sensitive-hashing clml.nearest-search.nearest:locality-sensitive hashing))
30.2.1.5.3.4 Slot: candidates
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
  • Initargs: none
  • Allocation: instance
30.2.1.5.3.4.1 Accessors

30.2.1.5.3.4.1.1 Slot Accessor: candidates
30.2.1.5.3.4.1.1.1 Syntax
(candidates object)
30.2.1.5.3.4.1.1.2 Methods
  • (candidates (locality-sensitive-hashing clml.nearest-search.nearest:locality-sensitive hashing))
30.2.1.5.4 Indirect Slots
30.2.1.5.4.1 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.5.4.2 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.5.4.3 Slot: 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
30.2.1.6.3.1 Slot: root-node
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.6.3.1.1 Accessors

30.2.1.6.3.1.1.1 Slot Accessor: root-node
30.2.1.6.3.1.1.1.1 Syntax
(root-node object)
30.2.1.6.3.1.1.1.2 Methods
  • (root-node (m-tree-search clml.nearest-search.nearest:m-tree-search))
  • (root-node (kd-tree-search clml.nearest-search.nearest:kd-tree-search))
30.2.1.6.3.2 Internal Slot: m
  • Value type: t
  • Initial value: NIL
  • Initargs: m
  • Allocation: instance
30.2.1.6.3.2.1 Accessors

30.2.1.6.3.2.1.1 Slot Accessor: m-tree-size
30.2.1.6.3.2.1.1.1 Syntax
(m-tree-size object)
30.2.1.6.3.2.1.1.2 Methods
  • (m-tree-size (m-tree-search clml.nearest-search.nearest:m-tree-search))
30.2.1.6.3.3 Slot: pivot
  • Value type: t
  • Initial value: NIL
  • Initargs: pivot
  • Allocation: instance
30.2.1.6.3.4 Slot: priority-queue
  • Value type: t
  • Initial value: :BINOMIAL
  • Initargs: priority-queue
  • Allocation: instance
30.2.1.6.4 Indirect Slots
30.2.1.6.4.1 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.6.4.2 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.6.4.3 Slot: 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
30.2.1.7.4.1 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: w
  • Allocation: instance
30.2.1.7.4.2 Slot: candidates
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
  • Initargs: none
  • Allocation: instance
30.2.1.7.4.3 Slot: hash-fns
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.7.4.4 Slot: hash-bit
  • Value type: t
  • Initial value: NIL
  • Initargs: k
  • Allocation: instance
30.2.1.7.4.5 Slot: hash-length
  • Value type: t
  • Initial value: NIL
  • Initargs: l
  • Allocation: instance
30.2.1.7.4.6 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.7.4.7 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.7.4.8 Slot: 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
30.2.1.8.4.1 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.8.4.2 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.8.4.3 Slot: 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
30.2.1.9.3.1 Slot: input-data
  • Value type: t
  • Initial value: NIL
  • Initargs: input-data
  • Allocation: instance
30.2.1.9.3.1.1 Accessors

30.2.1.9.3.1.1.1 Slot Accessor: nns-input-data
30.2.1.9.3.1.1.1.1 Syntax
(nns-input-data object)
30.2.1.9.3.1.1.1.2 Methods
  • (nns-input-data (nearest-search clml.nearest-search.nearest:nearest-search))
30.2.1.9.3.2 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.9.3.2.1 Accessors

30.2.1.9.3.2.1.1 Slot Accessor: nns-input-key
30.2.1.9.3.2.1.1.1 Syntax
(nns-input-key object)
30.2.1.9.3.2.1.1.2 Methods
  • (nns-input-key (nearest-search clml.nearest-search.nearest:nearest-search))
30.2.1.9.3.3 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.9.3.3.1 Accessors

30.2.1.9.3.3.1.1 Slot Accessor: nns-distance
30.2.1.9.3.3.1.1.1 Syntax
(nns-distance object)
30.2.1.9.3.3.1.1.2 Methods
  • (nns-distance (nearest-search clml.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
30.2.1.10.3.1 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: w
  • Allocation: instance
30.2.1.10.3.1.1 Accessors

30.2.1.10.3.1.1.1 Slot Accessor: plsh-w
30.2.1.10.3.1.1.1.1 Syntax
(plsh-w object)
30.2.1.10.3.1.1.1.2 Methods
  • (plsh-w (p-stable-locality-sensitive-hashing clml.nearest-search.nearest:p-stable-locality sensitive-hashing))
30.2.1.10.4 Indirect Slots
30.2.1.10.4.1 Slot: candidates
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T)
  • Initargs: none
  • Allocation: instance
30.2.1.10.4.2 Slot: hash-fns
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
30.2.1.10.4.3 Slot: hash-bit
  • Value type: t
  • Initial value: NIL
  • Initargs: k
  • Allocation: instance
30.2.1.10.4.4 Slot: hash-length
  • Value type: t
  • Initial value: NIL
  • Initargs: l
  • Allocation: instance
30.2.1.10.4.5 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.10.4.6 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.10.4.7 Slot: 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
30.2.1.11.4.1 Internal Slot: distance
  • Value type: t
  • Initial value: #'EUCLID-DISTANCE
  • Initargs: distance
  • Allocation: instance
30.2.1.11.4.2 Slot: input-key
  • Value type: t
  • Initial value: #'IDENTITY
  • Initargs: input-key
  • Allocation: instance
30.2.1.11.4.3 Slot: 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
32.2.1.1.3.1 Slot: num
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
32.2.1.1.3.1.1 Accessors

32.2.1.1.3.1.1.1 Slot Accessor: cluster-size
32.2.1.1.3.1.1.1.1 Syntax
(cluster-size object)
32.2.1.1.3.1.1.1.2 Methods
  • (cluster-size (cluster clml.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
32.2.1.2.3.1 Slot: cluster-class
  • Value type: t
  • Initial value: ='CLML.NONPARAMETRIC.DPM:CLUSTER=
  • Initargs: none
  • Allocation: instance
32.2.1.2.3.1.1 Accessors

32.2.1.2.3.1.1.1 Slot Accessor: cluster-class
32.2.1.2.3.1.1.1.1 Syntax
(cluster-class object)
32.2.1.2.3.1.1.1.2 Methods
  • (cluster-class (dp-distribution clml.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
32.2.1.3.3.1 Slot: cluster-class
  • Value type: t
  • Initial value: ='CLML.NONPARAMETRIC.DPM:GAUSSIAN-CLUSTER=
  • Initargs: none
  • Allocation: instance
32.2.1.3.3.2 Slot: ave
  • Value type: t
  • Initial value: 0.0
  • Initargs: ave
  • Allocation: instance
32.2.1.3.3.2.1 Accessors

32.2.1.3.3.2.1.1 Slot Accessor: average-of-average
32.2.1.3.3.2.1.1.1 Syntax
(average-of-average object)
32.2.1.3.3.2.1.1.2 Methods
  • (average-of-average (dp-gaussian clml.nonparametric.dpm:dp-gaussian))
32.2.1.3.3.3 Internal Slot: std
  • Value type: t
  • Initial value: 1.0
  • Initargs: std
  • Allocation: instance
32.2.1.3.3.3.1 Accessors

32.2.1.3.3.3.1.1 Slot Accessor: std-of-average
32.2.1.3.3.3.1.1.1 Syntax
(std-of-average object)
32.2.1.3.3.3.1.1.2 Methods
  • (std-of-average (dp-gaussian clml.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
32.2.1.4.3.1 Slot: dpm-k
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
32.2.1.4.3.1.1 Accessors

32.2.1.4.3.1.1.1 Slot Accessor: dpm-k
32.2.1.4.3.1.1.1.1 Syntax
(dpm-k object)
32.2.1.4.3.1.1.1.2 Methods
  • (dpm-k (dpm clml.nonparametric.dpm:dpm))
32.2.1.4.3.2 Slot: base-distribution
  • Value type: t
  • Initial value: NIL
  • Initargs: base-distribution
  • Allocation: instance
32.2.1.4.3.2.1 Accessors

32.2.1.4.3.2.1.1 Slot Accessor: dpm-base
32.2.1.4.3.2.1.1.1 Syntax
(dpm-base object)
32.2.1.4.3.2.1.1.2 Methods
  • (dpm-base (dpm clml.nonparametric.dpm:dpm))
32.2.1.4.3.3 Slot: clusteres
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
  • Initargs: none
  • Allocation: instance
32.2.1.4.3.3.1 Accessors

32.2.1.4.3.3.1.1 Slot Accessor: dpm-clusters
32.2.1.4.3.3.1.1.1 Syntax
(dpm-clusters object)
32.2.1.4.3.3.1.1.2 Methods
  • (dpm-clusters (dpm clml.nonparametric.dpm:dpm))
32.2.1.4.3.4 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'FIXNUM

    :INITIAL-ELEMENT 0)=

  • Initargs: none
  • Allocation: instance
32.2.1.4.3.4.1 Accessors

32.2.1.4.3.4.1.1 Slot Accessor: dpm-cluster-layers
32.2.1.4.3.4.1.1.1 Syntax
(dpm-cluster-layers object)
32.2.1.4.3.4.1.1.2 Methods
  • (dpm-cluster-layers (dpm clml.nonparametric.dpm:dpm))
32.2.1.4.3.5 Slot: 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
32.2.1.4.3.5.1 Accessors

32.2.1.4.3.5.1.1 Slot Accessor: dpm-hyper
32.2.1.4.3.5.1.1.1 Syntax
(dpm-hyper object)
32.2.1.4.3.5.1.1.2 Methods
  • (dpm-hyper (dpm clml.nonparametric.dpm:dpm))
32.2.1.4.3.6 Internal Slot: p
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
32.2.1.4.3.6.1 Accessors

32.2.1.4.3.6.1.1 Slot Accessor: dpm-p
32.2.1.4.3.6.1.1.1 Syntax
(dpm-p object)
32.2.1.4.3.6.1.1.2 Methods
  • (dpm-p (dpm clml.nonparametric.dpm:dpm))
32.2.1.4.3.7 Slot: estimate-base?
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
32.2.1.4.3.7.1 Accessors

32.2.1.4.3.7.1.1 Slot Accessor: estimate-base?
32.2.1.4.3.7.1.1.1 Syntax
(estimate-base? object)
32.2.1.4.3.7.1.1.2 Methods
  • (estimate-base? (dpm clml.nonparametric.dpm:dpm))
32.2.1.4.3.8 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
32.2.1.4.3.8.1 Accessors

32.2.1.4.3.8.1.1 Slot Accessor: dpm-data
32.2.1.4.3.8.1.1.1 Syntax
(dpm-data object)
32.2.1.4.3.8.1.1.2 Methods
  • (dpm-data (dpm clml.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
32.2.1.5.3.1 Slot: 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
32.2.1.5.4.1 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
32.2.1.5.4.2 Slot: estimate-base?
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
32.2.1.5.4.3 Internal Slot: p
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
32.2.1.5.4.4 Slot: 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
32.2.1.5.4.5 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'FIXNUM

    :INITIAL-ELEMENT 0)=

  • Initargs: none
  • Allocation: instance
32.2.1.5.4.6 Slot: clusteres
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
  • Initargs: none
  • Allocation: instance
32.2.1.5.4.7 Slot: 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
32.2.1.6.3.1 Internal Slot: center
  • Value type: t
  • Initial value: 0.0
  • Initargs: center
  • Allocation: instance
32.2.1.6.3.1.1 Accessors

32.2.1.6.3.1.1.1 Slot Accessor: cluster-center
32.2.1.6.3.1.1.1.1 Syntax
(cluster-center object)
32.2.1.6.3.1.1.1.2 Methods
  • (cluster-center (gaussian-cluster clml.nonparametric.dpm:gaussian-cluster))
32.2.1.6.3.2 Internal Slot: std
  • Value type: t
  • Initial value: 1.0
  • Initargs: std
  • Allocation: instance
32.2.1.6.3.2.1 Accessors

32.2.1.6.3.2.1.1 Slot Accessor: cluster-std
32.2.1.6.3.2.1.1.1 Syntax
(cluster-std object)
32.2.1.6.3.2.1.1.2 Methods
  • (cluster-std (gaussian-cluster clml.nonparametric.dpm:gaussian-cluster))
32.2.1.6.3.3 Slot: acc
  • Value type: t
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
32.2.1.6.3.3.1 Accessors

32.2.1.6.3.3.1.1 Slot Accessor: cluster-acc
32.2.1.6.3.3.1.1.1 Syntax
(cluster-acc object)
32.2.1.6.3.3.1.1.2 Methods
  • (cluster-acc (gaussian-cluster clml.nonparametric.dpm:gaussian-cluster))
32.2.1.6.3.4 Slot: points
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
32.2.1.6.3.4.1 Accessors

32.2.1.6.3.4.1.1 Slot Accessor: cluster-points
32.2.1.6.3.4.1.1.1 Syntax
(cluster-points object)
32.2.1.6.3.4.1.1.2 Methods
  • (cluster-points (gaussian-cluster clml.nonparametric.dpm:gaussian-cluster))
32.2.1.6.4 Indirect Slots
32.2.1.6.4.1 Slot: 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
32.2.1.7.4.1 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
32.2.1.7.4.2 Slot: estimate-base?
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
32.2.1.7.4.3 Internal Slot: p
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
32.2.1.7.4.4 Slot: 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
32.2.1.7.4.5 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'FIXNUM

    :INITIAL-ELEMENT 0)=

  • Initargs: none
  • Allocation: instance
32.2.1.7.4.6 Slot: clusteres
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
  • Initargs: none
  • Allocation: instance
32.2.1.7.4.7 Slot: base-distribution
  • Value type: t
  • Initial value: NIL
  • Initargs: base-distribution
  • Allocation: instance
32.2.1.7.4.8 Slot: 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
32.2.1.8.3.1 Internal Slot: dimension
  • Value type: t
  • Initial value: 2
  • Initargs: dim
  • Allocation: instance
32.2.1.8.3.1.1 Accessors

32.2.1.8.3.1.1.1 Slot Accessor: dist-dim
32.2.1.8.3.1.1.1.1 Syntax
(dist-dim object)
32.2.1.8.3.1.1.1.2 Methods
  • (dist-dim (multivar-dp-gaussian clml.nonparametric.dpm:multivar-dp-gaussian))
32.2.1.8.3.2 Slot: ave-of-std
  • Value type: t
  • Initial value: NIL
  • Initargs: aos
  • Allocation: instance
32.2.1.8.3.2.1 Accessors

32.2.1.8.3.2.1.1 Slot Accessor: average-of-std
32.2.1.8.3.2.1.1.1 Syntax
(average-of-std object)
32.2.1.8.3.2.1.1.2 Methods
  • (average-of-std (multivar-dp-gaussian clml.nonparametric.dpm:multivar-dp-gaussian))
32.2.1.8.4 Indirect Slots
32.2.1.8.4.1 Internal Slot: std
  • Value type: t
  • Initial value: 1.0
  • Initargs: std
  • Allocation: instance
32.2.1.8.4.2 Slot: ave
  • Value type: t
  • Initial value: 0.0
  • Initargs: ave
  • Allocation: instance
32.2.1.8.4.3 Slot: 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
32.2.1.9.3.1 Internal Slot: dimension
  • Value type: t
  • Initial value: 2
  • Initargs: dim
  • Allocation: instance
32.2.1.9.3.1.1 Accessors

32.2.1.9.3.1.1.1 Slot Accessor: dpm-dim
32.2.1.9.3.1.1.1.1 Syntax
(dpm-dim object)
32.2.1.9.3.1.1.1.2 Methods
  • (dpm-dim (multivar-gauss-dpm clml.nonparametric.dpm:multivar-gauss-dpm))
32.2.1.9.4 Indirect Slots
32.2.1.9.4.1 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
32.2.1.9.4.2 Slot: estimate-base?
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
32.2.1.9.4.3 Internal Slot: p
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
32.2.1.9.4.4 Slot: 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
32.2.1.9.4.5 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'FIXNUM

    :INITIAL-ELEMENT 0)=

  • Initargs: none
  • Allocation: instance
32.2.1.9.4.6 Slot: clusteres
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
  • Initargs: none
  • Allocation: instance
32.2.1.9.4.7 Slot: base-distribution
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'CLML.NONPARAMETRIC.DPM:DP-GAUSSIAN)
  • Initargs: base-distribution
  • Allocation: instance
32.2.1.9.4.8 Slot: 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
32.2.1.10.3.1 Slot: points
  • Value type: t
  • Initial value: =(MAKE-ARRAY 0 :ELEMENT-TYPE 'HJS.UTIL.META:DVEC :FILL-POINTER T

    :ADJUSTABLE T)=

  • Initargs: none
  • Allocation: instance
32.2.1.10.3.2 Slot: acc
  • Value type: t
  • Initial value: NIL
  • Initargs: acc
  • Allocation: instance
32.2.1.10.4 Indirect Slots
32.2.1.10.4.1 Internal Slot: std
  • Value type: t
  • Initial value: 1.0
  • Initargs: std
  • Allocation: instance
32.2.1.10.4.2 Internal Slot: center
  • Value type: t
  • Initial value: 0.0
  • Initargs: center
  • Allocation: instance
32.2.1.10.4.3 Slot: 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
32.2.1.11.3.1 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
32.2.1.11.3.1.1 Accessors

32.2.1.11.3.1.1.1 Slot Accessor: point-data
32.2.1.11.3.1.1.1.1 Syntax
(point-data object)
32.2.1.11.3.1.1.1.2 Methods
  • (point-data (point clml.nonparametric.dpm:point))
32.2.1.11.3.2 Inherited Slot: cluster
  • Value type: t
  • Initial value: NIL
  • Initargs: cluster
  • Allocation: instance
32.2.1.11.3.2.1 Accessors

32.2.1.11.3.2.1.1 Slot Accessor: point-cluster
32.2.1.11.3.2.1.1.1 Syntax
(point-cluster object)
32.2.1.11.3.2.1.1.2 Methods
  • (point-cluster (point clml.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
33.2.1.1.3.1 Inherited Slot: id
  • Value type: t
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
33.2.1.1.3.1.1 Accessors

33.2.1.1.3.1.1.1 Inherited Slot Accessor: document-id
33.2.1.1.3.1.1.1.1 Syntax
(document-id object)
33.2.1.1.3.1.1.1.2 Methods
  • (document-id (document clml.nonparametric.ftm:document))
33.2.1.1.3.2 Internal Slot: words
  • Value type: t
  • Initial value: NIL
  • Initargs: words
  • Allocation: instance
33.2.1.1.3.2.1 Accessors

33.2.1.1.3.2.1.1 Inherited Slot Accessor: document-words
33.2.1.1.3.2.1.1.1 Syntax
(document-words object)
33.2.1.1.3.2.1.1.2 Methods
  • (document-words (document clml.nonparametric.ftm:document))
33.2.1.1.3.3 Internal Slot: thetas
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
33.2.1.1.3.3.1 Accessors

33.2.1.1.3.3.1.1 Inherited Slot Accessor: document-thetas
33.2.1.1.3.3.1.1.1 Syntax
(document-thetas object)
33.2.1.1.3.3.1.1.2 Methods
  • (document-thetas (document clml.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
33.2.1.2.3.1 Slot: dpm-k
  • Value type: t
  • Initial value: 1
  • Initargs: init-k
  • Allocation: instance
33.2.1.2.3.2 Slot: dpm-hyper
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 2.0 10.0)
  • Initargs: none
  • Allocation: instance
33.2.1.2.3.3 Slot: base-distribution
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'CLML.NONPARAMETRIC.FTM:FTM-UNIFORM)
  • Initargs: none
  • Allocation: instance
33.2.1.2.3.4 Slot: word-table
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE :TEST #'EQUAL)
  • Initargs: none
  • Allocation: instance
33.2.1.2.3.4.1 Accessors

33.2.1.2.3.4.1.1 Slot Accessor: word-table
33.2.1.2.3.4.1.1.1 Syntax
(word-table object)
33.2.1.2.3.4.1.1.2 Methods
  • (word-table (ftm clml.nonparametric.ftm:ftm))
33.2.1.2.3.5 Slot: revert-table
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
33.2.1.2.3.5.1 Accessors

33.2.1.2.3.5.1.1 Slot Accessor: revert-table
33.2.1.2.3.5.1.1.1 Syntax
(revert-table object)
33.2.1.2.3.5.1.1.2 Methods
  • (revert-table (ftm clml.nonparametric.ftm:ftm))
33.2.1.2.3.6 Inherited Slot: id
  • Value type: t
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
33.2.1.2.3.6.1 Accessors

33.2.1.2.3.6.1.1 Inherited Slot Accessor: vocabulary
33.2.1.2.3.6.1.1.1 Syntax
(vocabulary object)
33.2.1.2.3.6.1.1.2 Methods
  • (vocabulary (ftm clml.nonparametric.ftm:ftm))
33.2.1.2.3.7 Slot: ftm-hyper
  • Value type: t
  • Initial value: 5.0
  • Initargs: none
  • Allocation: instance
33.2.1.2.3.7.1 Accessors

33.2.1.2.3.7.1.1 Slot Accessor: ftm-ibp-alpha
33.2.1.2.3.7.1.1.1 Syntax
(ftm-ibp-alpha object)
33.2.1.2.3.7.1.1.2 Methods
  • (ftm-ibp-alpha (ftm clml.nonparametric.ftm:ftm))
33.2.1.2.4 Indirect Slots
33.2.1.2.4.1 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
33.2.1.2.4.2 Slot: estimate-base?
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
33.2.1.2.4.3 Internal Slot: p
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
33.2.1.2.4.4 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'FIXNUM

    :INITIAL-ELEMENT 0)=

  • Initargs: none
  • Allocation: instance
33.2.1.2.4.5 Slot: 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
33.2.1.3.3.1 Slot: topic-pi
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
33.2.1.3.3.1.1 Accessors

33.2.1.3.3.1.1.1 Slot Accessor: topic-pi
33.2.1.3.3.1.1.1.1 Syntax
(topic-pi object)
33.2.1.3.3.1.1.1.2 Methods
  • (topic-pi (ftm-topic clml.nonparametric.ftm:ftm topic))
33.2.1.3.3.2 Slot: topic-phi
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
33.2.1.3.3.2.1 Accessors

33.2.1.3.3.2.1.1 Slot Accessor: topic-phi
33.2.1.3.3.2.1.1.1 Syntax
(topic-phi object)
33.2.1.3.3.2.1.1.2 Methods
  • (topic-phi (ftm-topic clml.nonparametric.ftm:ftm topic))
33.2.1.3.3.3 Slot: dist
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
33.2.1.3.3.3.1 Accessors

33.2.1.3.3.3.1.1 Slot Accessor: cluster-dist-table
33.2.1.3.3.3.1.1.1 Syntax
(cluster-dist-table object)
33.2.1.3.3.3.1.1.2 Methods
  • (cluster-dist-table (ftm-topic clml.nonparametric.ftm:ftm-topic))
33.2.1.3.3.4 Slot: ibp-dish
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
33.2.1.3.3.4.1 Accessors

33.2.1.3.3.4.1.1 Slot Accessor: topic-ibp-table
33.2.1.3.3.4.1.1.1 Syntax
(topic-ibp-table object)
33.2.1.3.3.4.1.1.2 Methods
  • (topic-ibp-table (ftm-topic clml.nonparametric.ftm:ftm-topic))
33.2.1.3.3.5 Slot: emission
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
33.2.1.3.3.5.1 Accessors

33.2.1.3.3.5.1.1 Slot Accessor: topic-emission
33.2.1.3.3.5.1.1.1 Syntax
(topic-emission object)
33.2.1.3.3.5.1.1.2 Methods
  • (topic-emission (ftm-topic clml.nonparametric.ftm:ftm-topic))
33.2.1.3.4 Indirect Slots
33.2.1.3.4.1 Slot: 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
33.2.1.4.3.1 Slot: 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
34.2.1.1.3.1 Slot: 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
34.2.1.1.3.1.1 Accessors

34.2.1.1.3.1.1.1 Slot Accessor: hdp-gamma
34.2.1.1.3.1.1.1.1 Syntax
(hdp-gamma object)
34.2.1.1.3.1.1.1.2 Methods
  • (hdp-gamma (hdp clml.nonparametric.hdp:hdp))
34.2.1.1.3.2 Slot: beta_new
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 1.0 1.0)
  • Initargs: none
  • Allocation: instance
34.2.1.1.3.2.1 Accessors

34.2.1.1.3.2.1.1 Slot Accessor: hdp-beta
34.2.1.1.3.2.1.1.1 Syntax
(hdp-beta object)
34.2.1.1.3.2.1.1.2 Methods
  • (hdp-beta (hdp clml.nonparametric.hdp:hdp))
34.2.1.1.3.3 Slot: beta-tmp
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0 :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.1.3.3.1 Accessors

34.2.1.1.3.3.1.1 Slot Accessor: hdp-beta-tmp
34.2.1.1.3.3.1.1.1 Syntax
(hdp-beta-tmp object)
34.2.1.1.3.3.1.1.2 Methods
  • (hdp-beta-tmp (hdp clml.nonparametric.hdp:hdp))
34.2.1.1.3.4 Slot: abm-tmp
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.1.3.4.1 Accessors

34.2.1.1.3.4.1.1 Slot Accessor: hdp-abm-tmp
34.2.1.1.3.4.1.1.1 Syntax
(hdp-abm-tmp object)
34.2.1.1.3.4.1.1.2 Methods
  • (hdp-abm-tmp (hdp clml.nonparametric.hdp:hdp))
34.2.1.1.3.5 Slot: table-p
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.1.3.5.1 Accessors

34.2.1.1.3.5.1.1 Slot Accessor: hdp-table-p
34.2.1.1.3.5.1.1.1 Syntax
(hdp-table-p object)
34.2.1.1.3.5.1.1.2 Methods
  • (hdp-table-p (hdp clml.nonparametric.hdp:hdp))
34.2.1.1.4 Indirect Slots
34.2.1.1.4.1 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
34.2.1.1.4.2 Slot: estimate-base?
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
34.2.1.1.4.3 Internal Slot: p
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.1.4.4 Slot: 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
34.2.1.1.4.5 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'FIXNUM

    :INITIAL-ELEMENT 0)=

  • Initargs: none
  • Allocation: instance
34.2.1.1.4.6 Slot: clusteres
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
  • Initargs: none
  • Allocation: instance
34.2.1.1.4.7 Slot: base-distribution
  • Value type: t
  • Initial value: NIL
  • Initargs: base-distribution
  • Allocation: instance
34.2.1.1.4.8 Slot: 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
34.2.1.2.3.1 Slot: latent-table
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
34.2.1.2.3.1.1 Accessors

34.2.1.2.3.1.1.1 Slot Accessor: cluster-latent-table
34.2.1.2.3.1.1.1.1 Syntax
(cluster-latent-table object)
34.2.1.2.3.1.1.1.2 Methods
  • (cluster-latent-table (hdp-cluster clml.nonparametric.hdp:hdp-cluster))
34.2.1.2.3.2 Slot: beta
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 1.0 1.0)
  • Initargs: none
  • Allocation: instance
34.2.1.2.3.2.1 Accessors

34.2.1.2.3.2.1.1 Slot Accessor: cluster-beta
34.2.1.2.3.2.1.1.1 Syntax
(cluster-beta object)
34.2.1.2.3.2.1.1.2 Methods
  • (cluster-beta (hdp-cluster clml.nonparametric.hdp:hdp-cluster))
34.2.1.2.3.3 Slot: tmp-table
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE)
  • Initargs: none
  • Allocation: instance
34.2.1.2.3.3.1 Accessors

34.2.1.2.3.3.1.1 Slot Accessor: cluster-tmp-table
34.2.1.2.3.3.1.1.1 Syntax
(cluster-tmp-table object)
34.2.1.2.3.3.1.1.2 Methods
  • (cluster-tmp-table (hdp-cluster clml.nonparametric.hdp:hdp-cluster))
34.2.1.2.4 Indirect Slots
34.2.1.2.4.1 Slot: 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
34.2.1.3.3.1 Slot: 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
34.2.1.4.4.1 Slot: table-p
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.4.4.2 Slot: abm-tmp
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.4.4.3 Slot: beta-tmp
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0 :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.4.4.4 Slot: beta_new
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:GAMMA-RANDOM 1.0 1.0)
  • Initargs: none
  • Allocation: instance
34.2.1.4.4.5 Slot: 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
34.2.1.4.4.6 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
34.2.1.4.4.7 Slot: estimate-base?
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
34.2.1.4.4.8 Internal Slot: p
  • Value type: t
  • Initial value: (MAKE-ARRAY 0 :FILL-POINTER T :ADJUSTABLE T :ELEMENT-TYPE 'DOUBLE-FLOAT)
  • Initargs: none
  • Allocation: instance
34.2.1.4.4.9 Slot: 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
34.2.1.4.4.10 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :ELEMENT-TYPE 'FIXNUM

    :INITIAL-ELEMENT 0)=

  • Initargs: none
  • Allocation: instance
34.2.1.4.4.11 Slot: clusteres
  • Value type: t
  • Initial value: (CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 0)
  • Initargs: none
  • Allocation: instance
34.2.1.4.4.12 Slot: base-distribution
  • Value type: t
  • Initial value: NIL
  • Initargs: base-distribution
  • Allocation: instance
34.2.1.4.4.13 Slot: 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
35.2.1.1.3.1 Inherited Slot: id
  • Value type: t
  • Initial value: NIL
  • Initargs: id
  • Allocation: instance
35.2.1.1.3.1.1 Accessors

35.2.1.1.3.1.1.1 Inherited Slot Accessor: document-id
35.2.1.1.3.1.1.1.1 Syntax
(document-id object)
35.2.1.1.3.1.1.1.2 Methods
  • (document-id (document document))
35.2.1.1.3.2 Internal Slot: words
  • Value type: t
  • Initial value: NIL
  • Initargs: words
  • Allocation: instance
35.2.1.1.3.2.1 Accessors

35.2.1.1.3.2.1.1 Inherited Slot Accessor: document-words
35.2.1.1.3.2.1.1.1 Syntax
(document-words object)
35.2.1.1.3.2.1.1.2 Methods
  • (document-words (document document))
35.2.1.1.3.3 Internal Slot: thetas
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.1.3.3.1 Accessors

35.2.1.1.3.3.1.1 Inherited Slot Accessor: document-thetas
35.2.1.1.3.3.1.1.1 Syntax
(document-thetas object)
35.2.1.1.3.3.1.1.2 Methods
  • (document-thetas (document document))
35.2.1.1.3.4 Slot: restaurant
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.1.3.4.1 Accessors

35.2.1.1.3.4.1.1 Slot Accessor: document-restaurant
35.2.1.1.3.4.1.1.1 Syntax
(document-restaurant object)
35.2.1.1.3.4.1.1.2 Methods
  • (document-restaurant (document document))
35.2.1.1.3.5 Slot: layers
  • Value type: t
  • Initial value: =(CLML.NONPARAMETERIC.STATISTICS:MAKE-ADARRAY 1 :INITIAL ELEMENT 0

    :ELEMENT-TYPE 'FIXNUM)=

  • Initargs: none
  • Allocation: instance
35.2.1.1.3.5.1 Accessors

35.2.1.1.3.5.1.1 Slot Accessor: document-layer-points
35.2.1.1.3.5.1.1.1 Syntax
(document-layer-points object)
35.2.1.1.3.5.1.1.2 Methods
  • (document-layer-points (document document))
35.2.1.1.3.6 Internal Slot: p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.1.3.6.1 Accessors

35.2.1.1.3.6.1.1 Slot Accessor: document-p
35.2.1.1.3.6.1.1.1 Syntax
(document-p object)
35.2.1.1.3.6.1.1.2 Methods
  • (document-p (document document))

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
35.2.1.2.3.1 Internal Slot: k
  • Value type: t
  • Initial value: 0
  • Initargs: k
  • Allocation: instance
35.2.1.2.3.1.1 Accessors

35.2.1.2.3.1.1.1 Inherited Slot Accessor: topic-count
35.2.1.2.3.1.1.1.1 Syntax
(topic-count object)
35.2.1.2.3.1.1.1.2 Methods
  • (topic-count (hdp-lda hdp-lda))
35.2.1.2.3.2 Slot: topics
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.2.1 Accessors

35.2.1.2.3.2.1.1 Slot Accessor: hdp-lda-topics
35.2.1.2.3.2.1.1.1 Syntax
(hdp-lda-topics object)
35.2.1.2.3.2.1.1.2 Methods
  • (hdp-lda-topics (hdp-lda hdp-lda))
35.2.1.2.3.3 Slot: topic-tables
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.3.1 Accessors

35.2.1.2.3.3.1.1 Slot Accessor: hdp-lda-topic-tables
35.2.1.2.3.3.1.1.1 Syntax
(hdp-lda-topic-tables object)
35.2.1.2.3.3.1.1.2 Methods
  • (hdp-lda-topic-tables (hdp-lda hdp-lda))
35.2.1.2.3.4 Slot: topic-occurs
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.4.1 Accessors

35.2.1.2.3.4.1.1 Slot Accessor: hdp-lda-topic-occurs
35.2.1.2.3.4.1.1.1 Syntax
(hdp-lda-topic-occurs object)
35.2.1.2.3.4.1.1.2 Methods
  • (hdp-lda-topic-occurs (hdp-lda hdp-lda))
35.2.1.2.3.5 Slot: ntables
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.5.1 Accessors

35.2.1.2.3.5.1.1 Slot Accessor: hdp-lda-ntables
35.2.1.2.3.5.1.1.1 Syntax
(hdp-lda-ntables object)
35.2.1.2.3.5.1.1.2 Methods
  • (hdp-lda-ntables (hdp-lda hdp-lda))
35.2.1.2.3.6 Slot: alpha
  • Value type: t
  • Initial value: NIL
  • Initargs: alpha
  • Allocation: instance
35.2.1.2.3.6.1 Accessors

35.2.1.2.3.6.1.1 Slot Accessor: hdp-lda-alpha
35.2.1.2.3.6.1.1.1 Syntax
(hdp-lda-alpha object)
35.2.1.2.3.6.1.1.2 Methods
  • (hdp-lda-alpha (hdp-lda hdp-lda))
35.2.1.2.3.7 Slot: beta
  • Value type: t
  • Initial value: NIL
  • Initargs: beta
  • Allocation: instance
35.2.1.2.3.7.1 Accessors

35.2.1.2.3.7.1.1 Slot Accessor: hdp-lda-beta
35.2.1.2.3.7.1.1.1 Syntax
(hdp-lda-beta object)
35.2.1.2.3.7.1.1.2 Methods
  • (hdp-lda-beta (hdp-lda hdp-lda))
35.2.1.2.3.8 Slot: gamma
  • Value type: t
  • Initial value: NIL
  • Initargs: gamma
  • Allocation: instance
35.2.1.2.3.8.1 Accessors

35.2.1.2.3.8.1.1 Slot Accessor: hdp-lda-gamma
35.2.1.2.3.8.1.1.1 Syntax
(hdp-lda-gamma object)
35.2.1.2.3.8.1.1.2 Methods
  • (hdp-lda-gamma (hdp-lda hdp-lda))
35.2.1.2.3.9 Internal Slot: p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.9.1 Accessors

35.2.1.2.3.9.1.1 Slot Accessor: hdp-lda-p
35.2.1.2.3.9.1.1.1 Syntax
(hdp-lda-p object)
35.2.1.2.3.9.1.1.2 Methods
  • (hdp-lda-p (hdp-lda hdp-lda))
35.2.1.2.3.10 Internal Slot: data
  • Value type: t
  • Initial value: NIL
  • Initargs: data
  • Allocation: instance
35.2.1.2.3.10.1 Accessors

35.2.1.2.3.10.1.1 Inherited Slot Accessor: hdp-lda-data
35.2.1.2.3.10.1.1.1 Syntax
(hdp-lda-data object)
35.2.1.2.3.10.1.1.2 Methods
  • (hdp-lda-data (hdp-lda hdp-lda))
35.2.1.2.3.11 Slot: f-k
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.11.1 Accessors

35.2.1.2.3.11.1.1 Slot Accessor: hdp-lda-f-k
35.2.1.2.3.11.1.1.1 Syntax
(hdp-lda-f-k object)
35.2.1.2.3.11.1.1.2 Methods
  • (hdp-lda-f-k (hdp-lda hdp-lda))
35.2.1.2.3.12 Slot: word-table
  • Value type: t
  • Initial value: (MAKE-HASH-TABLE :TEST #'EQUAL)
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.12.1 Accessors

35.2.1.2.3.12.1.1 Slot Accessor: word-table
35.2.1.2.3.12.1.1.1 Syntax
(word-table object)
35.2.1.2.3.12.1.1.2 Methods
  • (word-table (hdp-lda hdp-lda))
35.2.1.2.3.13 Slot: revert-table
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.13.1 Accessors

35.2.1.2.3.13.1.1 Slot Accessor: revert-table
35.2.1.2.3.13.1.1.1 Syntax
(revert-table object)
35.2.1.2.3.13.1.1.2 Methods
  • (revert-table (hdp-lda hdp-lda))
35.2.1.2.3.14 Inherited Slot: id
  • Value type: t
  • Initial value: -1
  • Initargs: none
  • Allocation: instance
35.2.1.2.3.14.1 Accessors

35.2.1.2.3.14.1.1 Inherited Slot Accessor: vocabulary
35.2.1.2.3.14.1.1.1 Syntax
(vocabulary object)
35.2.1.2.3.14.1.1.2 Methods
  • (vocabulary (hdp-lda hdp-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
35.2.2.1.2.1 Slot: dish
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.2.1.2.2 Slot: customer
  • Value type: t
  • Initial value: 0
  • Initargs: none
  • Allocation: instance
35.2.2.1.2.3 Slot: 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
35.2.2.2.2.1 Inherited Slot: id
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
35.2.2.2.2.2 Slot: 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
38.2.1.1.2.0.0.1 pca-result (the result of principle component analysis)
  • 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
38.2.1.1.3.1 Slot: components
  • Value type: t
  • Initial value: NIL
  • Initargs: components
  • Allocation: instance
38.2.1.1.3.1.1 Accessors

38.2.1.1.3.1.1.1 Slot Accessor: components
38.2.1.1.3.1.1.1.1 Syntax
(components object)
38.2.1.1.3.1.1.1.2 Methods
  • (components (kernel-pca-result clml.pca::kernel-pca-result))
  • (components (pca-result clml.pca:pca-result))
38.2.1.1.3.2 Slot: contributions
  • Value type: t
  • Initial value: NIL
  • Initargs: contributions
  • Allocation: instance
38.2.1.1.3.2.1 Accessors

38.2.1.1.3.2.1.1 Slot Accessor: contributions
38.2.1.1.3.2.1.1.1 Syntax
(contributions object)
38.2.1.1.3.2.1.1.2 Methods
  • (contributions (kernel-pca-result clml.pca::kernel-pca-result))
  • (contributions (pca-result clml.pca:pca-result))
38.2.1.1.3.3 Slot: loading-factors
  • Value type: t
  • Initial value: NIL
  • Initargs: loading-factors
  • Allocation: instance
38.2.1.1.3.3.1 Accessors

38.2.1.1.3.3.1.1 Slot Accessor: loading-factors
38.2.1.1.3.3.1.1.1 Syntax
(loading-factors object)
38.2.1.1.3.3.1.1.2 Methods
  • (loading-factors (kernel-pca-model clml.pca::kernel-pca-model))
  • (loading-factors (kernel-pca-result clml.pca::kernel-pca-result))
  • (loading-factors (pca-model clml.pca::pca-model))
  • (loading-factors (pca-result clml.pca:pca-result))
38.2.1.1.3.4 Slot: pca-method
  • Value type: t
  • Initial value: NIL
  • Initargs: pca-method
  • Allocation: instance
38.2.1.1.3.4.1 Accessors

38.2.1.1.3.4.1.1 Slot Accessor: pca-method
38.2.1.1.3.4.1.1.1 Syntax
(pca-method object)
38.2.1.1.3.4.1.1.2 Methods
  • (pca-method (pca-model clml.pca::pca-model))
  • (pca-method (pca-result clml.pca:pca-result))
38.2.1.1.3.5 Inherited Slot: centroid
  • Value type: t
  • Initial value: NIL
  • Initargs: centroid
  • Allocation: instance
38.2.1.1.3.5.1 Accessors

38.2.1.1.3.5.1.1 Inherited Slot Accessor: centroid
38.2.1.1.3.5.1.1.1 Syntax
(centroid object)
38.2.1.1.3.5.1.1.2 Methods
  • (centroid (kernel-pca-model clml.pca::kernel-pca-model))
  • (centroid (kernel-pca-result clml.pca::kernel-pca-result))
  • (centroid (pca-model clml.pca::pca-model))
  • (centroid (pca-result clml.pca:pca-result))
38.2.1.1.3.6 Slot: orig-data-standard-deviations
  • Value type: t
  • Initial value: NIL
  • Initargs: orig-data-standard-deviations
  • Allocation: instance
38.2.1.1.3.6.1 Accessors

38.2.1.1.3.6.1.1 Slot Accessor: orig-data-standard-deviations
38.2.1.1.3.6.1.1.1 Syntax
(orig-data-standard-deviations object)
38.2.1.1.3.6.1.1.2 Methods
  • (orig-data-standard-deviations (pca-model clml.pca::pca-model))
  • (orig-data-standard-deviations (pca-result clml.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
38.2.2.7.2.0.1 make-face-estimator ((face-dataset numeric-and-category-dataset)

&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
38.2.2.9.2.0.1 princomp (dataset &key (method :correlation))
  • 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
38.2.2.10.2.0.1 princomp-projection (dataset pca-model)
  • 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
38.2.2.11.2.0.1 sub-princomp (dataset &key (method :correlation) (dimension-thld 0.8d0))
  • 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
40.2.1.1.3.1 Slot: shape1
  • Value type: t
  • Initial value: NIL
  • Initargs: shape1
  • Allocation: instance
40.2.1.1.3.1.1 Accessors

40.2.1.1.3.1.1.1 Slot Accessor: shape1
40.2.1.1.3.1.1.1.1 Syntax
(shape1 object)
40.2.1.1.3.1.1.1.2 Methods
  • (shape1 (beta-distribution beta distribution))

40.2.1.1.3.1.1.2 Slot Accessor: set-shape1
40.2.1.1.3.1.1.2.1 Syntax
(set-shape1 new-value object)
40.2.1.1.3.1.1.2.2 Methods
  • (set-shape1 (new-value t) (beta-distribution beta distribution))
40.2.1.1.3.2 Slot: shape2
  • Value type: t
  • Initial value: NIL
  • Initargs: shape2
  • Allocation: instance
40.2.1.1.3.2.1 Accessors

40.2.1.1.3.2.1.1 Slot Accessor: shape2
40.2.1.1.3.2.1.1.1 Syntax
(shape2 object)
40.2.1.1.3.2.1.1.2 Methods
  • (shape2 (beta-distribution beta distribution))

40.2.1.1.3.2.1.2 Slot Accessor: set-shape2
40.2.1.1.3.2.1.2.1 Syntax
(set-shape2 new-value object)
40.2.1.1.3.2.1.2.2 Methods
  • (set-shape2 (new-value t) (beta-distribution beta distribution))
40.2.1.1.3.3 Slot: alpha-gamma
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'GAMMA-DISTRIBUTION :SHAPE 1.0 :SCALE 1.0)
  • Initargs: none
  • Allocation: instance
40.2.1.1.3.4 Slot: 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
40.2.1.1.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.1.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.1.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.1.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.1.4.5 Inherited Slot: 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
40.2.1.2.3.1 Internal Slot: size
  • Value type: t
  • Initial value: NIL
  • Initargs: size
  • Allocation: instance
40.2.1.2.3.1.1 Accessors

40.2.1.2.3.1.1.1 Internal Slot Accessor: size
40.2.1.2.3.1.1.1.1 Syntax
(size object)
40.2.1.2.3.1.1.1.2 Methods
  • (size (binomial-distribution binomial-distribution))

40.2.1.2.3.1.1.2 Slot Accessor: set-size
40.2.1.2.3.1.1.2.1 Syntax
(set-size new-value object)
40.2.1.2.3.1.1.2.2 Methods
  • (set-size (new-value t) (binomial-distribution binomial distribution))
40.2.1.2.3.2 Inherited Slot: table
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.3.3 Slot: ki
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.3.4 Slot: vi
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.3.5 Internal Slot: b
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.3.6 Internal Slot: k
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.3.7 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.3.8 Slot: nsq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.4 Indirect Slots
40.2.1.2.4.1 Slot: probability
  • Value type: t
  • Initial value: NIL
  • Initargs: probability
  • Allocation: instance
40.2.1.2.4.2 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.4.3 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.4.4 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.4.5 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.2.4.6 Inherited Slot: 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
40.2.1.3.3.1 Slot: location
  • Value type: t
  • Initial value: NIL
  • Initargs: location
  • Allocation: instance
40.2.1.3.3.1.1 Accessors

40.2.1.3.3.1.1.1 Slot Accessor: location
40.2.1.3.3.1.1.1.1 Syntax
(location object)
40.2.1.3.3.1.1.1.2 Methods
  • (location (logistic-distribution logistic-distribution))
  • (location (cauchy-distribution cauchy-distribution))

40.2.1.3.3.1.1.2 Slot Accessor: set-location
40.2.1.3.3.1.1.2.1 Syntax
(set-location new-value object)
40.2.1.3.3.1.1.2.2 Methods
  • (set-location (new-value t) (logistic-distribution logistic distribution))
  • (set-location (new-value t) (cauchy-distribution cauchy distribution))
40.2.1.3.3.2 Slot: scale
  • Value type: t
  • Initial value: NIL
  • Initargs: scale
  • Allocation: instance
40.2.1.3.3.2.1 Accessors

40.2.1.3.3.2.1.1 Slot Accessor: scale
40.2.1.3.3.2.1.1.1 Syntax
(scale object)
40.2.1.3.3.2.1.1.2 Methods
  • (scale (logistic-distribution logistic-distribution))
  • (scale (cauchy-distribution cauchy distribution))
  • (scale (exponential-distribution exponential-distribution))
  • (scale (gamma-like-distribution clml.statistics::gamma-like-distribution))

40.2.1.3.3.2.1.2 Slot Accessor: set-scale
40.2.1.3.3.2.1.2.1 Syntax
(set-scale new-value object)
40.2.1.3.3.2.1.2.2 Methods
  • (set-scale (new-value t) (logistic-distribution logistic distribution))
  • (set-scale (new-value t) (cauchy-distribution cauchy distribution))
  • (set-scale (new-value t) (gamma-like-distribution clml.statistics::gamma-like-distribution))
40.2.1.3.4 Indirect Slots
40.2.1.3.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.3.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.3.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.3.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.3.4.5 Inherited Slot: 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
40.2.1.4.3.1 Slot: freedom
  • Value type: t
  • Initial value: NIL
  • Initargs: freedom
  • Allocation: instance
40.2.1.4.3.1.1 Accessors

40.2.1.4.3.1.1.1 Slot Accessor: freedom
40.2.1.4.3.1.1.1.1 Syntax
(freedom object)
40.2.1.4.3.1.1.1.2 Methods
  • (freedom (t-distribution t-distribution))
  • (freedom (chi-square-distribution chi-square-distribution))

40.2.1.4.3.1.1.2 Slot Accessor: set-freedom
40.2.1.4.3.1.1.2.1 Syntax
(set-freedom new-value object)
40.2.1.4.3.1.1.2.2 Methods
  • (set-freedom (new-value t) (t-distribution t-distribution))
  • (set-freedom (new-value t) (chi-square-distribution chi square-distribution))
40.2.1.4.3.2 Slot: eq-gamma
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'GAMMA-DISTRIBUTION :SHAPE 2.0 :SCALE 2.0)
  • Initargs: none
  • Allocation: instance
40.2.1.4.3.2.1 Accessors

40.2.1.4.3.2.1.1 Slot Accessor: eq-gamma
40.2.1.4.3.2.1.1.1 Syntax
(eq-gamma object)
40.2.1.4.3.2.1.1.2 Methods
  • (eq-gamma (chi-square-distribution chi-square-distribution))
40.2.1.4.4 Indirect Slots
40.2.1.4.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.4.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.4.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.4.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.4.4.5 Inherited Slot: 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
40.2.1.5.3.1 Slot: xy-mat-expec
  • Value type: t
  • Initial value: NIL
  • Initargs: xy-mat-expec
  • Allocation: instance
40.2.1.5.3.1.1 Accessors

40.2.1.5.3.1.1.1 Slot Accessor: xy-mat-expec
40.2.1.5.3.1.1.1.1 Syntax
(xy-mat-expec object)
40.2.1.5.3.1.1.1.2 Methods
  • (xy-mat-expec (covariance covariance))
40.2.1.5.3.2 Slot: x-mean-vec
  • Value type: t
  • Initial value: NIL
  • Initargs: x-mean-vec
  • Allocation: instance
40.2.1.5.3.2.1 Accessors

40.2.1.5.3.2.1.1 Slot Accessor: x-mean-vec
40.2.1.5.3.2.1.1.1 Syntax
(x-mean-vec object)
40.2.1.5.3.2.1.1.2 Methods
  • (x-mean-vec (covariance covariance))
40.2.1.5.3.3 Slot: y-mean-vec
  • Value type: t
  • Initial value: NIL
  • Initargs: y-mean-vec
  • Allocation: instance
40.2.1.5.3.3.1 Accessors

40.2.1.5.3.3.1.1 Slot Accessor: y-mean-vec
40.2.1.5.3.3.1.1.1 Syntax
(y-mean-vec object)
40.2.1.5.3.3.1.1.2 Methods
  • (y-mean-vec (covariance covariance))
40.2.1.5.3.4 Internal Slot: n
  • Value type: t
  • Initial value: NIL
  • Initargs: n
  • Allocation: instance
40.2.1.5.3.4.1 Accessors

40.2.1.5.3.4.1.1 Internal Slot Accessor: n
40.2.1.5.3.4.1.1.1 Syntax
(n object)
40.2.1.5.3.4.1.1.2 Methods
  • (n (matrix-covariance clml.graph.graph anomaly-detection::matrix-covariance))
  • (n (covariance covariance))

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
40.2.1.6.3.1 Slot: include-zero
  • Value type: t
  • Initial value: NIL
  • Initargs: include-zero
  • Allocation: instance
40.2.1.6.3.1.1 Accessors

40.2.1.6.3.1.1.1 Slot Accessor: include-zero
40.2.1.6.3.1.1.1.1 Syntax
(include-zero object)
40.2.1.6.3.1.1.1.2 Methods
  • (include-zero (weibull-distribution weibull-distribution))
  • (include-zero (exponential-distribution exponential-distribution))
  • (include-zero (erlang-distribution erlang-distribution))

40.2.1.6.3.1.1.2 Slot Accessor: set-include-zero
40.2.1.6.3.1.1.2.1 Syntax
(set-include-zero new-value object)
40.2.1.6.3.1.1.2.2 Methods
  • (set-include-zero (new-value t) (weibull-distribution weibull-distribution))
  • (set-include-zero (new-value t) (exponential-distribution exponential-distribution))
  • (set-include-zero (new-value t) (erlang-distribution erlang-distribution))
40.2.1.6.4 Indirect Slots
40.2.1.6.4.1 Slot: shape
  • Value type: t
  • Initial value: NIL
  • Initargs: shape
  • Allocation: instance
40.2.1.6.4.2 Slot: scale
  • Value type: t
  • Initial value: NIL
  • Initargs: scale
  • Allocation: instance
40.2.1.6.4.3 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.6.4.4 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.6.4.5 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.6.4.6 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.6.4.7 Inherited Slot: 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
40.2.1.7.3.1 Slot: hazard
  • Value type: t
  • Initial value: NIL
  • Initargs: hazard
  • Allocation: instance
40.2.1.7.3.1.1 Accessors

40.2.1.7.3.1.1.1 Slot Accessor: hazard
40.2.1.7.3.1.1.1.1 Syntax
(hazard object)
40.2.1.7.3.1.1.1.2 Methods
  • (hazard (exponential-distribution exponential-distribution))

40.2.1.7.3.1.1.2 Slot Accessor: set-hazard
40.2.1.7.3.1.1.2.1 Syntax
(set-hazard new-value object)
40.2.1.7.3.1.1.2.2 Methods
  • (set-hazard (new-value t) (exponential-distribution exponential-distribution))
40.2.1.7.3.2 Slot: scale
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.7.3.2.1 Accessors

40.2.1.7.3.2.1.1 Slot Accessor: scale
40.2.1.7.3.2.1.1.1 Syntax
(scale object)
40.2.1.7.3.2.1.1.2 Methods
  • (scale (logistic-distribution logistic-distribution))
  • (scale (cauchy-distribution cauchy distribution))
  • (scale (exponential-distribution exponential-distribution))
  • (scale (gamma-like-distribution clml.statistics::gamma-like-distribution))
40.2.1.7.3.3 Slot: include-zero
  • Value type: t
  • Initial value: NIL
  • Initargs: include-zero
  • Allocation: instance
40.2.1.7.3.3.1 Accessors

40.2.1.7.3.3.1.1 Slot Accessor: include-zero
40.2.1.7.3.3.1.1.1 Syntax
(include-zero object)
40.2.1.7.3.3.1.1.2 Methods
  • (include-zero (weibull-distribution weibull-distribution))
  • (include-zero (exponential-distribution exponential-distribution))
  • (include-zero (erlang-distribution erlang-distribution))

40.2.1.7.3.3.1.2 Slot Accessor: set-include-zero
40.2.1.7.3.3.1.2.1 Syntax
(set-include-zero new-value object)
40.2.1.7.3.3.1.2.2 Methods
  • (set-include-zero (new-value t) (weibull-distribution weibull-distribution))
  • (set-include-zero (new-value t) (exponential-distribution exponential-distribution))
  • (set-include-zero (new-value t) (erlang-distribution erlang-distribution))
40.2.1.7.3.4 Slot: skewness
  • Value type: t
  • Initial value: 2.0
  • Initargs: none
  • Allocation: instance
40.2.1.7.3.5 Slot: kurtosis
  • Value type: t
  • Initial value: 9.0
  • Initargs: none
  • Allocation: instance
40.2.1.7.3.6 Inherited Slot: mode
  • Value type: t
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
40.2.1.7.4 Indirect Slots
40.2.1.7.4.1 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.7.4.2 Inherited Slot: 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
40.2.1.8.3.1 Slot: freedom1
  • Value type: t
  • Initial value: NIL
  • Initargs: freedom1
  • Allocation: instance
40.2.1.8.3.1.1 Accessors

40.2.1.8.3.1.1.1 Slot Accessor: freedom1
40.2.1.8.3.1.1.1.1 Syntax
(freedom1 object)
40.2.1.8.3.1.1.1.2 Methods
  • (freedom1 (f-distribution f-distribution))

40.2.1.8.3.1.1.2 Slot Accessor: set-freedom1
40.2.1.8.3.1.1.2.1 Syntax
(set-freedom1 new-value object)
40.2.1.8.3.1.1.2.2 Methods
  • (set-freedom1 (new-value t) (f-distribution f-distribution))
40.2.1.8.3.2 Slot: freedom2
  • Value type: t
  • Initial value: NIL
  • Initargs: freedom2
  • Allocation: instance
40.2.1.8.3.2.1 Accessors

40.2.1.8.3.2.1.1 Slot Accessor: freedom2
40.2.1.8.3.2.1.1.1 Syntax
(freedom2 object)
40.2.1.8.3.2.1.1.2 Methods
  • (freedom2 (f-distribution f-distribution))

40.2.1.8.3.2.1.2 Slot Accessor: set-freedom2
40.2.1.8.3.2.1.2.1 Syntax
(set-freedom2 new-value object)
40.2.1.8.3.2.1.2.2 Methods
  • (set-freedom2 (new-value t) (f-distribution f-distribution))
40.2.1.8.3.3 Slot: chi1
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'CHI-SQUARE-DISTRIBUTION :FREEDOM 1)
  • Initargs: none
  • Allocation: instance
40.2.1.8.3.4 Slot: chi2
  • Value type: t
  • Initial value: (MAKE-INSTANCE 'CHI-SQUARE-DISTRIBUTION :FREEDOM 1)
  • Initargs: none
  • Allocation: instance
40.2.1.8.3.5 Slot: f
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.8.4 Indirect Slots
40.2.1.8.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.8.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.8.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.8.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.8.4.5 Inherited Slot: 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
40.2.1.9.3.1 Slot: gamma-factor
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.3.1.1 Accessors

40.2.1.9.3.1.1.1 Slot Accessor: gamma-factor
40.2.1.9.3.1.1.1.1 Syntax
(gamma-factor object)
40.2.1.9.3.1.1.1.2 Methods
  • (gamma-factor (gamma-distribution gamma-distribution))
40.2.1.9.3.2 Slot: shape-inv
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.3.3 Internal Slot: d
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.3.4 Internal Slot: c
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.4 Indirect Slots
40.2.1.9.4.1 Slot: shape
  • Value type: t
  • Initial value: NIL
  • Initargs: shape
  • Allocation: instance
40.2.1.9.4.2 Slot: scale
  • Value type: t
  • Initial value: NIL
  • Initargs: scale
  • Allocation: instance
40.2.1.9.4.3 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.4.4 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.4.5 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.4.6 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.9.4.7 Inherited Slot: 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
40.2.1.10.3.1 Inherited Slot: table
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.2 Slot: ki
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.3 Slot: vi
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.4 Internal Slot: b
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.5 Internal Slot: k
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.6 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.7 Slot: nsq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.8 Slot: psq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.9 Slot: q
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.10 Internal Slot: r
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.3.11 Internal Slot: c
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.4 Indirect Slots
40.2.1.10.4.1 Slot: probability
  • Value type: t
  • Initial value: NIL
  • Initargs: probability
  • Allocation: instance
40.2.1.10.4.2 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.4.3 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.4.4 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.4.5 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.10.4.6 Inherited Slot: 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
40.2.1.11.3.1 Slot: elements
  • Value type: t
  • Initial value: NIL
  • Initargs: elements
  • Allocation: instance
40.2.1.11.3.1.1 Accessors

40.2.1.11.3.1.1.1 Slot Accessor: elements
40.2.1.11.3.1.1.1.1 Syntax
(elements object)
40.2.1.11.3.1.1.1.2 Methods
  • (elements (hypergeometric-distribution hypergeometric-distribution))

40.2.1.11.3.1.1.2 Slot Accessor: set-elements
40.2.1.11.3.1.1.2.1 Syntax
(set-elements new-value object)
40.2.1.11.3.1.1.2.2 Methods
  • (set-elements (new-value t) (hypergeometric-distribution hypergeometric-distribution))
40.2.1.11.3.2 Slot: successes
  • Value type: t
  • Initial value: NIL
  • Initargs: successes
  • Allocation: instance
40.2.1.11.3.2.1 Accessors

40.2.1.11.3.2.1.1 Slot Accessor: successes
40.2.1.11.3.2.1.1.1 Syntax
(successes object)
40.2.1.11.3.2.1.1.2 Methods
  • (successes (hypergeometric-distribution hypergeometric-distribution))

40.2.1.11.3.2.1.2 Slot Accessor: set-successes
40.2.1.11.3.2.1.2.1 Syntax
(set-successes new-value object)
40.2.1.11.3.2.1.2.2 Methods
  • (set-successes (new-value t) (hypergeometric-distribution hypergeometric-distribution))
40.2.1.11.3.3 Internal Slot: samples
  • Value type: t
  • Initial value: NIL
  • Initargs: samples
  • Allocation: instance
40.2.1.11.3.3.1 Accessors

40.2.1.11.3.3.1.1 Internal Slot Accessor: samples
40.2.1.11.3.3.1.1.1 Syntax
(samples object)
40.2.1.11.3.3.1.1.2 Methods
  • (samples (hypergeometric-distribution hypergeometric-distribution))

40.2.1.11.3.3.1.2 Slot Accessor: set-samples
40.2.1.11.3.3.1.2.1 Syntax
(set-samples new-value object)
40.2.1.11.3.3.1.2.2 Methods
  • (set-samples (new-value t) (hypergeometric-distribution hypergeometric-distribution))
40.2.1.11.3.4 Inherited Slot: table
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.3.5 Slot: ki
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.3.6 Slot: vi
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.3.7 Internal Slot: b
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.3.8 Internal Slot: k
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.3.9 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.3.10 Slot: nsq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.3.11 Internal Slot: a1
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.4 Indirect Slots
40.2.1.11.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.11.4.5 Inherited Slot: 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
40.2.1.12.3.1 Slot: average
  • Value type: t
  • Initial value: NIL
  • Initargs: average
  • Allocation: instance
40.2.1.12.3.1.1 Accessors

40.2.1.12.3.1.1.1 Slot Accessor: average
40.2.1.12.3.1.1.1.1 Syntax
(average object)
40.2.1.12.3.1.1.1.2 Methods
  • (average (log-normal-distribution log-normal-distribution))
  • (average (normal-distribution normal-distribution))

40.2.1.12.3.1.1.2 Slot Accessor: set-average
40.2.1.12.3.1.1.2.1 Syntax
(set-average new-value object)
40.2.1.12.3.1.1.2.2 Methods
  • (set-average (new-value t) (log-normal-distribution log normal-distribution))
  • (set-average (new-value t) (normal-distribution normal distribution))
40.2.1.12.3.2 Internal Slot: std
  • Value type: t
  • Initial value: NIL
  • Initargs: std
  • Allocation: instance
40.2.1.12.3.2.1 Accessors

40.2.1.12.3.2.1.1 Internal Slot Accessor: std
40.2.1.12.3.2.1.1.1 Syntax
(std object)
40.2.1.12.3.2.1.1.2 Methods
  • (std (log-normal-distribution log normal-distribution))
  • (std (normal-distribution normal distribution))

40.2.1.12.3.2.1.2 Slot Accessor: set-std
40.2.1.12.3.2.1.2.1 Syntax
(set-std new-value object)
40.2.1.12.3.2.1.2.2 Methods
  • (set-std (new-value t) (log-normal-distribution log-normal distribution))
  • (set-std (new-value t) (normal-distribution normal distribution))
40.2.1.12.4 Indirect Slots
40.2.1.12.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.12.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.12.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.12.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.12.4.5 Inherited Slot: 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
40.2.1.13.3.1 Slot: location
  • Value type: t
  • Initial value: NIL
  • Initargs: location
  • Allocation: instance
40.2.1.13.3.1.1 Accessors

40.2.1.13.3.1.1.1 Slot Accessor: location
40.2.1.13.3.1.1.1.1 Syntax
(location object)
40.2.1.13.3.1.1.1.2 Methods
  • (location (logistic-distribution logistic-distribution))
  • (location (cauchy-distribution cauchy-distribution))

40.2.1.13.3.1.1.2 Slot Accessor: set-location
40.2.1.13.3.1.1.2.1 Syntax
(set-location new-value object)
40.2.1.13.3.1.1.2.2 Methods
  • (set-location (new-value t) (logistic-distribution logistic distribution))
  • (set-location (new-value t) (cauchy-distribution cauchy distribution))
40.2.1.13.3.2 Slot: scale
  • Value type: t
  • Initial value: NIL
  • Initargs: scale
  • Allocation: instance
40.2.1.13.3.2.1 Accessors

40.2.1.13.3.2.1.1 Slot Accessor: scale
40.2.1.13.3.2.1.1.1 Syntax
(scale object)
40.2.1.13.3.2.1.1.2 Methods
  • (scale (logistic-distribution logistic-distribution))
  • (scale (cauchy-distribution cauchy distribution))
  • (scale (exponential-distribution exponential-distribution))
  • (scale (gamma-like-distribution clml.statistics::gamma-like-distribution))

40.2.1.13.3.2.1.2 Slot Accessor: set-scale
40.2.1.13.3.2.1.2.1 Syntax
(set-scale new-value object)
40.2.1.13.3.2.1.2.2 Methods
  • (set-scale (new-value t) (logistic-distribution logistic distribution))
  • (set-scale (new-value t) (cauchy-distribution cauchy distribution))
  • (set-scale (new-value t) (gamma-like-distribution clml.statistics::gamma-like-distribution))
40.2.1.13.3.3 Slot: skewness
  • Value type: t
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
40.2.1.13.3.4 Slot: kurtosis
  • Value type: t
  • Initial value: 4.2
  • Initargs: none
  • Allocation: instance
40.2.1.13.4 Indirect Slots
40.2.1.13.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.13.4.2 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.13.4.3 Inherited Slot: 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
40.2.1.14.3.1 Slot: success-r
  • Value type: t
  • Initial value: NIL
  • Initargs: success-r
  • Allocation: instance
40.2.1.14.3.1.1 Accessors

40.2.1.14.3.1.1.1 Slot Accessor: success-r
40.2.1.14.3.1.1.1.1 Syntax
(success-r object)
40.2.1.14.3.1.1.1.2 Methods
  • (success-r (negative-binomial-distribution negative-binomial-distribution))

40.2.1.14.3.1.1.2 Slot Accessor: set-success-r
40.2.1.14.3.1.1.2.1 Syntax
(set-success-r new-value object)
40.2.1.14.3.1.1.2.2 Methods
  • (set-success-r (new-value t) (negative-binomial-distribution negative-binomial-distribution))
40.2.1.14.3.2 Inherited Slot: table
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.3 Slot: ki
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.4 Slot: vi
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.5 Internal Slot: b
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.6 Internal Slot: k
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.7 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.8 Slot: nsq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.9 Slot: psq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.10 Slot: q
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.11 Internal Slot: r
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.12 Slot: xl
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.13 Slot: xu
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.14 Slot: pl
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.15 Slot: pu
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.16 Slot: que
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.17 Internal Slot: s
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.3.18 Slot: tee
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.4 Indirect Slots
40.2.1.14.4.1 Slot: probability
  • Value type: t
  • Initial value: NIL
  • Initargs: probability
  • Allocation: instance
40.2.1.14.4.2 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.4.3 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.4.4 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.4.5 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.14.4.6 Inherited Slot: 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
40.2.1.15.3.1 Slot: average
  • Value type: t
  • Initial value: NIL
  • Initargs: average
  • Allocation: instance
40.2.1.15.3.1.1 Accessors

40.2.1.15.3.1.1.1 Slot Accessor: average
40.2.1.15.3.1.1.1.1 Syntax
(average object)
40.2.1.15.3.1.1.1.2 Methods
  • (average (log-normal-distribution log-normal-distribution))
  • (average (normal-distribution normal-distribution))

40.2.1.15.3.1.1.2 Slot Accessor: set-average
40.2.1.15.3.1.1.2.1 Syntax
(set-average new-value object)
40.2.1.15.3.1.1.2.2 Methods
  • (set-average (new-value t) (log-normal-distribution log normal-distribution))
  • (set-average (new-value t) (normal-distribution normal distribution))
40.2.1.15.3.2 Internal Slot: std
  • Value type: t
  • Initial value: NIL
  • Initargs: std
  • Allocation: instance
40.2.1.15.3.2.1 Accessors

40.2.1.15.3.2.1.1 Internal Slot Accessor: std
40.2.1.15.3.2.1.1.1 Syntax
(std object)
40.2.1.15.3.2.1.1.2 Methods
  • (std (log-normal-distribution log normal-distribution))
  • (std (normal-distribution normal distribution))

40.2.1.15.3.2.1.2 Slot Accessor: set-std
40.2.1.15.3.2.1.2.1 Syntax
(set-std new-value object)
40.2.1.15.3.2.1.2.2 Methods
  • (set-std (new-value t) (log-normal-distribution log-normal distribution))
  • (set-std (new-value t) (normal-distribution normal distribution))
40.2.1.15.3.3 Slot: skewness
  • Value type: t
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
40.2.1.15.3.4 Slot: kurtosis
  • Value type: t
  • Initial value: 3.0
  • Initargs: none
  • Allocation: instance
40.2.1.15.4 Indirect Slots
40.2.1.15.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.15.4.2 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.15.4.3 Inherited Slot: 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
40.2.1.16.3.1 Slot: rate
  • Value type: t
  • Initial value: NIL
  • Initargs: rate
  • Allocation: instance
40.2.1.16.3.1.1 Accessors

40.2.1.16.3.1.1.1 Slot Accessor: rate
40.2.1.16.3.1.1.1.1 Syntax
(rate object)
40.2.1.16.3.1.1.1.2 Methods
  • (rate (poisson-distribution poisson distribution))

40.2.1.16.3.1.1.2 Slot Accessor: set-rate
40.2.1.16.3.1.1.2.1 Syntax
(set-rate new-value object)
40.2.1.16.3.1.1.2.2 Methods
  • (set-rate (new-value t) (poisson-distribution poisson distribution))
40.2.1.16.3.2 Inherited Slot: table
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.3 Slot: ki
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.4 Slot: vi
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.5 Internal Slot: b
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.6 Internal Slot: k
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.7 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.8 Slot: nsq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.9 Slot: psq
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.10 Slot: q
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.11 Internal Slot: r
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.12 Slot: xl
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.13 Slot: xu
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.14 Slot: pl
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.15 Slot: pu
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.3.16 Internal Slot: c
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.4 Indirect Slots
40.2.1.16.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.16.4.5 Inherited Slot: 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
40.2.1.17.3.1 Slot: freedom
  • Value type: t
  • Initial value: NIL
  • Initargs: freedom
  • Allocation: instance
40.2.1.17.3.1.1 Accessors

40.2.1.17.3.1.1.1 Slot Accessor: freedom
40.2.1.17.3.1.1.1.1 Syntax
(freedom object)
40.2.1.17.3.1.1.1.2 Methods
  • (freedom (t-distribution t-distribution))
  • (freedom (chi-square-distribution chi-square-distribution))

40.2.1.17.3.1.1.2 Slot Accessor: set-freedom
40.2.1.17.3.1.1.2.1 Syntax
(set-freedom new-value object)
40.2.1.17.3.1.1.2.2 Methods
  • (set-freedom (new-value t) (t-distribution t-distribution))
  • (set-freedom (new-value t) (chi-square-distribution chi square-distribution))
40.2.1.17.3.2 Slot: t-precalc
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.2.1 Accessors

40.2.1.17.3.2.1.1 Slot Accessor: t-precalc
40.2.1.17.3.2.1.1.1 Syntax
(t-precalc object)
40.2.1.17.3.2.1.1.2 Methods
  • (t-precalc (t-distribution t-distribution))

40.2.1.17.3.2.1.2 Slot Accessor: set-t-precalc
40.2.1.17.3.2.1.2.1 Syntax
(set-t-precalc new-value object)
40.2.1.17.3.2.1.2.2 Methods
  • (set-t-precalc (new-value t) (t-distribution t-distribution))
40.2.1.17.3.3 Internal Slot: r
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.4 Internal Slot: b
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.5 Internal Slot: c
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.6 Internal Slot: a
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.7 Internal Slot: d
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.8 Internal Slot: k
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.9 Internal Slot: w
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.10 Internal Slot: s
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.11 Internal Slot: p
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.12 Slot: q
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.13 Slot: t1
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.14 Slot: t2
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.15 Internal Slot: v1
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.3.16 Internal Slot: v2
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.4 Indirect Slots
40.2.1.17.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.4.2 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.4.3 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.4.4 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.17.4.5 Inherited Slot: 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
40.2.1.18.3.1 Internal Slot: from
  • Value type: t
  • Initial value: NIL
  • Initargs: from
  • Allocation: instance
40.2.1.18.3.1.1 Accessors

40.2.1.18.3.1.1.1 Slot Accessor: uniform-from
40.2.1.18.3.1.1.1.1 Syntax
(uniform-from object)
40.2.1.18.3.1.1.1.2 Methods
  • (uniform-from (uniform-distribution uniform-distribution))

40.2.1.18.3.1.1.2 Slot Accessor: set-uniform-from
40.2.1.18.3.1.1.2.1 Syntax
(set-uniform-from new-value object)
40.2.1.18.3.1.1.2.2 Methods
  • (set-uniform-from (new-value t) (uniform-distribution uniform-distribution))
40.2.1.18.3.2 Internal Slot: to
  • Value type: t
  • Initial value: NIL
  • Initargs: to
  • Allocation: instance
40.2.1.18.3.2.1 Accessors

40.2.1.18.3.2.1.1 Slot Accessor: uniform-to
40.2.1.18.3.2.1.1.1 Syntax
(uniform-to object)
40.2.1.18.3.2.1.1.2 Methods
  • (uniform-to (uniform-distribution uniform-distribution))

40.2.1.18.3.2.1.2 Slot Accessor: set-uniform-to
40.2.1.18.3.2.1.2.1 Syntax
(set-uniform-to new-value object)
40.2.1.18.3.2.1.2.2 Methods
  • (set-uniform-to (new-value t) (uniform-distribution uniform distribution))
40.2.1.18.3.3 Slot: width
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.18.3.3.1 Accessors

40.2.1.18.3.3.1.1 Slot Accessor: uniform-width
40.2.1.18.3.3.1.1.1 Syntax
(uniform-width object)
40.2.1.18.3.3.1.1.2 Methods
  • (uniform-width (uniform-distribution uniform-distribution))
40.2.1.18.3.4 Inherited Slot: denominator
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.18.3.4.1 Accessors

40.2.1.18.3.4.1.1 Slot Accessor: uniform-denom
40.2.1.18.3.4.1.1.1 Syntax
(uniform-denom object)
40.2.1.18.3.4.1.1.2 Methods
  • (uniform-denom (uniform-distribution uniform-distribution))

40.2.1.18.3.4.1.2 Slot Accessor: set-uniform-denom
40.2.1.18.3.4.1.2.1 Syntax
(set-uniform-denom new-value object)
40.2.1.18.3.4.1.2.2 Methods
  • (set-uniform-denom (new-value t) (uniform-distribution uniform-distribution))
40.2.1.18.3.5 Slot: skewness
  • Value type: t
  • Initial value: 0.0
  • Initargs: none
  • Allocation: instance
40.2.1.18.3.6 Slot: kurtosis
  • Value type: t
  • Initial value: 1.8
  • Initargs: none
  • Allocation: instance
40.2.1.18.4 Indirect Slots
40.2.1.18.4.1 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.18.4.2 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.18.4.3 Inherited Slot: 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
40.2.1.19.3.1 Slot: include-zero
  • Value type: t
  • Initial value: NIL
  • Initargs: include-zero
  • Allocation: instance
40.2.1.19.3.1.1 Accessors

40.2.1.19.3.1.1.1 Slot Accessor: include-zero
40.2.1.19.3.1.1.1.1 Syntax
(include-zero object)
40.2.1.19.3.1.1.1.2 Methods
  • (include-zero (weibull-distribution weibull-distribution))
  • (include-zero (exponential-distribution exponential-distribution))
  • (include-zero (erlang-distribution erlang-distribution))

40.2.1.19.3.1.1.2 Slot Accessor: set-include-zero
40.2.1.19.3.1.1.2.1 Syntax
(set-include-zero new-value object)
40.2.1.19.3.1.1.2.2 Methods
  • (set-include-zero (new-value t) (weibull-distribution weibull-distribution))
  • (set-include-zero (new-value t) (exponential-distribution exponential-distribution))
  • (set-include-zero (new-value t) (erlang-distribution erlang-distribution))
40.2.1.19.3.2 Slot: r-inv
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.19.4 Indirect Slots
40.2.1.19.4.1 Slot: shape
  • Value type: t
  • Initial value: NIL
  • Initargs: shape
  • Allocation: instance
40.2.1.19.4.2 Slot: scale
  • Value type: t
  • Initial value: NIL
  • Initargs: scale
  • Allocation: instance
40.2.1.19.4.3 Inherited Slot: mode
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.19.4.4 Slot: kurtosis
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.19.4.5 Slot: skewness
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.19.4.6 Inherited Slot: variance
  • Value type: t
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance
40.2.1.19.4.7 Inherited Slot: 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
40.2.3.60.2.0.0.1 smirnov-grubbs (seq alpha &key (type :max) (recursive nil))

Smirnov-Grubbs method for outlier verification.

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)