News

Microsoft Aims F# at Machine Learning

Microsoft has updated its open source, cross-platform F# language for functional programming, adding new functionality and positioning it to tackle machine learning projects in the future.

In announcing the F# 4.6 update to the 14-year-old language, Microsoft detailed new features such as Anonymous Record types and previewed future work including the release of F# 5.0 and .NET Core 3.0, along with F# Interactive on .NET Core.

It then explained the third big milestone coming up: F# for machine learning. Although F# can already be used for Microsoft's ML.NET machine learning framework (just updated itself to release candidate status), there's more machine learning functionality in the works.

"Finally, we're also devoting significant time in developing a compelling offering for using F# to do machine learning. In addition to being supported on ML.NET, we're working towards a world-class experience when using F# and TensorFlow," Microsoft said.

The TensorFlow.FSharp GitHub project says it's a work in progress that features two components:

  • TensorFlow.FSharp: An F# API for TensorFlow
  • FM: A prototype of a DSL "F# for AI Models." This currently executes using TensorFlow.FSharp but could have additional backends such as DiffSharp.

"TensorFlow shape checking and shape inference tie quite nicely into the F# type system and tools, which we feel is a differentiator when compared to using Python, Swift, or Scala," the March 29 F# 4.6 announcement post continued. "This is still an active research area, but over time we expect the experience to become quite solid as F# Interactive experiences on .NET Core also shape up."

F# Interactive (fsi.exe) is used to run F# code interactively at the console, or to execute F# scripts.

As far as F# 4.6, Microsoft said the primary focus of the update is to boost performance, especially for medium-to-large sized solutions. Part of that work involved removing a workaround to a previous IntelliSense bug that actually "resulted in horrible performance characteristics."

"Other work included significant reductions in cache sizes, significant reductions in allocations when processing format strings, removing ambient processing of identifiers for suggestions when encountering a compile error, removing LOH allocations for F# symbols when they are finished being typechecked, and removing some unnecessary boxing of value types that are used in lots of IDE features," Microsoft said.

F# coders should also be aware of the increased cadence of F# tooling, including F# tools for Visual Studio, that will correspond to Visual Studio releases. "With this in mind, you can think of the Visual Studio 2019 release and future updates as a continuous evolution of F# tooling," Microsoft said.

The F# development process relies heavily upon open source community volunteers, and Microsoft noted that F# 4.6 was developed entirely through the open requests for comments (RFC) process, with F# 4.6 RFCs and FSharp.Core 4.6.0 RFCs available on GitHub.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events