Perl Data Language
Developer | Karl Glazebrook, Jarle Brinchmann, Tuomas Lukka, and Christian Soeller |
---|---|
First appeared | 1996 |
Stable release | 2.080[1]
/ 28 May 2022 |
Cross-platform | |
License | GNU General Public License, Artistic License |
Website | pdl |
Influenced by | |
APL, IDL, Perl |
Perl Data Language (abbreviated PDL) is a set of
Language design
PDL is a vectorized
PDL borrows from Perl at least three basic types of program structure:
Graphics
True to the
I/O
PDL provides facilities to read and write many open data formats, including
Machine learning
PDL can be used for machine learning. It includes modules that are used to perform classic k-means clustering or general and generalized linear modeling methods such as ANOVA, linear regression, PCA, and logistic regression. Examples of PDL usage for regression modelling tasks include evaluating association between education attainment and ancestry differences of parents,[4] comparison of RNA-protein interaction profiles that needs regression-based normalization[5] and analysis of spectra of galaxies.[6]
perldl
An installation of PDL usually comes with an interactive shell known as perldl, which can be used to perform simple calculations without requiring the user to create a Perl program file. A typical session of perldl would look something like the following:
perldl> $x = pdl [[1, 2], [3, 4]];
perldl> $y = pdl [[5, 6, 7],[8, 9, 0]];
perldl> $z = $x x $y;
perldl> p $z;
[
[21 24 7]
[47 54 21]
]
The commands used in the shell are Perl statements that can be used in a program with PDL
module included. x
is an
p
in the last command is a shortcut for print
.
Implementation
The core of PDL is written in C. Most of the functionality is written in PP, a PDL-specific metalanguage that handles the vectorization of simple C snippets and interfaces them with the Perl host language via Perl's XS compiler. Some modules are written in Fortran, with a C/PP interface layer. Many of the supplied functions are written in PDL itself. PP is available to the user to write C-language extensions to PDL. There is also an Inline module (Inline::Pdlpp) that allows PP function definitions to be inserted directly into a Perl script; the relevant code is low-level compiled and made available as a Perl subroutine.
The PDL API uses the basic Perl 5 object-oriented functionality: PDL defines a new type of Perl scalar object (
See also
References
- ^ Error: Unable to display the reference properly. See the documentation for details.
- ^ "Putting Perl Back on Top in the Fields of Scientific and Financial Computing".
- ^ "PDL online documentation (PDL::Threading section)".
- PMID 25734509.
- PMID 24398258.
- Bibcode:2016RMxAA..52...21S.