All examplesNeural networks Install Aner
Classifying Wine measurements
Use the same concise pipeline with 13 features and the attributed UCI Wine recognition dataset.
Download .aner source// Wine: Aeberhard & Forina (1992), UCI, CC BY 4.0. See THIRD_PARTY_DATA.md.
// An educational configuration, not an accuracy or performance benchmark.
import aner.dataset
import aner.nn
import aner.ml
let wine = dataset.wine()
let split = wine.split(test: 0.2, seed: 2026)
let network = nn.sequential(seed: 42)
.dense(inputs: 13, outputs: 16)
.tanh()
.dense(inputs: 16, outputs: 3)
let pipeline = ml.classifier(network, standardize: true)
let fitted = pipeline.fit(split.train(), epochs: 1000, rate: 0.05)
print(fitted.evaluate(split.test()).summary())
Make it your experiment.
With Aner installed, save this program as examples/neural_wine_concise.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.
aner check examples/neural_wine_concise.aner
aner run examples/neural_wine_concise.anerThe aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.
Iris and Wine are teaching datasets with their own attribution. Example outcomes are not comparative benchmarks or evidence of clinical validity.
Dataset sources & attribution