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

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube