在“现实世界”中使用机器学习 应用领域

发布于 2024-07-25 08:31:05 字数 176 浏览 3 评论 0原文

我非常喜欢在大学学习机器学习。 我发现函数式编程通常是编写某些算法的一种令人耳目一新的优雅方式。 我听说过 F# 并尝试过它。 尽管如此,我还是用 ML 编写了一些有趣的函数,并希望将它们集成为可以在其他应用程序中使用的库。

通常我将函数粘贴到 SMLnj 解释器中。 有什么办法可以将它们编译下来吗?

I really liked learning ML at college. I find functional programming often a refreshingly elegant way to write certain algorithms. I have heard of F# and played around with that a bit. Still, I've written some interesting functions in ML and would like to integrate them as libraries I could use in other applications.

Usually I paste my functions into the SMLnj interpreter. Is there a way I can compile them down?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

无人问我粥可暖 2024-08-01 08:31:05

您必须使用MLj编译器之类的东西。 它编译为 Java 字节代码。 或者您可以使用 SML.NET 编译器编译为 .净IL。

You will have to use something like the MLj Compiler. It compiles to Java Byte code. Or you can use the SML.NET compiler to compile to .NET IL.

黒涩兲箜 2024-08-01 08:31:05

ML 双方都导出到 C,然后互相调用 C 函数,这是很常见的。 几乎所有东西都有一个 FFI 库,可以“轻松”导出到 C。

http:// /www.smlnj.org/doc/SMLNJ-C/index.html

因此,对于外界来说,你的 sml 库将表现得像 C 库,除非没有相关的段错误和内存泄漏*

*不能保证

It is common amongst ML for both sides to export to C and then call each others C functions. Just about everything has a FFI library for 'easily' exporting to C.

http://www.smlnj.org/doc/SMLNJ-C/index.html

so to the outside world your sml library would behave like a C library except with out the assiciated segfaults and memory leaks*

*not a guarantee

万人眼中万个我 2024-08-01 08:31:05

项目普及语言。 使用机器学习为有趣且无可否认的“酷”项目做好基础工作,人们就会涌向该语言。 例如,看看带有 ejabberd 和 mochiweb 的 Erlang——这两个很酷的项目都为像 erlang 这样的一次性钻石语言创造了奇迹(顺便说一句,这是我最近选择的开发语言)。 就我个人而言,我很高兴看到有人用机器学习做出一些精彩的东西,用这种语言思考是一种乐趣。

Projects popularize languages. Do the ground work for an interesting and undeniably 'cool' project using ML, and people will flock to the language. For instance,look at Erlang with ejabberd and mochiweb - both cool projects that have done wonders for a one-time-diamond-in-the-rough language like erlang (which is, btw, my development language of choice lately). I for one, would love to see somebody make something rad with ML, the language is a joy to think with.

z祗昰~ 2024-08-01 08:31:05

多个标准机器学习编译器。 MLton wiki 还包含一个基准

我使用了 Motorola ML,它将标准 ML 编译为字节码。 它并不快,但很有效。 MLton 通常被认为是效率方面最好的标准 ML 编译器。

There are several Standard ML compilers. The MLton wiki also contains a benchmark.

I used Moscow ML which compiles Standard ML into bytecode. It's not fast, but it works. MLton is often cited to be the best Standard ML compiler with regard to efficiency.

请注意,Poly/ML 版本 5 或更高版本支持传统的“堆转储”模型和 C 风格的独立可执行文件。 Poly/ML 网站 上的文档分布在许多不同的地方,其中一些标题中的日期非常旧——但这个系统仍然活跃且运转良好。

目标代码生成是通过传递 5.0 版本的 发行说明 来解释的(我们目前为 5.5):请参阅此处的 PolyML.export

还有一些Poly/ML C接口,最近已经被翻新用于一些GUI项目。 您应该在 Polyml 邮件列表中询问。

Note that Poly/ML version 5 or later supports both the traditional "heap dump" model, and C-style standalone executables. The documentation on the Poly/ML website is spread over many different spots, some of them with really old dates in the title -- but the system is alive and kicking.

The object-code generation is explained in passing in release notes for the version 5.0 release (we are presently at 5.5): see PolyML.export there.

There is also some Poly/ML C interface, which has been renovated as used for some GUI projects recently. You should ask at the polyml mailing list.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文