Language
Julia
- First appeared
- 2012
- Paradigm
- Multi-paradigm (multiple dispatch, functional, imperative)
- Toolchain
- Julia 1.13.3
- Container image
julia:1.13.3-trixie
Julia was designed for scientific computing, to be easy to write and fast
to run: it compiles each function the first time it’s called. Its data science
tools, such as DataFrames.jl, CSV.jl, and GLM.jl, are packages installed
with Julia’s package manager, Pkg. None is installed here, and the tests run
without a network, so only Base and the standard library are available.
That library already covers a lot: the backslash operator solves least
squares, and Statistics has mean, median, var,
std, and cor. The from-scratch versions skip them so the arithmetic
stays visible.
Quirks
- A dot applies an operation to every element:
x .- 1subtracts 1 from each value, andsigmoid.(z)callssigmoidon each one. Plainx - 1is aMethodError. - Arrays are indexed from 1, as in R.
/always gives a float, so7 / 2is3.5;÷is integer division.expof a square matrix is the matrix exponential, notexpof each element; that needsexp.(M).- The standard library has no CSV parser, so implementations here split each line on commas.
Concepts in Julia
- Cross-validation
- Decision tree
- Descriptive statistics
- k-means clustering
- k-nearest neighbors
- Linear regression
- Logistic regression
- Naive Bayes
- Principal component analysis
- Descriptive statistics (built-in)
- Principal component analysis (built-in)
Run the examples locally
You need Docker and Python 3. The harness builds the pinned container and runs every Julia example:
git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language julia