id int64 0 45.1k | file_name stringlengths 4 68 | file_path stringlengths 14 193 | content stringlengths 32 9.62M | size int64 32 9.62M | language stringclasses 1
value | extension stringclasses 6
values | total_lines int64 1 136k | avg_line_length float64 3 903k | max_line_length int64 3 4.51M | alphanum_fraction float64 0 1 | repo_name stringclasses 779
values | repo_stars int64 0 882 | repo_forks int64 0 108 | repo_open_issues int64 0 90 | repo_license stringclasses 8
values | repo_extraction_date stringclasses 146
values | sha stringlengths 64 64 | __index_level_0__ int64 0 45.1k | exdup_ids_cmlisp_stkv2 listlengths 1 47 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17,313 | mixture-test.lisp | jnjcc_cl-ml/test/mixture-test.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Unsupervised Learning > Probability Model Estimation > Mixture Model
(in-package #:cl-ml/test)
(define-test gaussian-mixture-test
(let ((X (copy-matrix *gmm-train*))
;; (y (copy-matrix *gmm-label*))
(gmm (make-instance 'gau... | 657 | Common Lisp | .lisp | 15 | 37.2 | 73 | 0.60625 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 7e274b8af5b13b1c4d09a9138a5ff8b4da601ddb4a91c853d2b9bd2e476d5bec | 17,313 | [
-1
] |
17,314 | packages.lisp | jnjcc_cl-ml/test/packages.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-user)
(defpackage #:cl-ml/test
(:nicknames #:ml/test)
(:use #:cl #:lisp-unit #:cl-ml/probs #:cl-ml/linalg #:cl-ml/algo
#:cl-ml/graph #:cl-ml/io #:cl-ml)
(:export #:run-all-tests))
| 285 | Common Lisp | .lisp | 8 | 32.625 | 66 | 0.621818 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 05115f82983379ddd89ed47749a1fbb104c32ac097eb93ac98e2ee13b6338e81 | 17,314 | [
-1
] |
17,315 | dataset.lisp | jnjcc_cl-ml/test/dataset.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-ml/test)
(defvar *dataset-path* (merge-pathnames "test/dataset/"
(asdf:system-source-directory :cl-ml-test)))
;;; iris dataset
(defvar *iris-file-path* (merge-pathnames "iris/iris.data" *d... | 1,823 | Common Lisp | .lisp | 40 | 42.425 | 87 | 0.689014 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | d2f45d0a2b1d69bbcaf812f12a2250129b8853adaca5dda24659cefe4040c823 | 17,315 | [
-1
] |
17,316 | gaussian.lisp | jnjcc_cl-ml/pgm/gaussian.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Multivariate Gaussian Distribution
(in-package #:cl-ml)
(defun mgpdf (x mus sigmas)
"Probability Density Function for Multivariate Gaussian Distribution
`mus': row or column vector; `sigmas': covariance matrix"
(declare (type smatrix mus... | 805 | Common Lisp | .lisp | 22 | 31.772727 | 70 | 0.610256 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 6127a00b88bfb28a3a08081ce7d82bcaf4ff7154b361236bd3d39c3ba1f3568c | 17,316 | [
-1
] |
17,317 | gmm.lisp | jnjcc_cl-ml/pgm/gmm.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Unsupervised Learning > Probability Model Estimation > Mixture Model
(in-package #:cl-ml)
(defclass gaussian-mixture (estimator)
((ncomponents :initform 3 :initarg :ncomponents
:documentation "number of mixture components")... | 3,710 | Common Lisp | .lisp | 81 | 38.802469 | 82 | 0.627798 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | d05d3a3cf4059afe88f049809cfd8c75a01f4c48621ae6dcdd27aea78a29b822 | 17,317 | [
-1
] |
17,318 | sim-lex.lisp | jnjcc_cl-ml/io/sim-lex.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Lexical analysis, with #\Space being word delimiter
(in-package #:cl-ml/io)
(defun alpha-word-p (word)
(every #'alpha-char-p word))
(defun upper-word-p (word)
(every #'upper-case-p word))
(defun lower-word-p (word)
(every #'lower-cas... | 1,670 | Common Lisp | .lisp | 41 | 35.073171 | 79 | 0.612724 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 943879957ff02845c4813ab87be7d591a27f01c465840344fe5032492be120ec | 17,318 | [
-1
] |
17,319 | sim-file.lisp | jnjcc_cl-ml/io/sim-file.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; file io
(in-package #:cl-ml/io)
(defun read-file-content (fpath)
(with-open-file (stream fpath :direction :input :if-does-not-exist nil)
(unless stream
(error "error reading file ~A~%" fpath))
(let ((content (make-string (fil... | 529 | Common Lisp | .lisp | 14 | 34.285714 | 73 | 0.681641 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 6fbaed94bc72f8de0990afe10331c26df96ffea6ff844781684f69c77c1bd4ba | 17,319 | [
-1
] |
17,320 | sim-char.lisp | jnjcc_cl-ml/io/sim-char.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Character
(in-package #:cl-ml/io)
(defun space-char-p (chr)
(or (char= chr #\Space) (char= chr #\Tab) (char= chr #\Newline)
(char= chr #\Return)))
(defun peek-non-space (stream &optional (eof-error-p t) (eof-value nil))
"peek next... | 3,064 | Common Lisp | .lisp | 74 | 35.716216 | 85 | 0.617272 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | b28dd3579cf6a3753a060d44e6f388d8211fdf96ddd15525cb00b531ee3495ef | 17,320 | [
-1
] |
17,321 | sim-matrix.lisp | jnjcc_cl-ml/io/sim-matrix.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple io: read smatrix from csv file
(in-package #:cl-ml/io)
(defun read-matrix (fpath &key (start 0) end (header-p nil) (delimiter #\,)
colclass (label -1) labclass)
"Read from row [`start', `end') of `fpath'; `h... | 1,545 | Common Lisp | .lisp | 38 | 33.552632 | 85 | 0.601464 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 7953937b02f2bc703dd3169b32e695e87378e3b0e7227420668c2e4bc07d1b11 | 17,321 | [
-1
] |
17,322 | sim-example.lisp | jnjcc_cl-ml/io/sim-example.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple io for training examples
(in-package #:cl-ml/io)
(defun %canonize-bound (bound len &optional (default 0))
(cond
((null bound) default)
((integerp bound) (cond
((<= 0 bound len) bound)
... | 3,518 | Common Lisp | .lisp | 80 | 35.2125 | 89 | 0.540076 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 102412c7d10cdc08264fc662ae099c9da546653b6f5d59176c72bc8316cf81f4 | 17,322 | [
-1
] |
17,323 | sim-synt.lisp | jnjcc_cl-ml/io/sim-synt.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Syntactic analysis, with #\Space being word delimiter, #\Newline being sentence delimiter
(in-package #:cl-ml/io)
(defun read-next-sentence (stream &key (max-len nil) (eow #\Space) (eol #\Newline))
"Returns: :eof if no more sentence; or li... | 1,153 | Common Lisp | .lisp | 26 | 38.038462 | 94 | 0.614769 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 8155de34eb022f0a666277a5b587d0c964d4ee3a30bc8980c0b84ed457eea534 | 17,323 | [
-1
] |
17,324 | sim-graph.lisp | jnjcc_cl-ml/io/sim-graph.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple io: read graph from csv file
(in-package #:cl-ml/io)
(defun read-graph (fpath &key (type :undirected) (start 0) end (delimiter #\,))
(let ((graph (make-graph type)))
(do-example-from-file (example indx fpath :start start :end en... | 683 | Common Lisp | .lisp | 15 | 38.6 | 79 | 0.615616 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 3a15fe2717881190ae0fca1dc37c16cad06db786088f0843c05bc9afd59f12d9 | 17,324 | [
-1
] |
17,325 | packages.lisp | jnjcc_cl-ml/io/packages.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-user)
(defpackage #:cl-ml/io
(:nicknames #:ml/io)
(:use #:cl #:cl-ml/linalg #:cl-ml/algo #:cl-ml/graph)
(:export #:space-char-p
#:peek-non-space #:peek-next-char #:discard-next-char #:stream-eof-p
#:re... | 842 | Common Lisp | .lisp | 18 | 38.444444 | 100 | 0.592186 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 36e3beb932e008a287860bda9baa59526e62365692b44655de0f253c27434d7a | 17,325 | [
-1
] |
17,326 | scaler.lisp | jnjcc_cl-ml/preprocess/scaler.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Min-max scaler and standard-scaler
(in-package #:cl-ml)
(defclass min-max-scaler (transformer)
())
(defclass standard-scaler (transformer)
((mu-vector :initarg nil :reader mu-vector :type smatrix)
(sigma-vector :initarg nil :reader s... | 1,563 | Common Lisp | .lisp | 41 | 34.219512 | 69 | 0.654557 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 0c78b056ada5d1236b3f22fba52aa341aeb979d1d12846e8abaed5544c4a57d6 | 17,326 | [
-1
] |
17,327 | label.lisp | jnjcc_cl-ml/preprocess/label.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Label Encoder: encode label to index
(in-package #:cl-ml)
;;; TODO: association list might also do the trick?
(defclass label-encoder (transformer)
((label-hash :initform nil :reader label-hash)
(inver-hash :initform nil :reader inver-h... | 2,544 | Common Lisp | .lisp | 63 | 34.984127 | 73 | 0.643464 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 96fa5ad82086f023b43b99992f2a706732659bb9b00c412b0558c83f34cb751e | 17,327 | [
-1
] |
17,328 | polynomial.lisp | jnjcc_cl-ml/preprocess/polynomial.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Polynomial Feature Transformer
(in-package #:cl-ml)
(defclass poly-transformer (transformer)
((degree :initform 1 :initarg :degree :reader degree)
(expand-bias :initform t :initarg :expand-bias :reader expand-bias
:docum... | 3,196 | Common Lisp | .lisp | 69 | 40.710145 | 94 | 0.655438 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 5e45d73dba945eea5165017a361a85186a649ce2fd7428b46d0803e0c7cc7a52 | 17,328 | [
-1
] |
17,329 | onehot.lisp | jnjcc_cl-ml/preprocess/onehot.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; OneHot Encoder
(in-package #:cl-ml)
(defclass onehot-encoder (transformer)
())
| 160 | Common Lisp | .lisp | 6 | 25 | 66 | 0.690789 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 4ca44360a696ae2201bec4184521201feca4206455452074335777c4a903d5ba | 17,329 | [
-1
] |
17,330 | combination.lisp | jnjcc_cl-ml/probs/combination.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Combinations and Permutations (n, k)
(in-package #:cl-ml/probs)
;;; Combinations
;; combinations-with-replacement
(defun %visit-comb-indices-replace (n k &optional visit)
"given a set of `n' elements, `visit' all the `k'-length combination... | 5,662 | Common Lisp | .lisp | 137 | 32.10219 | 91 | 0.548984 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9918518e018a551357ba8ece92a5d55333633c8d428e384cea32527cab2f4873 | 17,330 | [
-1
] |
17,331 | stats.lisp | jnjcc_cl-ml/probs/stats.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Statistics stuff on list
(in-package #:cl-ml/probs)
(defun sum (lst)
(reduce #'+ lst :initial-value 0))
(defun mean (lst)
(/ (sum lst) (length lst)))
(defun quantile-positions (len &optional (quad 0.5))
"(values left-idx left-ratio r... | 1,165 | Common Lisp | .lisp | 32 | 31.125 | 76 | 0.570922 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 25104f1987f75d3c42c92d550fbc7cbe8117e9327b51807cebf9fbb4006101fe | 17,331 | [
-1
] |
17,332 | bins.lisp | jnjcc_cl-ml/probs/bins.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; bin: lightweight "hash-table" using association list
;;;; - `bincount': ((k1 . count1) ...)
;;;; - `binlist': ((k1 (v1 v2 ...)) ...)
(in-package #:cl-ml/probs)
(defun make-bins ()
nil)
(defun copy-bins (bins)
(copy-list bins))
;;; ... | 2,925 | Common Lisp | .lisp | 80 | 31.8375 | 75 | 0.594203 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | e42af7cb7b865cc9a16381acb06f227c1412437730b3a9d6693c03e18a5858db | 17,332 | [
-1
] |
17,333 | precision.lisp | jnjcc_cl-ml/probs/precision.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Floating Point Precision
(in-package #:cl-ml/probs)
;;; float equal
(defvar *float-zero-epsilon* 1.0e-10)
(defun float= (a b &optional (epsilon *float-zero-epsilon*))
(<= (abs (- a b)) epsilon))
(defun float/= (a b &optional (epsilon *fl... | 597 | Common Lisp | .lisp | 16 | 34.5625 | 66 | 0.626087 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 0914b1bceb625d55e3ea90ba5f21f3c8d10cc7901ceae9c40ba0f2238ffc377f | 17,333 | [
-1
] |
17,334 | paramdist.lisp | jnjcc_cl-ml/probs/paramdist.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Parametric Probability Distributions
(in-package #:cl-ml/probs)
;;; Normal distribution
(defun cumsum (p)
(let ((cdf (make-list (length p)))
(sum 0.0))
(dotimes (i (length p))
(incf sum (nth i p))
(setf (nth i cdf)... | 337 | Common Lisp | .lisp | 12 | 24.333333 | 66 | 0.618012 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | a9dbc42bcb2ec1fcead134f85096812cbbe29141ef8b8fca26aa28b227109bf5 | 17,334 | [
-1
] |
17,335 | randoms.lisp | jnjcc_cl-ml/probs/randoms.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Probability stuff
(in-package #:cl-ml/probs)
(defun %random-generator (shape randfn &rest args)
(let ((randret nil))
(cond
((null shape) (setf randret (apply randfn args)))
((integerp shape) (dotimes (i shape)
... | 1,255 | Common Lisp | .lisp | 35 | 30.571429 | 66 | 0.637562 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | dd71f5c5ab499ef1697396a07f9d88d441a748c7732f8f7fec16d9191a14a3c2 | 17,335 | [
-1
] |
17,336 | shuffle.lisp | jnjcc_cl-ml/probs/shuffle.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Generate a random permutation of a finite (sub-)sequence:
;;;; choose random $k$ elements from a sequence of size $n$
(in-package #:cl-ml/probs)
(defun %subseq-values (lst start end)
"Returns (actual start, acutal length, acutal end, ful... | 2,027 | Common Lisp | .lisp | 57 | 29.912281 | 77 | 0.599184 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | ca7541945e26a4ed22636eb093f3b444ba170ba75bc121f2810d915b592e93a0 | 17,336 | [
-1
] |
17,337 | indices.lisp | jnjcc_cl-ml/probs/indices.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-ml/probs)
(defun make-step-range (start end &optional (step 1))
(let ((lst nil)
(endfn #'>=))
(when (< step 0)
(setf endfn #'<=))
(do ((val start (+ val step)))
((funcall endfn val end))
(pus... | 403 | Common Lisp | .lisp | 14 | 24.428571 | 66 | 0.580311 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 3a72781589606a905f121a66af7602f764ea5f9a7cb001f04b26f62eea453e01 | 17,337 | [
-1
] |
17,338 | packages.lisp | jnjcc_cl-ml/probs/packages.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Probability and Statistics
(in-package #:cl-user)
(defpackage #:cl-ml/probs
(:nicknames #:ml/probs)
(:use #:cl)
(:export #:float= #:float/= #:float< #:float>
#:cumsum
#:randint #:randuni #:randnorm
;; ... | 1,306 | Common Lisp | .lisp | 36 | 26.333333 | 69 | 0.569731 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | e3d649f0ffa6da331e12cdfebbe78f4eefa3ea81268469c3c718038dd75df788 | 17,338 | [
-1
] |
17,339 | sampling.lisp | jnjcc_cl-ml/probs/sampling.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Random sampling (through indices)
(in-package #:cl-ml/probs)
;;; Simple random sampling (using reservoir sampling)
(defun simple-sampling (lst &optional k)
(unless k
(setf k (length lst)))
(let ((sampl nil))
(dotimes (i (length l... | 5,507 | Common Lisp | .lisp | 174 | 25.655172 | 75 | 0.589652 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9064e6be311ce1534ed1c9c6fe15aadd98e14caee1871785ab869e43a3876e51 | 17,339 | [
-1
] |
17,340 | binary-tree.lisp | jnjcc_cl-ml/algo/binary-tree.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Common Data Structure: Binary Tree
(in-package #:cl-ml/algo)
;;; Binary tree with the list form (data ltree rtree)
;;; so that (copy-tree) (tree-equal) works fine
(defun make-binary-tree (data &optional (ltree nil) (rtree nil))
(list dat... | 1,942 | Common Lisp | .lisp | 55 | 31.945455 | 66 | 0.684126 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9e693607ea17026a1fa0201210c8627e479767d83799bfe297111d7b01d04446 | 17,340 | [
-1
] |
17,341 | queue.lisp | jnjcc_cl-ml/algo/queue.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Common Data Structure: FIFO queue
(in-package #:cl-ml/algo)
;;; FIFO queue with list
(defun make-queue ()
nil)
(defmacro queue-enque (queue data)
"(macroexpand-1 '(push 1 stack)"
`(setq ,queue (nconc ,queue (list ,data))))
(defmacro ... | 532 | Common Lisp | .lisp | 19 | 25.315789 | 66 | 0.66075 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 21844b6d6e408e2f8997f04e5526d5ab529f3449241b6df12f35c12f05d0616c | 17,341 | [
-1
] |
17,342 | kmp.lisp | jnjcc_cl-ml/algo/kmp.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Knuth¨CMorris¨CPratt string search algorithm
(in-package #:cl-ml/algo)
| 149 | Common Lisp | .lisp | 4 | 36 | 66 | 0.715278 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | e6c6d6fb8b5cf02294e2c5db87c6875125787119a41893ca3ec226ff1059ac61 | 17,342 | [
-1
] |
17,343 | huffman.lisp | jnjcc_cl-ml/algo/huffman.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Common Data Structure: Huffman Tree
(in-package #:cl-ml/algo)
(defun choose-min-node (nodes nleaf lpos ipos &key (freqfn #'cdr))
"[0, `nleaf'] of `nodes' being leafs with default form ((word . freq) ...),
while [`nleaf', ) being inner node... | 5,569 | Common Lisp | .lisp | 123 | 35.430894 | 90 | 0.574738 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 6b90abaf94c89f5870cb4823e9522035c45a6b4cf4c57374793fa81865c6cdb5 | 17,343 | [
-1
] |
17,344 | packages.lisp | jnjcc_cl-ml/algo/packages.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Common data structure and algorithms for Machine Learning and NLP
(in-package #:cl-user)
(defpackage #:cl-ml/algo
(:nicknames #:ml/algo)
(:use #:cl)
(:export #:repeat-string #:join-strings
#:split-string #:split-string-if
... | 1,049 | Common Lisp | .lisp | 27 | 29.814815 | 92 | 0.57451 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 39ea3520e43f23d72389bf14ce4a36eab8187efb06409d11ba8ef88d855a2c3e | 17,344 | [
-1
] |
17,345 | stack.lisp | jnjcc_cl-ml/algo/stack.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Common Data Structure: Stack
(in-package #:cl-ml/algo)
;;; Stack with list
(defun make-stack ()
nil)
(defmacro stack-push (stack data)
`(setq ,stack (cons ,data ,stack)))
(defmacro stack-pop (stack)
`(prog1
(car ,stack)
(... | 441 | Common Lisp | .lisp | 17 | 23.294118 | 66 | 0.657895 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9d2f2614ccde0cb983d38c25aaae79aa97d95c4cbf55c7ab5c3f98ab89fb01cd | 17,345 | [
-1
] |
17,346 | cost.lisp | jnjcc_cl-ml/metrics/cost.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-ml)
;;; MSE (Mean squared error):
;;; - 1/2m \sum_{i=1}^{m}(x^{(i)}w - y(i))^{2}
;;; - 1/2(Xw - y)(Xw - y)
(defun mse-cost (y ypred)
(let ((sv (v- y ypred)))
(* (/ 1 2) (vdot sv sv))))
(defun mse-gradient (theta X y)
... | 1,511 | Common Lisp | .lisp | 56 | 22.910714 | 66 | 0.481994 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 83b38bb4e977352ac47b22e78beeb95b590cd948e95e008febfdcc36175933a4 | 17,346 | [
-1
] |
17,347 | classifier.lisp | jnjcc_cl-ml/metrics/classifier.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-ml)
(defun print-confusion-matrix (cmatrix labenc &optional (stream t))
(format stream "A\\P")
(dotimes (j (label-nums labenc))
(format stream "~A~A" #\Tab (get-encoder-label labenc j)))
(format stream "~%")
(do-matri... | 4,187 | Common Lisp | .lisp | 97 | 37.123711 | 90 | 0.602599 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 90451af6e18446fed4973194062432cad22489b2069c9b353733cf0a9c7ada0f | 17,347 | [
-1
] |
17,348 | regressor.lisp | jnjcc_cl-ml/metrics/regressor.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-ml)
(defun mean-squared-error (y ypred)
(let ((sqerr 0.0)
(sub 0.0))
(do-vector (i y)
(setf sub (- (vref y i) (vref ypred i)))
(incf sqerr (* sub sub)))
(/ sqerr (nrow y))))
| 295 | Common Lisp | .lisp | 10 | 25.3 | 66 | 0.565371 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 4d6bf7b4cc51e2e09bb1200303df6fc93330b8a431b81d232aed4be0c0bb8421 | 17,348 | [
-1
] |
17,349 | cluster.lisp | jnjcc_cl-ml/metrics/cluster.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(in-package #:cl-ml)
;;; Distances for clustering
(defun minkowski-distance (x y p)
(let ((sum 0))
(do-vector (i x)
(incf sum (expt (abs (- (vref x i) (vref y i))) p)))
(expt sum (/ 1 p))))
(defun euclidean-distance (x y)
(let ... | 2,210 | Common Lisp | .lisp | 75 | 23.626667 | 66 | 0.520696 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9734b6edca538b9c8580336672b0752b4a897c0f2d9f311f32067b05584b8218 | 17,349 | [
-1
] |
17,350 | ksvc.lisp | jnjcc_cl-ml/linear/ksvc.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Non-Linear Support Vector Machine for classification
(in-package #:cl-ml)
(deftype kernel-type ()
'(member :linear :poly :rbf :sigmoid))
(defclass kernel-svc (estimator)
((yalpha :initform nil :type smatrix :documentation "y[i] * alpha[... | 16,067 | Common Lisp | .lisp | 366 | 33.901639 | 86 | 0.547636 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 7db532e5128ec2a594295f3a12003ca9794e11c9a77ffefbb0ea86b6393a0a18 | 17,350 | [
-1
] |
17,351 | regression.lisp | jnjcc_cl-ml/linear/regression.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Linear Regression / Ridge Regression / Lasso Regression
;;;; - X * w = y, where row of X is an example, w and y are column vectors
(in-package #:cl-ml)
(deftype linear-solver ()
'(member :normal :pseudo))
(defclass linear-regressor (esti... | 2,401 | Common Lisp | .lisp | 57 | 36.859649 | 83 | 0.633248 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 6e5e30df6d90f6c2c70698c84f8fc00a922110df6f7ed2525e21c2760c9f3877 | 17,351 | [
-1
] |
17,352 | ksvr.lisp | jnjcc_cl-ml/linear/ksvr.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Non-Linear Support Vector Machine for regression
(in-package #:cl-ml)
(defclass kernel-svr (estimator)
((yalpha :initform nil :reader yalpha :type smatrix)))
| 239 | Common Lisp | .lisp | 6 | 38.166667 | 66 | 0.727273 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 227531fb2094f5dc21a645e588b846037a132e81b019e904b6e5356eed0eba4b | 17,352 | [
-1
] |
17,353 | sgd.lisp | jnjcc_cl-ml/linear/sgd.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Gradient Descent
(in-package #:cl-ml)
(deftype sgd-loss ()
":mse - Mean Squared Error"
'(member :mse))
(deftype sgd-regularizer ()
'(member :none :l1 :l2))
(deftype sgd-btype ()
"batch-type: batch sgd mini-batch"
'(member :batch :s... | 2,663 | Common Lisp | .lisp | 67 | 35.626866 | 96 | 0.656878 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 8b193c4abe76886f62bd786c64ea454120f23c0e495601761dfee59119f366e3 | 17,353 | [
-1
] |
17,354 | linsvc.lisp | jnjcc_cl-ml/linear/linsvc.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Linear Support Vector Machine for classification
(in-package #:cl-ml)
(deftype svc-loss ()
"L2-regularized L1-loss SVC; L2-regularized L2-loss SVC"
'(member :l2reg-l1 :l2reg-l2))
(defclass linear-svc (estimator)
((theta :initform nil ... | 4,426 | Common Lisp | .lisp | 102 | 32.529412 | 104 | 0.542169 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | ee52bd4ba31ad205cdbc9eac5b6460ee12bfce5c991e230bbf27b496e5e67d0d | 17,354 | [
-1
] |
17,355 | linsvr.lisp | jnjcc_cl-ml/linear/linsvr.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Linear Support Vector Machine for regression
(in-package #:cl-ml)
(defclass linear-svr (estimator)
((theta :initform nil :reader theta :type smatrix)
(expand-bias :initform t :initarg :expand-bias :reader expand-bias)))
| 304 | Common Lisp | .lisp | 7 | 41.428571 | 72 | 0.728814 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | b1d0bb6378b8fba1c65efc1ddfc5efd510c1200055fb884d59ca153933382697 | 17,355 | [
-1
] |
17,356 | logistic.lisp | jnjcc_cl-ml/linear/logistic.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Logistic Regression
(in-package #:cl-ml)
(deftype logistic-loss ()
'(member :logistic))
(defclass logistic-regression (sgd-regressor)
((loss :initform :logistic :initarg :loss :reader loss :type logistic-loss)))
(defmethod gradient ((l... | 708 | Common Lisp | .lisp | 19 | 33.789474 | 79 | 0.684211 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 2545005ecb16e8174b1afcbe31890e96416e901a7f96edc3d04575aa71d38a36 | 17,356 | [
-1
] |
17,357 | svm.lisp | jnjcc_cl-ml/linear/svm.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Support Vector Machine, the common algorithm
(in-package #:cl-ml)
;;; TODO: Shrinking, how about a class of shrinking?
(defmacro shrink-indices (indices i nactive)
"struck out i-th index"
;; NOTICE: not necessary to do gensym, there are ... | 1,327 | Common Lisp | .lisp | 31 | 39.935484 | 66 | 0.697674 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 79af6c9a90d2ad2fd8812a60d9616f63535a5479acbaac68561a4057919d068b | 17,357 | [
-1
] |
17,358 | cart.lisp | jnjcc_cl-ml/trees/cart.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Classification and Regression Tree
(in-package #:cl-ml)
(defmethod print-verbose ((dtree-est dtree-estimator) &optional (stream t) feaname labenc)
(let ((feafun #'identity)
(labelfun #'identity))
(when feaname
(setf feafu... | 3,977 | Common Lisp | .lisp | 94 | 35.117021 | 90 | 0.624871 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 36c10ab23643305106d9a4e385a2e1742ff96462b53b75f5ba43cde33d247bab | 17,358 | [
-1
] |
17,359 | forest.lisp | jnjcc_cl-ml/trees/forest.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Random Forest Estimator
(in-package #:cl-ml)
(defclass rforest-estimator (estimator)
((estimators :initform nil :documentation "list of decision tree estimators")
(nestimators :initform 10 :initarg :nestimators)
(bootstrap :initform ... | 5,673 | Common Lisp | .lisp | 112 | 41.946429 | 88 | 0.646539 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | d5d53cbb1d0697de1e100fd6c49561f2cb140feb89ce7aa357677b757a50a460 | 17,359 | [
-1
] |
17,360 | xgboost.lisp | jnjcc_cl-ml/trees/xgboost.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Extreme Gradient Boosting Trees
(in-package #:cl-ml)
(defclass xgboost-tree (gboost-estimator)
())
(defmethod initialize-instance :after ((xgtree xgboost-tree) &rest args)
(declare (ignore args))
(with-slots (estimators nestimators lo... | 1,479 | Common Lisp | .lisp | 35 | 35.914286 | 84 | 0.666435 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 8b4d84f8639ed694227d62fffd9de67ed0893c8b86d07dcd937d1d1af5af0243 | 17,360 | [
-1
] |
17,361 | xgframe.lisp | jnjcc_cl-ml/trees/xgframe.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; "Data Frame" for XGBoost
(in-package #:cl-ml)
;;; `ylabels' is a m x 2 matrix, with first column being first-order derivative,
;;; second column being second-order derivative
(defclass xgb-frame (data-frame)
())
(defmethod get-first-ord... | 908 | Common Lisp | .lisp | 23 | 36.086957 | 83 | 0.684091 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | a565b5b1f5d70e9c1ee57c00b3a80a1c03819b3e5b7d846a254bc9b9ad6149df | 17,361 | [
-1
] |
17,362 | xgcart.lisp | jnjcc_cl-ml/trees/xgcart.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; XGBoost Regression Tree Estimator
(in-package #:cl-ml)
(defclass xgb-regressor (dtree-regressor)
((criterion :initform :xgb)))
(defmethod fit ((xgreg xgb-regressor) X &optional y)
"NOTICE: y is a mx2 matrix"
(unless (= (ncol y) 2)
... | 583 | Common Lisp | .lisp | 15 | 35.266667 | 66 | 0.676106 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 7f0692f83088355b3498e8b071398e8a912f1a6a57097c32d739111a617461f4 | 17,362 | [
-1
] |
17,363 | xgloss.lisp | jnjcc_cl-ml/trees/xgloss.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; XGBoost Losses
(in-package #:cl-ml)
(defclass xgloss-least (gbloss-least)
())
(defmethod negative-gradient ((xgleast xgloss-least) y f)
;; second order derivative being 1
(let ((grad (make-matrix (nrow y) 2 :initial-element 1.0)))
... | 688 | Common Lisp | .lisp | 21 | 29.714286 | 85 | 0.661631 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 77b2f94025424b484b416b533b330f23df60983db7b6b1b8f8ec38a9f86a3f2a | 17,363 | [
-1
] |
17,364 | gbtree.lisp | jnjcc_cl-ml/trees/gbtree.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Gradient Boosting Trees
(in-package #:cl-ml)
(defclass gboost-estimator (estimator)
((estimators :initform nil :documentation "list of decision tree estimators")
(nestimators :initform 20 :initarg :nestimators)
(loss :initform :least... | 3,697 | Common Lisp | .lisp | 80 | 40.675 | 90 | 0.681011 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9c38cbc8256feb0f48ff99a38a3912c4ae3f96d2ec5bab73027fed7b2d5e3f2e | 17,364 | [
-1
] |
17,365 | dtcrite.lisp | jnjcc_cl-ml/trees/dtcrite.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Decision Tree impurity criterion for node split
(in-package #:cl-ml)
(defclass criterion-base ()
((sbeg :initform 0 :initarg :sbeg
:documentation "the first sample to be used on this node")
(send :initform nil :initarg :send)
... | 7,432 | Common Lisp | .lisp | 177 | 36.79096 | 84 | 0.651079 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9b587a18161b17f78859cf00eab5310bfbc9f40fecd833d10f1cc1f59cb981a8 | 17,365 | [
-1
] |
17,366 | dtree.lisp | jnjcc_cl-ml/trees/dtree.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Decision Tree Estimator
;;;; TODO: multiclass support; algorithm optimization
(in-package #:cl-ml)
;;; Decision Tree
;; Decision Tree: node data (payload of the Binary Tree data structure)
(defclass dtree-node-data ()
((feature :initform n... | 11,667 | Common Lisp | .lisp | 219 | 44.639269 | 98 | 0.647141 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 8f443efffa824e113cfdd83455cca9ed965079821fcad50c136294e9caba6384 | 17,366 | [
-1
] |
17,367 | xgcrite.lisp | jnjcc_cl-ml/trees/xgcrite.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; XGBoost Decision Tree impurity criterion for node split
(in-package #:cl-ml)
(defclass criterion-xgb (criterion-base)
;; `gamma' * J + 1/2 * `lambd' * sum(c^{2})
((gamma :initform 0 :initarg :gamma)
(lambd :initform 1 :initarg :lambd)... | 3,528 | Common Lisp | .lisp | 82 | 38.121951 | 91 | 0.644438 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 2e6e60bfd74af658d73c2f73106e124bec2b4a24056ce63ca2745ce213c2cb6f | 17,367 | [
-1
] |
17,368 | gbloss.lisp | jnjcc_cl-ml/trees/gbloss.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Gradient Boosting Lossess
(in-package #:cl-ml)
(deftype gbloss-type ()
;; squared loss, exp
'(member :square :exp))
(defclass gbloss-base ()
;; gradient boosting loss function
((init-estimator :initform nil :documentation "initial e... | 5,621 | Common Lisp | .lisp | 134 | 37.253731 | 92 | 0.659524 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 34f43d429e3b18abed31152af8d3ad7b247148a3a93568d14ed629e36dc57139 | 17,368 | [
-1
] |
17,369 | sim-base.lisp | jnjcc_cl-ml/graph/sim-base.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Graph base class
(in-package #:cl-ml/graph)
(defclass graph-base ()
((node-eq :initform #'equal :initarg :node-eq :reader node-eq)
(node-le :initform #'<= :initarg :node-le)
;; edges using hash-table of hash-table's
(edge-hash :in... | 6,162 | Common Lisp | .lisp | 143 | 37.657343 | 74 | 0.663495 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 5367c24e3cfb0582358f85b05b45b1bfed836d2e8cfceb985314b4422617e84e | 17,369 | [
-1
] |
17,370 | sim-graph.lisp | jnjcc_cl-ml/graph/sim-graph.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Undirected Graph and Directed Graph
(in-package #:cl-ml/graph)
;;; Undirected Graph
(defclass ungraph (graph-base)
())
(defmethod graph-type ((graph ungraph))
:undirected)
(defmethod add-node-safe ((graph ungraph) node value)
(with-s... | 3,455 | Common Lisp | .lisp | 80 | 38.725 | 77 | 0.687817 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | d927fa886ab4a0ba2c8170da99c404fdb6ef9456f5081879de465f3131a25a9d | 17,370 | [
-1
] |
17,371 | packages.lisp | jnjcc_cl-ml/graph/packages.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple Graph
(in-package #:cl-user)
(defpackage #:cl-ml/graph
(:nicknames #:ml/graph)
(:use #:cl #:cl-ml/probs)
(:export #:ungraph #:digraph #:graph-type
#:same-node
#:make-graph #:copy-graph
#:node-cou... | 639 | Common Lisp | .lisp | 18 | 27.944444 | 74 | 0.567044 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 40778c35e5f49d5aa37e783de70241e896d92ce66bab5db2b3db0cedc05d4818 | 17,371 | [
-1
] |
17,372 | losses.lisp | jnjcc_cl-ml/neural/losses.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Neural Network > Loss functions
(in-package #:cl-ml)
;;; Cross Entropy for binary classifier
(defun cross-entropy-gradient (A y)
"broadcasting y accros columns of A: A - y"
(do-matrix (i j A)
(decf (mref A i j) (vref y i)))
A)
;;;... | 349 | Common Lisp | .lisp | 11 | 29.545455 | 66 | 0.680597 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 01e2c4396868f22ce222bbac3150a54edf120dc51394fe80916114916df728f8 | 17,372 | [
-1
] |
17,373 | activations.lisp | jnjcc_cl-ml/neural/activations.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Neural Network > Activation Functions
(in-package #:cl-ml)
(deftype activation-type ()
'(member :sigmoid :relu))
(defclass activation-base ()
())
(defgeneric activate-matrix (act X)
(:documentation "call activation on X"))
(defgener... | 1,458 | Common Lisp | .lisp | 49 | 26.142857 | 68 | 0.66595 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | a80856402d0ab77be8e452f343d81378b4d746bd93a9b6f184cbbf2f396953c9 | 17,373 | [
-1
] |
17,374 | mlp.lisp | jnjcc_cl-ml/neural/mlp.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Neural Network > Network architecture > Multilayer perceptron
(in-package #:cl-ml)
;;; tf.contrib.learn.DNNClassifier
(defclass multilayer-perceptron (estimator)
((hidden-units :initform '(16) :initarg :hidden-units :type list
... | 9,605 | Common Lisp | .lisp | 224 | 38.183036 | 87 | 0.658036 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 79f94b9ddcb662f8aedfc42e478dfd61f2d6c54f30ba0cb0a956cb16e2a3e949 | 17,374 | [
-1
] |
17,375 | kmeans.lisp | jnjcc_cl-ml/cluster/kmeans.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Unsupervised Learning > clustering > k-Means clustering
(in-package #:cl-ml)
(deftype kmeans-init-type ()
'(member :kmeans++ :random))
(defclass kmeans-cluster (estimator)
((nclusters :initform 5 :initarg :nclusters)
(clusters :initf... | 5,564 | Common Lisp | .lisp | 132 | 36.333333 | 82 | 0.653122 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 8a36c89fda746c6537f532c7b32eca2307e1a88914acde6c4f49572e3a3e4894 | 17,375 | [
-1
] |
17,376 | dbscan.lisp | jnjcc_cl-ml/cluster/dbscan.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Unsupervised Learning > clustering > DBSCAN
(in-package #:cl-ml)
| 143 | Common Lisp | .lisp | 4 | 34.5 | 66 | 0.695652 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 51dd179abb96c489aba355579c69c992b2bbc73aedc8370e8f6b51ee471c7c16 | 17,376 | [
-1
] |
17,377 | sim-access.lisp | jnjcc_cl-ml/linalg/sim-access.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: access opertaions for smatrix and smatrix-view through (MREF)
;;;; NOTICE: unless stated, all access opertaions share memory, too
(in-package #:cl-ml/linalg)
;; loop with matrix indices:
;; with indices of `mref' properly tran... | 3,509 | Common Lisp | .lisp | 92 | 34.108696 | 95 | 0.591471 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 4e7c177f99b029a1f6a47b2203d3c68967b75ee8166f72890915951f8eff5f60 | 17,377 | [
-1
] |
17,378 | sim-smatrix.lisp | jnjcc_cl-ml/linalg/sim-smatrix.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: smatrix class
;;;;
;;;; smatrix-dense
;;;; /
;;;; smatrix (- smatrix-sparse[*] smatrix-view
;;;; \ / \
;;;; smatrix-view-window[*] (- smat... | 5,169 | Common Lisp | .lisp | 132 | 36.590909 | 93 | 0.655131 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 29a8918d1868cb7fb3b34d6c8935a0c67e844455aa1ea70dfe9bdb999da2a3d9 | 17,378 | [
-1
] |
17,379 | sim-operation.lisp | jnjcc_cl-ml/linalg/sim-operation.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: matrix properties and operations
(in-package #:cl-ml/linalg)
(defmethod mdet ((ma smatrix))
(let ((copy (copy-matrix ma))
(det 1))
(gaussian-on-matrix copy)
(do-matrix-row (i copy)
(setf det (* det (mre... | 9,747 | Common Lisp | .lisp | 276 | 30.192029 | 86 | 0.574934 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 48fa6a86fc59f0731fe527b60c716581a5e8809962b003b48aacd4ff282b3b44 | 17,379 | [
-1
] |
17,380 | sim-bidiagonal.lisp | jnjcc_cl-ml/linalg/sim-bidiagonal.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: bidiagonalization using Householder transformation
(in-package #:cl-ml/linalg)
(defun %make-full-view (mA)
(make-matrix-view mA :row-view '(0 . :end) :col-view '(0 . :end)))
;;; narrow from top-left corner to bottom-right c... | 6,607 | Common Lisp | .lisp | 153 | 37.045752 | 89 | 0.590563 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | e73e0ff4fac21ae033c9aea80f953dc9f789e36ffad268ef18eff00563065f1b | 17,380 | [
-1
] |
17,381 | sim-hessenberg.lisp | jnjcc_cl-ml/linalg/sim-hessenberg.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: Hessenberg using Householder transformation
(in-package #:cl-ml/linalg)
(defun %bottom-left-vector (mAv)
"mAv = ((A11, \pmb{a}_{2}) (\pmb{a}_{1}, A_{2})),
we want to extract \pmb{a}_{1}: first column vector without A11"
(m... | 3,143 | Common Lisp | .lisp | 72 | 38.680556 | 103 | 0.58956 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | cebc679d6318041cbb5f0972c872fd53f33456443f6d77d1e2caff831e04f5e2 | 17,381 | [
-1
] |
17,382 | sim-diagview.lisp | jnjcc_cl-ml/linalg/sim-diagview.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: matrix diagonal view
(in-package #:cl-ml/linalg)
(deftype diagonal-type ()
'(member :main :upper :lower :both))
(defclass smatrix-diagview (smatrix)
((displaced-to :initform nil :initarg :displaced-to :reader displaced-to... | 3,381 | Common Lisp | .lisp | 91 | 30.582418 | 87 | 0.560134 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 485830b0a5d85cde833e2448aa34762e7329d0d610acb86ee81e94786123c2d9 | 17,382 | [
-1
] |
17,383 | sim-stats.lisp | jnjcc_cl-ml/linalg/sim-stats.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Statistics stuff for smatrix
(in-package #:cl-ml/linalg)
(defmethod mhead ((ma smatrix) &optional (n 6))
(if (< n 0)
(make-matrix-view ma :row-view (cons (+ (nrow ma) n) :end))
(make-matrix-view ma :row-view (cons 0 n))))
(def... | 5,242 | Common Lisp | .lisp | 114 | 35.201754 | 94 | 0.530309 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 7e9c00ca4f30795ecb15d1253c78332aa0c6ad28420eb018404048f48e93693e | 17,383 | [
-1
] |
17,384 | sim-qr.lisp | jnjcc_cl-ml/linalg/sim-qr.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: The QR algorithm
(in-package #:cl-ml/linalg)
(defun %make-tridiagonal (alphas betas)
(if (/= (length alphas) (+ (length betas) 1))
(error "main diagonal and sub diagonal length not match")
(let* ((n (length alpha... | 5,212 | Common Lisp | .lisp | 112 | 36.196429 | 98 | 0.499509 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 0e63cd5767c196fbadd5b679288eda85891a068056d180f7187d75009f6365a0 | 17,384 | [
-1
] |
17,385 | sim-transpose.lisp | jnjcc_cl-ml/linalg/sim-transpose.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: transposed matrix
(in-package #:cl-ml/linalg)
(defclass smatrix-transpose (smatrix)
((displaced-to :initform nil :initarg :displaced-to :reader displaced-to)))
;;; rows and columns
(defmethod nrow ((ma smatrix-transpose))
... | 1,282 | Common Lisp | .lisp | 35 | 32.714286 | 77 | 0.677159 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 66d7135473ec6351fcecf61e512b5fd4c1e7ec6f2f1f454474a1626a7c91bfbb | 17,385 | [
-1
] |
17,386 | sim-transform.lisp | jnjcc_cl-ml/linalg/sim-transform.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: Matrix transformations
(in-package #:cl-ml/linalg)
;;; 1) Gaussian elimination: three types of elementary row operations
(defun %swap-rows (ma i j)
"swapping two rows"
(declare (type smatrix ma))
(do-matrix-col (k ma)
... | 8,245 | Common Lisp | .lisp | 221 | 31.276018 | 94 | 0.515629 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 896169fefbd0d2d870b6866786480398b3daa746a5cfe5cd8c1253890d8f5d19 | 17,386 | [
-1
] |
17,387 | sim-view.lisp | jnjcc_cl-ml/linalg/sim-view.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: matrix view window
(in-package #:cl-ml/linalg)
;;; three types of view window:
;;; - (start . end) association pair, meaning [start, end)
;;; + `start' must be integer
;;; + `end' can be integer or :end
;;; - (i1 i... | 5,543 | Common Lisp | .lisp | 128 | 36.703125 | 85 | 0.602928 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | e00c44aea424b683dbfaa05a00b59b0311735982ae71252e8cb886d9662eb42c | 17,387 | [
-1
] |
17,388 | sim-indirect.lisp | jnjcc_cl-ml/linalg/sim-indirect.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: Indirect Addressing through INDICES
(in-package #:cl-ml/linalg)
(defun iaref (data indices i &optional (ref #'vref))
"reference through Indirect Addressing"
(let ((indx (nth i indices)))
(funcall ref data indx)))
(def... | 2,769 | Common Lisp | .lisp | 67 | 35.940299 | 88 | 0.619614 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | ad508a09670238ea4ce1947ae931efb1f527359c008a35d77feac37385fa5c9e | 17,388 | [
-1
] |
17,389 | packages.lisp | jnjcc_cl-ml/linalg/packages.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Linear Algebra
(in-package #:cl-user)
(defpackage #:cl-ml/linalg
(:nicknames #:ml/linalg)
(:use #:cl #:cl-ml/probs)
(:export #:smatrix #:nrow #:ncol #:mshape
;; smatrix creation
#:make-matrix #:copy-matrix #:fill... | 1,460 | Common Lisp | .lisp | 36 | 30.583333 | 79 | 0.527915 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 13ea78df516eceb7690e63a11685398c43a6392ce4b47be2a1c7098bac95d09a | 17,389 | [
-1
] |
17,390 | sim-dense.lisp | jnjcc_cl-ml/linalg/sim-dense.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: smatrix-dense
(in-package #:cl-ml/linalg)
(defclass smatrix-dense (smatrix)
((data :initform nil :type 'array)))
;;; rows and columns
(defmethod nrow ((ma smatrix-dense))
(with-slots (data) ma
(if data
(array-... | 2,639 | Common Lisp | .lisp | 64 | 36.359375 | 88 | 0.677079 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 47a84679d669d1d2b0716954f4084f884367a0f4467f11787a6b586127ca5953 | 17,390 | [
-1
] |
17,391 | sim-svd.lisp | jnjcc_cl-ml/linalg/sim-svd.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Simple matrix: Singular Value Decomposition and Moore-Penrose Pseudoinverse
(in-package #:cl-ml/linalg)
;;; Singular Value Decomposition
(defun %make-square-view-bound (mB p q)
(let ((end (+ q 1)))
(make-matrix-view mB :row-view `(,p .... | 4,508 | Common Lisp | .lisp | 112 | 31.526786 | 82 | 0.497037 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | e6e961c62bd208a624b0967fd7cc3a211c9a27e9ceb7cb2dc3cb0efff9774f6e | 17,391 | [
-1
] |
17,392 | transformer.lisp | jnjcc_cl-ml/base/transformer.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Transformer
(in-package #:cl-ml)
(defclass transformer (estimator)
())
(defgeneric transform (trans X)
(:documentation "transform dataset X"))
(defgeneric fit-transform (trans X)
(:documentation "fit and transform dataset X"))
(defgen... | 895 | Common Lisp | .lisp | 28 | 28.642857 | 68 | 0.667053 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 6ebe44774571f1f0b31c31a495e46cf5cb9aab16a8491b3a538c70ab838b2552 | 17,392 | [
-1
] |
17,393 | numeric.lisp | jnjcc_cl-ml/base/numeric.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; numeric stuff such as infinity, overflow / underflow
(in-package #:cl-ml)
;;; infinity comparison, we will not do infinity arithmetic
(deftype infty-type ()
"positive infinity, negative infinity"
'(member :infty :ninfty))
(defun inf< (a... | 1,888 | Common Lisp | .lisp | 72 | 21.555556 | 66 | 0.522173 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 667b3b4b820521793aa2103b23e4d163d1d8b776a6f1820aaf54fcedfe444dda | 17,393 | [
-1
] |
17,394 | estimator.lisp | jnjcc_cl-ml/base/estimator.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; Estimator
(in-package #:cl-ml)
(defclass estimator ()
())
(defgeneric fit (est X &optional y)
(:documentation "train estimator from training set X"))
(defgeneric predict (est X)
(:documentation "predict for dataset X"))
(defmethod fi... | 418 | Common Lisp | .lisp | 13 | 30.230769 | 66 | 0.708229 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 8aec5a2e411c5d4102ff155fe99322708faa56440ffd639de4adf942e75c6c6d | 17,394 | [
-1
] |
17,395 | dframe.lisp | jnjcc_cl-ml/base/dframe.lisp | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
;;;; "Data Frame" for training
(in-package #:cl-ml)
;;; NOTICE: reorder training data through indirect addressing
;;; it is necessary we reorder the y label at the same time
;;; smatrix-view is not able to do that
(defclass data-frame ()
((... | 4,064 | Common Lisp | .lisp | 100 | 36.35 | 87 | 0.66371 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9c5c338e0c0633203bc34c6de3d71e5e52b5cfdccf41c873d531cd0cb8e72c37 | 17,395 | [
-1
] |
17,396 | cl-ml.asd | jnjcc_cl-ml/cl-ml.asd | ;;;; Copyright (c) 2012-2015 jnjcc, Yste.org. All rights reserved.
;;;;
(asdf:defsystem #:cl-ml
:description "Machine Learning in Common Lisp"
:version "0.1.0"
:author "jnjcc at live.com"
:licence "GPL"
:serial t
:components ((:module "probs"
:components ((:file "packages")
... | 6,603 | Common Lisp | .asd | 132 | 20.287879 | 76 | 0.276086 | jnjcc/cl-ml | 3 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | f79d1d1eb1fb8a758e7792565d86a41e782955920b70badf887645fa33c0097c | 17,396 | [
-1
] |
17,511 | pseudo-print.lisp | eschulte_pseudo-print/pseudo-print.lisp | ;;; pseudo-print.lisp --- print lisp as pseudo-code
;; Copyright (C) Eric Schulte 2013
;; Licensed under the Gnu Public License Version 3 or later
;;; Commentary
;; Use `with-pseudo-printer' to print lisp code as pseudo code using
;; the normal printing facilities. E.g.,
;;
;; PSEUDO-PRINT> (with-pseudo-pprint... | 7,464 | Common Lisp | .lisp | 182 | 32.989011 | 80 | 0.465415 | eschulte/pseudo-print | 3 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 8fd00abe631e2648721eb5cb65d9f3850577d82245824af85caf86a89c8349b0 | 17,511 | [
-1
] |
17,512 | pseudo-print.asd | eschulte_pseudo-print/pseudo-print.asd | (defsystem :pseudo-print
:description "print lisp as pseudo-code"
:version "0.0.0"
:author ("Eric Schulte <schulte.eric@gmail.com>")
:licence "GPL V3"
:depends-on (alexandria curry-compose-reader-macros)
:components
((:file "package") (:file "pseudo-print" :depends-on ("package"))))
| 298 | Common Lisp | .asd | 8 | 34.5 | 69 | 0.706897 | eschulte/pseudo-print | 3 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 081e8029341d553cf5686b6df8f34906f5cdadf96ca5f1b31281b782d0f74a94 | 17,512 | [
-1
] |
17,529 | chordinator.lisp | rheaplex_rheart/chordinator/chordinator.lisp | ;; chordinator.lisp - Colour chord generation
;; Copyright Rhea Myers 2007
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3 of the License, or
;; (at your option) any later... | 14,416 | Common Lisp | .lisp | 357 | 36.173669 | 171 | 0.662436 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 993bafac660097bdca8d98832dfcd2cd1b5db9d7eee0e9de4accbe8df79e008e | 17,529 | [
-1
] |
17,530 | arc.lisp | rheaplex_rheart/draw-something/arc.lisp | ;; arc.lisp - A 2D circle segment.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; eithe... | 2,948 | Common Lisp | .lisp | 71 | 38.070423 | 80 | 0.687805 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | dcef581655838e4873ec534f65dc19270e3c9566fb4ae1206a07bc60c58976a1 | 17,530 | [
-1
] |
17,531 | package.lisp | rheaplex_rheart/draw-something/package.lisp | ;; package.lisp - The main package for draw-something
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software... | 1,038 | Common Lisp | .lisp | 24 | 41.791667 | 73 | 0.757157 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | d15929cc4328d24a4dd6a8fa4a061332939cf5a70f19b80f388d2f9ea5836c0d | 17,531 | [
-1
] |
17,532 | figure.lisp | rheaplex_rheart/draw-something/figure.lisp | ;; figure.lisp - A drawn figure.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either ... | 1,664 | Common Lisp | .lisp | 43 | 36.046512 | 73 | 0.727554 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 9aaa7ea43ca8aa1925e0cadb3dd8ada7776d7f525b91cc64c0dfd481b627d27c | 17,532 | [
-1
] |
17,533 | composition.lisp | rheaplex_rheart/draw-something/composition.lisp | ;; composition.lisp - Generating an image with some kind of intent.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the... | 7,035 | Common Lisp | .lisp | 147 | 39.068027 | 80 | 0.541029 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | f79720cbdea84ca84c593044ee9deb693d854da4662e7f3615a4b3c89f058a70 | 17,533 | [
-1
] |
17,534 | line.lisp | rheaplex_rheart/draw-something/line.lisp | ;; line.lisp - A 2D line Segment, and utilities on points and lines.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; t... | 5,269 | Common Lisp | .lisp | 130 | 36.646154 | 79 | 0.600429 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | d4d393b2def685c1654add6524e71e77e6a183cc3056f2d6f7d92a99d913b468 | 17,534 | [
-1
] |
17,535 | colouring-new.lisp | rheaplex_rheart/draw-something/colouring-new.lisp | ;; colour-scheme.lisp - Colour scheme generation and application.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the... | 12,747 | Common Lisp | .lisp | 307 | 37.732899 | 79 | 0.675036 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | b8a50337f409118357f736ba4cd8c9226e7e0e3a75947bbcbdb0af374ff5e200 | 17,535 | [
-1
] |
17,536 | turtle.lisp | rheaplex_rheart/draw-something/turtle.lisp | ;; turtle.lisp - A classic, L-system style computer graphics turtle.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; th... | 3,221 | Common Lisp | .lisp | 69 | 41.478261 | 78 | 0.696053 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 12b4ed53075bedb8b309eba5d73fa37df16a964d91b1239c3340b9d5f4617c8b | 17,536 | [
-1
] |
17,537 | pen.lisp | rheaplex_rheart/draw-something/pen.lisp | ;; pen.lisp - The pen to draw around skeletal forms with.
;; Copyright (C) 2007 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Softw... | 6,359 | Common Lisp | .lisp | 139 | 35.870504 | 80 | 0.586907 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 1e6ed09f52ea6d91a41f9658b101ce7d05b4814d50c7b59be34b9dee0c4bf146 | 17,537 | [
-1
] |
17,538 | cell-matrix.lisp | rheaplex_rheart/draw-something/cell-matrix.lisp | ;; cell-matrix.lisp - A picture cell matrix.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundati... | 9,289 | Common Lisp | .lisp | 212 | 34.561321 | 78 | 0.573763 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 0e5605a0990c04e846b2c33cd6ecc44dd8a7d2b1e57788f838d49aa7930fcde9 | 17,538 | [
-1
] |
17,539 | utilities.lisp | rheaplex_rheart/draw-something/utilities.lisp | ;; utilities.lisp - Various utilities.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; ei... | 5,623 | Common Lisp | .lisp | 152 | 32.717105 | 78 | 0.660849 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | bd59177b6b7937e550679ed24d05e4f453a8c536187985ba1112bf1acbc52104 | 17,539 | [
-1
] |
17,540 | load.lisp | rheaplex_rheart/draw-something/load.lisp | ;; load.lisp - Load the asdf system.
;; Copyright (C) 2004 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; eit... | 1,354 | Common Lisp | .lisp | 41 | 31.902439 | 73 | 0.733028 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 80f00446f6a4b44e062140aacbfb774a672a9bd2cc452a47c82380e6922f2983 | 17,540 | [
-1
] |
17,541 | draw-something.lisp | rheaplex_rheart/draw-something/draw-something.lisp | ;; draw-something.lisp - The main lifecycle code for draw-something.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; t... | 1,929 | Common Lisp | .lisp | 43 | 42.232558 | 73 | 0.73883 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | 31afb948a27a577b66de0c4d56506f97e22ca81fd1eea4089a84f8cc00cbc26a | 17,541 | [
-1
] |
17,542 | drawing.lisp | rheaplex_rheart/draw-something/drawing.lisp | ;; drawing.lisp - A drawing.
;; Copyright (C) 2006 Rhea Myers rhea@myers.studio
;;
;; This file is part of draw-something.
;;
;; draw-something is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either vers... | 2,762 | Common Lisp | .lisp | 66 | 37.348485 | 77 | 0.697657 | rheaplex/rheart | 3 | 1 | 0 | GPL-3.0 | 9/19/2024, 11:27:44 AM (Europe/Amsterdam) | b2f86197cead6a2b55a89a916fcb805d5d4d83d149386ccef933686b83c8308d | 17,542 | [
-1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.