Skip to content

Conversation

@muehlhaus
Copy link
Member

Please reference the issue(s) this PR is related to
Closes #351

Please list the changes introduced in this PR

  • Decoupled vector and matrix representations from FSharp.Stats.
  • Integrated FsMath as the new lightweight, array-centric math backend.
  • Updated internal references in FSharp.Stats to use FsMath primitives for zero-friction integration.
  • Improved performance in core operations by leveraging FsMath’s optimized routines.

Description
This PR introduces a separation of concerns between statistical algorithms and low-level numerical primitives.
Vector and matrix types have been moved to the new FsMath library under FsLab.org, which is optimized for performance and designed for seamless interoperability.
This change keeps FSharp.Stats focused on statistical functionality while making it easier to maintain and integrate into other F# workflows that rely on common libraries.

Migration note
If your project uses Vector or Matrix types from FSharp.Stats, you will now need to reference FsMath and update your open statements accordingly:

open FsMath

All existing APIs are preserved with minimal changes, so most code will require slight modifications from vector to Vector<float> explicitly, along with namespace adjustments.
Previously, arrays needed to be explicitly converted to vectors - now, Array and Vector can be used synonymously, removing the need for manual conversions in most cases.

[Required] please make sure you checked that

  • The project builds without problems on your machine

[Optional]

  • Added unit tests regarding the added features

Copy link
Member

@bvenn bvenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took me a while to review this PR. The proposed changes are excellent and will improve the quality and conciseness of this project. Many thanks to @muehlhaus, @kMutagene and @ZimmerD! ❤️

Here are some comments (that do not stop me from approving this PR):

  • why is the GeneralisedLinearModel fs and docu removed?
  • if unused as @kMutagene suggested, could you remove the lapack dlls?
  • Should the outstanding PRs #348 and #350 be merged into datascience before merging into dev?
  • The release notes should be updated with the introduced changes. I'm happy to assist or create a first draft, but I assume you could summarise the changes more effectively. Please let me know which you would prefer.

@kMutagene
Copy link
Member

why is the GeneralisedLinearModel fs and docu removed?

@bvenn this is intended as that module is currently being moved into a separate repo according to @LibraChris.

I removed the native binaries, and @LibraChris will take a look at the 2 open PRs, but i think we should target a release very soon.

@kMutagene
Copy link
Member

The referenced PRs are closed, native binaries are removed, and i added some release notes.

I'll merge and release this as 1.0.0-preview.1 @bvenn 🎉

@kMutagene kMutagene merged commit 21c1d1b into developer Oct 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Rework Vector and Matrix representation

6 participants