This is the select Reference Manual, version 1.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 19:32:54 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
select
DSL for array and data-frame slices
Slicing and selection library for Data Frames
Steve Nunez <steve@symbolics.tech>
(GIT git://github.com/Lisp-Stat/select)
MS-PL
Select is a facility for selecting portions of sequences, arrays or data-frames. It provides:
An API for taking slices (elements selected by the Cartesian product of vectors of subscripts for each axis) of array-like objects. The most important function is ‘select‘. Unless you want to define additional methods for ‘select‘, this is pretty much all you need from this library. See the documentation at https://lisp-stat.github.io/select/ for a tutorial.
An extensible DSL for selecting a subset of valid subscripts. This is useful if, for example, you want to resolve column names in a data frame in your implementation of slice.
A set of utility functions for traversing slices in array-like objects.
1.2.0
alexandria
(system).
alexandria+
(system).
anaphora
(system).
let-plus
(system).
pkgdcl.lisp
(file).
select-dev.lisp
(file).
select.lisp
(file).
sample.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
select/select-dev.lisp
pkgdcl.lisp
(file).
select
(system).
all-singleton-representations?
(function).
axis-dimension
(generic function).
canonical-range
(function).
canonical-range
(structure).
canonical-representation
(generic function).
canonical-representations
(function).
canonical-sequence
(function).
canonical-sequence
(structure).
canonical-singleton
(function).
column-major-setup
(function).
representation-dimensions
(function).
row-major-setup
(function).
select-reserved-symbol?
(function).
singleton-representation?
(function).
traverse-representations
(macro).
canonical-range-end
(reader).
(setf canonical-range-end)
(writer).
canonical-range-p
(function).
canonical-range-start
(reader).
(setf canonical-range-start)
(writer).
canonical-sequence-p
(function).
canonical-sequence-vector
(reader).
(setf canonical-sequence-vector)
(writer).
copy-canonical-range
(function).
copy-canonical-sequence
(function).
make-canonical-range
(function).
make-canonical-sequence
(function).
representation-dimension
(function).
representation-initial-value
(function).
representation-iterator
(function).
select/select.lisp
select-dev.lisp
(file).
select
(system).
canonical-representation
(method).
canonical-representation
(method).
canonical-representation
(method).
including
(function).
including
(structure).
mask
(generic function).
nodrop
(function).
nodrop
(structure).
range
(function).
range
(structure).
ref
(generic function).
(setf ref)
(generic function).
select
(generic function).
(setf select)
(generic function).
which
(generic function).
copy-including
(function).
copy-nodrop
(function).
copy-range
(function).
head
(function).
including-end
(reader).
(setf including-end)
(writer).
including-p
(function).
including-start
(reader).
(setf including-start)
(writer).
make-including
(function).
make-nodrop
(function).
make-range
(function).
nodrop-index
(reader).
(setf nodrop-index)
(writer).
nodrop-p
(function).
range-end
(reader).
(setf range-end)
(writer).
range-p
(function).
range-start
(reader).
(setf range-start)
(writer).
tail
(function).
select/sample.lisp
select.lisp
(file).
select
(system).
sample
(generic function).
+alpha+
(constant).
collect-sample
(function).
generate-index-array
(function).
generate-index-array/replacement
(function).
map-random-below
(function).
uniformrv
(function).
vitter-method-a
(function).
vitter-method-d
(function).
Packages are listed by definition order.
select-dev
SELECT-DEV is used to implement SELECT operations on data structures other than arrays.
alexandria
.
alexandria+
.
anaphora
.
common-lisp
.
let-plus
.
all-singleton-representations?
(function).
axis-dimension
(generic function).
canonical-range
(function).
canonical-range
(structure).
canonical-representation
(generic function).
canonical-representations
(function).
canonical-sequence
(function).
canonical-sequence
(structure).
canonical-singleton
(function).
column-major-setup
(function).
representation-dimensions
(function).
row-major-setup
(function).
select-reserved-symbol?
(function).
singleton-representation?
(function).
traverse-representations
(macro).
canonical-range-end
(reader).
(setf canonical-range-end)
(writer).
canonical-range-p
(function).
canonical-range-start
(reader).
(setf canonical-range-start)
(writer).
canonical-sequence-p
(function).
canonical-sequence-vector
(reader).
(setf canonical-sequence-vector)
(writer).
copy-canonical-range
(function).
copy-canonical-sequence
(function).
make-canonical-range
(function).
make-canonical-sequence
(function).
representation-dimension
(function).
representation-initial-value
(function).
representation-iterator
(function).
select
SELECT is a facility for selecting portions of sequences or arrays.
slct
alexandria
.
alexandria+
.
anaphora
.
common-lisp
.
let-plus
.
select-dev
.
including
(function).
including
(structure).
mask
(generic function).
nodrop
(function).
nodrop
(structure).
range
(function).
range
(structure).
ref
(generic function).
(setf ref)
(generic function).
sample
(generic function).
select
(generic function).
(setf select)
(generic function).
which
(generic function).
+alpha+
(constant).
collect-sample
(function).
copy-including
(function).
copy-nodrop
(function).
copy-range
(function).
generate-index-array
(function).
generate-index-array/replacement
(function).
head
(function).
including-end
(reader).
(setf including-end)
(writer).
including-p
(function).
including-start
(reader).
(setf including-start)
(writer).
make-including
(function).
make-nodrop
(function).
make-range
(function).
map-random-below
(function).
nodrop-index
(reader).
(setf nodrop-index)
(writer).
nodrop-p
(function).
range-end
(reader).
(setf range-end)
(writer).
range-p
(function).
range-start
(reader).
(setf range-start)
(writer).
tail
(function).
uniformrv
(function).
vitter-method-a
(function).
vitter-method-d
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Loops over all possible subscripts in REPRESENTAITONS, making them available in SUBSCRIPTS during the execution of BODY. The iterator is constructed using the function SETUP (see for example ROW-MAJOR-SETUP). When INDEX is given, a variable with that name is provided, containing an index that counts iterations.
Test if all canonical representations are singletons.
Canonical representation of a contiguous set of array indices from START (inclusive) to END (exclusive).
Return the canonical representations of SELECTIONS given the corresponding AXES, checking for matching length.
Canonical representation of array indexes from canonical-sequence SEQUENCE.
May share structure. Vectors of the upgraded type of (SIMPLE-ARRAY ARRAY-INDEX (*)) are preferred for efficiency, otherwise they are coerced.
Canonical representation of a singleton index (a nonnegative integer, which is a valid array index).
Return SUBSCRIPTS (a list) and ITERATOR (a closure, no arguments) that increments the contents of SUBSCRIPTS in column-major order. TERMINATOR is called when all subscripts have been visited.
Range, including both ends.
Select a single index, but do not drop a dimension.
Range, including START, excluding END.
Return a list for the dimensions of canonical representations, dropping singletons.
Return SUBSCRIPTS (a list) and ITERATOR (a closure, no arguments) that increments the contents of SUBSCRIPTS in row-major order. TERMINATOR is called when all subscripts have been visited.
Test if SYMBOL has special semantics for SELECTION.
Test if a canonical REPRESENTATION is a singleton.
Return the dimension of axis. Needs to be defined for non-integer axes.
Canonical representation of SELECTION, given information in AXIS. The default methods use dimensions as AXIS.
Each selection needs to be resolved into a canonical representation, which is either a singleton, a range, or a sequence of subscripts. They should only be constructed with the corresponding CANONICAL-SINGLETION, CANONICAL-RANGE and CANONICAL-SEQUENCE functions.
@c(CANONICAL-REPRESENTATION) needs to ensure that the represented subscripts are valid for the axis.
Unless a specialized method is found, the dimension of the axis is queried with AXIS-DIMENSION and resolution is attempted using the latter. Methods that resolve symbols should test them with SELECT-RESERVED-SYMBOL? and use CALL-NEXT-METHOD.
nodrop
)) ¶The canonical representation for NODROP.
range
)) ¶The canonical representation for RANGE.
including
)) ¶The canonical representation for INCLUDING.
canonical-range
)) ¶canonical-sequence
)) ¶integer
) (slice null
)) ¶integer
) (selection integer
)) ¶sequence
)) ¶integer
) (selection (eql t)
)) ¶bit-vector
)) ¶Map sequence into a simple-bit-vector, using 1 when PREDICATE yields true, 0 otherwise.
sequence
) predicate) ¶Return the element of OBJECT specified by SUBSCRIPTS.
array
) &rest subscripts) ¶Stores VALUE into the place specified by SUBSCRIPTS.
array
) &rest subscripts) ¶Return a random sample of SEQ of size N.
If WITH-REPLACEMENT is true, return a random sample with
replacement (a "draw").
If WITH-REPLACEMENT is false, return a random sample without
replacement (a "deal").
If SKIP-UNSELECTED is non-NIL, do not return the elements of DF that we not part of the selection. Non-NIL by default, as the typical use case is to split a data set into training and test data sets.
Return the slices of OBJECT specified by SELECTIONS.
Stores VALUES into the locations given by SELECTIONS.
Return an index of the positions in SEQUENCE which satisfy PREDICATE. Defaults to return non-NIL indices.
sequence
) &key predicate) ¶Canonical representation of a contiguous set of array indices from START (inclusive) to END (exclusive).
Canonical representation of a sequence of array indexes.
structure-object
.
common-lisp
.
(simple-array alexandria:array-index (*))
Range, including both ends.
Select a single index, but don’t drop a dimension.
structure-object
.
Range, including start, excluding end.
The parameter that decides whether to use method A or method D. Typical values of α are in the range 0.05-0.15.
end
.
First COUNT indexes.
end
.
Generate N random indices for a sequence of length LEN, in ascending order, calling FN on each index as it is generated.
end
.
Return the dimension of a canonical-representation, or NIL for singleton selections (they are dropped).
Initial value for iteration.
Return a closure that sets the car of CONS to the next value each time it is called, resetting and calling CARRY when it reaches the end of its range.
Last COUNT indexes.
Vitter’s Method A.
Mostly faithful to Vitter’s Pascal code, but uses advanced Common Lisp features like exponents and subtraction.
Vitter’s Method D
Jump to: | (
A C F G H I M N R S T U V W |
---|
Jump to: | (
A C F G H I M N R S T U V W |
---|
Jump to: | +
C E I S V |
---|
Jump to: | +
C E I S V |
---|
Jump to: | C F I N P R S |
---|
Jump to: | C F I N P R S |
---|