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

  • Copilot Engineering in the Cloud with Azure and GitHub

    Who better to lead a full-day deep dive into this tech than two experts from GitHub, which introduced the original "AI pair programmer" and spawned the ubiquitous Copilot moniker?

  • Uno Platform Wants Microsoft to Improve .NET WebAssembly in Two Ways

    Uno Platform, a third-party dev tooling specialist that caters to .NET developers, published a report on the state of WebAssembly, addressing some shortcomings in the .NET implementation it would like to see Microsoft address.

  • Random Neighborhoods Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the random neighborhoods regression technique, where the goal is to predict a single numeric value. Compared to other ML regression techniques, advantages are that it can handle both large and small datasets, and the results are highly interpretable.

  • As Some Orgs Restrict DeepSeek AI Usage, Microsoft Offers Models and Dev Guidance

    While some organizations are restricting employee usage of the new open source DeepSeek AI from a Chinese company due to data collection concerns, Microsoft has taken a different approach.

  • Useful New-ish Features in .NET/C#

    We often hear about the big new features in .NET or C#, but what about all of those lesser known, but useful new features? How exactly do you use constructs like collection indices and ranges, date features, and pattern matching?

Subscribe on YouTube

Upcoming Training Events