Statistical Machine Intelligence & Learning Engine
SMILE (Statistical Machine Intelligence & Learning Engine) is a comprehensive, high-performance machine learning framework for the JVM. SMILE v5+ requires Java 25; v4.x requires Java 21; all previous versions require Java 8. SMILE also provides idiomatic APIs for Scala and Kotlin. With advanced data structures and algorithms, SMILE delivers state-of-the-art performance across every aspect of machine learning.
SMILE Studio is an agentic IDE for data science using Python, Java, or Scala. See studio/README.md how to get your first project up and start interacting with your data with natural language in a few minutes.
Each module has its own detailed user guide. Click the README link for the module overview, or drill into individual topic guides.
base/ — FoundationDocument Topics README Module overview and dependency setup DATA_FRAME.md DataFrame API — creation, selection, transformation DATA_IO.md CSV, JSON, Parquet, Arrow, JDBC, Avro readers/writers DATA_TRANSFORMATION.md Scalers, encoders, imputers, feature transforms DATASET.md Built-in benchmark and real-world datasets FORMULA.md R-style formula language for model matrices DISTRIBUTIONS.md Probability distributions (Normal, Poisson, Beta, …) HYPOTHESIS_TESTING.md t-test, chi-squared, ANOVA, KS-test, … DISTANCES.md Euclidean, Mahalanobis, Hamming, edit distance, … NEAREST_NEIGHBOR.md KD-Tree, Cover Tree, BK-Tree, LSH KERNELS.md Gaussian, polynomial, Laplacian, and other kernel functions RBF.md Radial basis function networks INTERPOLATION.md Linear, cubic spline, bilinear, bicubic GRAPH.md Adjacency list/matrix graph, BFS/DFS, spanning trees SORT.md Quick sort, heap sort, counting sort, index sort HASH.md Locality-sensitive hashing, SimHash RNG.md Random number generators, sampling, permutations BFGS.md L-BFGS and BFGS numerical optimizers ICA.md Independent Component Analysis TENSOR.md N-dimensional array (CPU tensor without LibTorch) WAVELET.md DWT, CWT, and wavelet families GAP.md GAP statistic for optimal cluster count estimation COMPRESSED_SENSING.md Compressed sensing and basis pursuitData structures, math, linear algebra, statistical utilities, I/O
core/ — Machine Learning AlgorithmsDocument Topics README Module overview CLASSIFICATION.md SVM, Random Forest, AdaBoost, GBDT, KNN, Naïve Bayes, LDA, … REGRESSION.md SVR, Gaussian Process, LASSO, Ridge, ElasticNet, GBDT, … CLUSTERING.md K-Means, DBSCAN, BIRCH, SOM, Spectral Clustering, … FEATURE_ENGINEERING.md Feature selection, PCA, ICA, projection, encoding MANIFOLD.md t-SNE, UMAP, IsoMap, LLE, Laplacian Eigenmap ANOMALY_DETECTION.md IsolationForest, one-class SVM, local outlier factor ASSOCIATION_RULE_MINING.md FP-growth, association rules, frequent itemsets SEQUENCE.md HMM (Baum-Welch, Viterbi), CRF TIME_SERIES.md ARIMA, box-plots, autocorrelation REGRESSION.md Full regression API reference TRAINING.md Cross-validation, bootstrap, hyper-parameter search VALIDATION.md Hold-out, k-fold, leave-one-out evaluation VALIDATION_METRICS.md Accuracy, AUC, F1, RMSE, MAE, confusion matrix HYPER_PARAMETER_OPTIMIZATION.md Grid search, random search, Bayesian optimization VECTOR_QUANTIZATION.md LVQ, Neural Gas, SOM as vector quantizers ONNX.md Exporting and importing models via ONNXClassification, regression, clustering, manifold learning, and more
deep/ — Deep Learning & LLMsDocument Topics README Full deep-learning & LLM user guide (tensors, layers, loss, optimizer, EfficientNet, LLaMA)LibTorch-backed GPU/CPU tensor operations, neural network layers, LLaMA-3 inference, EfficientNet
The deep/README.md covers:
smile.deep.tensor — Tensor factory, indexing, arithmetic, AutoScope memory management, dtype/devicesmile.deep.layer — Linear, Conv2d, pooling, normalization (BN/GN/RMS), dropout, embedding, sequential blockssmile.deep.activation — ReLU, GELU, SiLU, Tanh, Sigmoid, Softmax, GLU, HardShrink, …smile.deep.Loss — MSE, cross-entropy, BCE, Huber, KL, hinge, and moresmile.deep.Optimizer — SGD, Adam, AdamW, RMSpropsmile.deep.Model — Abstract base class + training loopsmile.deep.metric — Accuracy, Precision, Recall, F1Score with macro/micro/weighted averagingsmile.llm — Message, Role, FinishReason, ChatCompletion records; sinusoidal & RoPE positional encodingssmile.llm.tokenizer — Tokenizer interface, Tiktoken BPE implementation (LLaMA-3 compatible)smile.llm.model.llama — Full LLaMA-3 stack: Llama.build(), generate(), chat(), streaming via SubmissionPublishersmile.vision — VisionModel, ImageDataset, EfficientNet.V2S/M/L() pretrained models, ImageNet labelssmile.vision.transform — Transform interface, ImageClassification pipeline, resize/crop/toTensor helpersnlp/ — Natural Language ProcessingDocument Topics README Module overview TOKENIZER.md Sentence splitter, word tokenizer, regex tokenizer POS.md Part-of-speech tagging (Brill tagger, HMM tagger) STEM.md Porter, Lancaster, Lovins stemmers; lemmatization COLLOCATION.md Bigram/trigram statistical tests, phrase extraction RELEVANCE.md TF-IDF, BM25, keyword extraction TAXONOMY.md WordNet integration, synsets, hypernymsText normalization, tokenization, POS tagging, stemming, relevance ranking
plot/ — Data VisualizationDocument Topics README Swing plotting API — scatter, line, bar, box, histogram, heatmap, surface, contour, wireframe VEGA.md DeclarativeSwing-based interactive plots and declarative Vega-Lite charts
smile.plot.vega (Vega-Lite) — JSON spec generation, web/Jupyter rendering
serve/ — Inference ServerDocument Topics README Building and running the server,Quarkus-based REST inference service with OpenAI-compatible API and SSE streaming
/chat/completions endpoint, SSE streaming, configuration
studio/ — Interactive Shell & Desktop IDEDocument Topics README.md Desktop Studio UX CLI CLI entry points (An agentic IDE for data science using Python or SMILE
smile, smile shell, smile scala, smile serve)
scala/ — Scala APIDocument Topics README API overview,Idiomatic Scala shim — concise wrappers, symbolic operators, Scala collections integration
smile.classification, smile.regression, smile.clustering, smile.plot in Scala
kotlin/ — Kotlin APIDocument Topics README API overview, extension functions, Kotlin-style builders packages.md Full package-by-package listing of all Kotlin extension functionsIdiomatic Kotlin shim — extension functions, named parameters, builder DSLs
json/ — JSON Library (Scala)Document Topics README Parsing, building, pattern matching, path navigation, serializationLightweight zero-dependency JSON library for Scala with a clean DSL
spark/ — Apache Spark IntegrationDocument Topics READMEUse SMILE models inside Spark ML pipelines
SmileTransformer, SmileClassifier, SmileRegressor; training and scoring in Spark DataFrames
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-core</artifactId>
<version>6.3.0</version>
</dependency>
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-deep</artifactId>
<version>6.3.0</version>
</dependency>
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-nlp</artifactId>
<version>6.3.0</version>
</dependency>
<dependency>
<groupId>com.github.haifengl</groupId>
<artifactId>smile-plot</artifactId>
<version>6.3.0</version>
</dependency>
libraryDependencies += "com.github.haifengl" %% "smile-scala" % "6.3.0"
dependencies {
implementation("com.github.haifengl:smile-kotlin:6.3.0")
}
No open issues yet, or sync has not completed.