fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
205 stars 54 forks source link

[Feature Request] Add functions to parse matrices from files #185

Closed kMutagene closed 1 year ago

kMutagene commented 2 years ago

Is your feature request related to a problem? Please describe. There are no direct parsing functions for reading matrices from files.

Describe the solution you'd like Add such functions, see for example numpy.loadtxt() for reference

Describe alternatives you've considered Inefficient workarounds include parsing a dataframe with deedle, and doing some conversions. However, if the aim is to only work with the matrix anyway, this is absolutely unnecessary.

Frame.ReadCsv(myPath)
|> Frame.toJaggedArray
|> Matrix.ofJaggedArray