Smile 一个快速而全面的机器学习引擎

运行速度

凭借先进的数据结构和算法,Smile 提供了最先进的性能。

相比于第三方的测试 benchmark, 的性能明显优于 R、Python、Spark、H2O 和 xgboost。微笑是好几次 比最接近的竞争对手更快。内存使用也非常有效。如果我们能训练 PC 上的高级机器学习模型,为什么要购买集群?

训练时间 (秒级)

易用性

使用 Java、Scala 或任何 JVM 语言快速编写应用程序。 数据科学家和开发人员现在可以说同一种语言了!

Smile provides hundreds advanced algorithms with clean interface. Scala/Kotlin ASmile 提供了数百种具有简洁界面的高级算法。Scala/Kotlin API 还提供高级运算符,使构建机器学习应用程序变得容易。 您可以从 shell 中以交互方式使用它,嵌入在 Scala 中。


var iris = Read.arff("iris.arff");

var model = RandomForest.fit(Formula.lhs("class"), iris);

println(model.metrics());
          
DataFrame, Model Fitting, and Metrics

val iris = read.arff("iris.arff")

val model = randomForest("class" ~, iris)

println(model.metrics)

          
DataFrame, Model Fitting, and Metrics

val iris = read.arff("iris.arff")

val model = randomForest(Formula.lhs("class"), iris)

println(model.metrics())
          
DataFrame, Model Fitting, and Metrics

(let [iris (read-arff
            "data/weka/iris.arff")
      model (random-forest
             (Formula/lhs "class") iris)]
  (.metrics model))

          
DataFrame, Model Fitting, and Metrics

var iris = Read.arff("iris.arff")

var model = RandomForest.fit(Formula.lhs("class"), iris)

println model.metrics()
          
DataFrame, Model Fitting, and Metrics

全面

最完整的机器学习引擎。Smile 涵盖了机器学习的各个方面。

LLM、计算机视觉、深度学习、分类、回归、聚类、关联规则挖掘、特征选择、 流形学习 多维标度 遗传算法 缺失值插补 / 高效的最近邻搜索等。有关可用算法的列表,请参阅侧边栏。

自然语言处理

Understanding human language, and the intent behind our words.

在 JVM 上使用 Llama 3 的 GenAI(更多内容即将推出)。Smile 还包括许多经典的 NLP 算法,如词器、词干提取、词向量、短语检测、词性标注、关键词提取、命名实体识别、情感分析、相关性排序分类等。

数学和统计

Hidden gems in Smile.

从特殊函数、线性代数到随机数生成器、统计分布和假设检验,Smile 提供了一个先进的数值计算。此外,还实现了图形、小波和各种插值算法。Smile 甚至包含一个计算代数系统。


var A = Matrix.randn(3, 3);
double[] x = {1.0, 2.0, 3.0};
var lu = A.lu();
lu.solve(x);
lu.inverse().mm(A);
          
线性代数

int[] bins1 = {8, 13, 16, 10, 3};

int[] bins2 = {4,  9, 14, 16, 7};

Hypothesis.chisq.test(bins1, bins2);
          
统计学

val x = Var("x")
val y = Var("y")
val e = x**2 + y**3 + x**2 * cot(y**3)
val dx = e.d(x)
println(dx)
          
计算几何系统

数据可视化

Interactive 2D/3D math plot.

散点图、折线图、阶梯图、柱状图、箱线图、热力图、六边形图、直图、QQ 图、曲面图、 网格图、等高线图、树状图、稀疏矩阵可视化、铁丝网等。Smile 还支持声明式数据可视化,可以编译为 Vega-Lite.

Fork me on GitPP