fslaborg / Deedle

Easy to use .NET library for data and time series manipulation and for scientific programming
http://fslab.org/Deedle/
BSD 2-Clause "Simplified" License
924 stars 196 forks source link

Add Deedle.Math as separate package #475

Closed zyzhu closed 4 years ago

zyzhu commented 5 years ago

Related to discussion #423

My thoughts:

  1. Keep the current code in Stats module intact to prevent any breaking changes for now. When Deedle.Math is more mature, we can add Deprecated messages to functions in Stats module until we take it away. Or we could just keep it this way as native implementation does not require external dependency on Math.Net.
  2. Provide relevant functionalities that exist in Math.Net

There are some great prototypes on linear regression, PCA and ACF that @Ildhesten has written in Deedle.Extra repo. Will port them here in Deedle.Math. https://github.com/Ildhesten/Deedle.Extras/

Ildhesten commented 5 years ago

Hi there.

Great idea with a Deedle.Math package. Feel free to use whatever you can from my repo, and let me know if there is any way I can help out.

zyzhu commented 4 years ago

This pull is already big enough. It added a few items that can be expanded more in the future.

  1. Matrix dot functions and extensions between Frame, Series, Matrix and Vector. It is similar to dot operation in pandas. https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dot.html
  2. Apply existing linear algebra functions from MathNet.Numerics on Frame
  3. Descriptive stats function and covariance and correlation functions on Frame and Series
  4. A new Finance module for specific functions related to finance domain, such as ewmVol and ewmCov using RiskMetrics methods.

As for linear regression, I think a function similar to lm in R is very useful. It requires more thoughts on how to implement it. https://www.rdocumentation.org/packages/stats/versions/3.6.1/topics/lm

PCA and more time series analysis can be further developed in future pulls.