3.20.0. Operations on Lists of Numbers |

These are functions that operate on list of numbers interpreted as vectors of real numbers. They are provided mostly for convenience (and for historical reasons), but are largely obsolete. Serious vector computation should be performed using the much more powerful matrix/tensor engine, rather than with these list functions.

3.20.0.0. (add-lists l1 l2) |
[DX] |

Return the list of the sums term by term of the elements of lists

(mapcar '+ l1 l2)

3.20.0.1. (diff-lists l1 l2) |
[DX] |

Return the list of the differences term by term of the elements of lists

(mapcar '- l1 l2)

3.20.0.2. (abs-dist l1 [l2]) |
[DX] |

Returns the absolute (L1) distance between the lists of numbers

If argument **l2 **is omitted, a lists of
zeros is assummed.

Example:

? (abs-dist (range 1 10)) = 55

3.20.0.3. (sqr-dist l1 [l2]) |
[DX] |

Returns the squared (L2) distance between the lists of numbers

If argument **l2 **is omitted, a lists of
zeros is assummed.

3.20.0.4. (sup-dist l1 [l2]) |
[DX] |

Returns the supremum (L_infinity) distance between the lists of numbers

If argument **l2 **is omitted, a lists of
zeros is assummed.

3.20.0.5. (mean-abs-dist l1 [l2]) |
[DE] (sysenv.lsh) |

See: (abs-dist

Returns the average absolute distance between elements of **
l1 **and **l2 **. This is defined
as the absolute distance divided by the number of elements in lists **
l1 **and **l2 **.

3.20.0.6. (mean-sqr-dist l1 [l2]) |
[DE] (sysenv.lsh) |

See: (sqr-dist

Returns the average squared distance between elements of

3.20.0.7. (mean-sup-dist l1 [l2]) |
[DE] (sysenv.lsh) |

See: (sup-dist

Returns the average supremum distance between elements of

3.20.0.8. (hamming-dist [margin] l1 [l2]) |
[DX] |

Returns the number of elements of

If argument **l2 **is omitted, a list of
zeroes is assumed.

The default value for **margin **is **
0 **. In this case **hamming-dist **
returns the number of elements strictly different in **
l1 **and **l2 **.

3.20.0.9. (quadrant-dist l1 l2) |
[DX] |

Returns the number of elements of

3.20.0.10. (mean-hamming-dist [margin] l1 [l2]) |
[DE] (sysenv.lsh) |

See: (hamming-dist [

Returns the averaged hamming distance between lists

3.20.0.11. (mean-quadrant-dist l1 l2) |
[DE] (sysenv.lsh) |

See: (quadrant-dist

Returns the averaged quadrant distance between lists

3.20.1. Statistical Functions on Lists of Numbers |

These are functions that operate on list of numbers. They are provided mostly for convenience (and for historical reasons) and are largely obsolete. Serious statistical computation should be performed using the much more powerful matrix/tensor engine, rather than with these list functions.

3.20.1.0. (sup l) |
[DX] |

Return the largest element of the list

Example:

? (sup (range 1 10)) = 10

3.20.1.1. (inf l) |
[DX] |

Return the smallest element of the list

Example:

? (inf (range 1 10)) = 1

3.20.1.2. (rank list target [width]) |
[DX] |

Returns the list of the indices of the elements of

Example:

? (de rank-of-max(l) (car (rank l (sup l))) ) = rank-of-max ? (rank-of-max '(2 1 4 5 -4 -3 -2) ) = 3

3.20.1.3. (mean l) |
[DX] |

Returns the average of the elements of list

Example:

? (mean (range 1 10)) = 5.5

3.20.1.4. (median l) |
[DX] |

Returns the median of the elements of list

Example:

? (median (append (range 5 30 2) (range 1 10))) = 9

3.20.1.5. (ksmallest l k) |
[DX] |

Returns the

Example:

? (ksmallest (append (range 5 30 2) (range 1 10)) 10) = 8

3.20.1.6. (quantile l f) |
[DX] |

Returns the

Example:

? (quantile (append (range 5 30 2) (range 1 10)) 0.9) = 25

3.20.1.7. (sdev l) |
[DX] |

Returns the standard deviation of the elements of list

Example:

? (sdev (range 1 100)) = 28.8661

3.20.1.8. (cov ly lx) |
[DX] |

Returns the covariance of the elements of list

Example:

? (cov (range 1 10) (range 11 30 2)) = 16.5

3.20.1.9. (regression lx ly) |
[DX] |

Simple monovariate linear regression.

Arguments **lx **and **
ly **are two lists of numbers. Function **
regression **returns a list of the form **
(A B R) **.

- The function
**y=Ax+B**is then the best linear approximation of dependencies between lists**lx**and**ly**.

- The correlation coefficient
**R**measures the fit of the approximation. The closer**R**is to 1, the better the approximation is.

Example:

? (regression (range 1 10) (range 11 30 2)) = (2 9 1)

3.20.1.10. (x-estimate lr y) |
[DE] (sysenv.lsh) |

See: (regression

Given the result list

3.20.1.11. (y-estimate lr x) |
[DE] (sysenv.lsh) |

See: (regression

Given the result list

3.20.1.12. (sum l) |
[DX] |

Returns the sum of the elements of the list

Example:

? (sum (range 1 10)) = 55