Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement some metrics for series? #53

Closed
guigaoliveira opened this issue Sep 6, 2021 · 4 comments
Closed

implement some metrics for series? #53

guigaoliveira opened this issue Sep 6, 2021 · 4 comments

Comments

@guigaoliveira
Copy link
Contributor

I would suggest implementing some common metrics for time series:

  • Mean Squared Error (MSE)
  • Mean Absolute Error (MAE)
  • Root Mean Squared Error (RMSE)
  • Mean Absolute Percentage Error (MAP)
  • R-squared

The idea comes to use for forecasting applications.

** thinking about it, I thought there might be functions like sqrt (I know I can implement it by pow (..., 0.5) 😅) and log for series too.

** for inspiration https://scikit-learn.org/stable/modules/classes.html#regression-metrics

@cigrainger
Copy link
Member

cigrainger commented Sep 6, 2021

This is a pretty interesting one. I know that a scikit-learn equivalent for the Nx ecosystem is being worked on. I don't think Explorer is the right place for much of that functionality. However, there is a cost to copying data from its Rust representation to Elixir to then carry out these computations. I'll have to give it some thought.

@josevalim do you have an opinion on this? In R and Python you can typically pass a dataframe as the data for regression, and in an ideal situation (e.g. tidymodels) your output is a dataframe too. Forecasting/time series is another area where this kind of thing shines and you'd want to pass in a dataframe directly.

@josevalim
Copy link
Member

We are exploring something like scikit-learn on top of Nx, so it may be less general purpose than scikit-learn. It may also be worth it to have some of those ideas on top of explorer too, maybe in this or as a separate library. I think we don't need to make a decision for now and we can wait until things develop a bit. And of course, others are free to explore this too!

@seanmor5
Copy link

seanmor5 commented Sep 8, 2021

Just want to jump in and say I have been thinking about ways to marry Explorer and Axon. Specifically being able to pass in a Dataframe without having to convert to another representation and then getting a Dataframe back. But, perhaps there's another standard we can unify on within the ecosystem so that ML libraries like Axon and the scikit-learn equivalent can work with the same representations - that way we can pretty much plug-and-play with different models across libraries without having to worry about how data should be represented. And libraries like Explorer can have some idea of how data might be used later on.

Relevant issues in the ecosystem:

@cigrainger
Copy link
Member

As I believe https://github.com/elixir-nx/scholar will fill this niche (once we've implemented the Nx.Container protocol), I'm closing this as it won't live here.

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

No branches or pull requests

4 participants