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

Add Statistical Functions to Paddle Frontend #15045

Open
hmahmood24 opened this issue May 8, 2023 · 3 comments
Open

Add Statistical Functions to Paddle Frontend #15045

hmahmood24 opened this issue May 8, 2023 · 3 comments
Assignees
Labels
hacktoberfest hacktoberfest Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist ToDo A ToDo list of tasks

Comments

@hmahmood24
Copy link
Contributor

hmahmood24 commented May 8, 2023

Add Statistical Functions to PaddlePaddle Frontend

Please keep in mind that the proper way to link an issue to this list is to comment "- [ ] #issue_number" while the issue's title only includes the name of the function you've chosen.

ivy/functional/frontends/paddle/stat.py
ivy\_tests/test\_ivy/test\_frontends/test\_paddle/test\_stat.py

@hmahmood24 hmahmood24 added Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist ToDo A ToDo list of tasks labels May 8, 2023
@hmahmood24 hmahmood24 self-assigned this May 8, 2023
@ivy-llc ivy-llc deleted a comment from KSANTHOSH200 May 14, 2023
@ivy-llc ivy-llc deleted a comment from darleybarreto May 15, 2023
@ivy-llc ivy-llc deleted a comment from KSANTHOSH200 May 19, 2023
@ivy-llc ivy-llc deleted a comment from SANTHOSHKAKARLA May 23, 2023
@ivy-llc ivy-llc deleted a comment from KSANTHOSH200 May 23, 2023
@ivy-llc ivy-llc deleted a comment from KSANTHOSH200 May 23, 2023
@ivy-llc ivy-llc deleted a comment from mawhab Jun 7, 2023
@hmahmood24 hmahmood24 changed the title Add paddle.tensor.stat Statistical Functions to PaddlePaddle Frontend Add paddle.tensor.stat Statistical Functions to Paddle Frontend Jun 12, 2023
@ivy-llc ivy-llc deleted a comment from geeythree Jun 19, 2023
@ivy-llc ivy-llc deleted a comment from m7mdemad Jul 5, 2023
@ivy-llc ivy-llc deleted a comment from supreer Jul 13, 2023
@Aayushkumr Aayushkumr mentioned this issue Jul 14, 2023
@ivy-llc ivy-llc deleted a comment from elabongaatuo Jul 27, 2023
@ivy-llc ivy-llc deleted a comment from OkeyAmy Aug 11, 2023
This was referenced Aug 12, 2023
@ivy-llc ivy-llc deleted a comment from sumayyahc1 Aug 17, 2023
This was referenced Aug 17, 2023
@ivy-llc ivy-llc deleted a comment from Sarvesh-Kesharwani Aug 17, 2023
@AnnaTz AnnaTz changed the title Add paddle.tensor.stat Statistical Functions to Paddle Frontend Add Statistical Functions to Paddle Frontend Sep 8, 2023
@owoeye-babatunde
Copy link

#15045

@lucrieffel
Copy link

lucrieffel commented Sep 16, 2023

Added quantile function:
@with_supported_dtypes({"float32","float64"})
@to_ivy_arrays_and_back
def quantile(x, q, axis=None, keepdim=False, name=None):
x = ivy.cast(x, ivy.float64) if ivy.dtype(x) == 'float64' else ivy.cast(x, ivy.float32)
sorted_x = ivy.sort(x, axis=axis)
rank = (ivy.shape(sorted_x, axis=axis) - 1) * q
rank_int = ivy.floor(rank)
rank_frac = rank - rank_int
lower_values = ivy.gather(sorted_x, ivy.cast(rank_int, ivy.int32), axis=axis)
upper_values = ivy.gather(sorted_x, ivy.cast(rank_int + 1, ivy.int32), axis=axis)
quantile_value = lower_values + rank_frac * (upper_values - lower_values)
if not keepdim:
quantile_value = ivy.squeeze(quantile_value, axis=axis)

  return quantile_value

@a0m0rajab a0m0rajab added the hacktoberfest hacktoberfest label Sep 25, 2023
@Maxwel-ondieki
Copy link

#19176

@ivy-llc ivy-llc locked and limited conversation to collaborators Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hacktoberfest hacktoberfest Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist ToDo A ToDo list of tasks
Projects
None yet
Development

No branches or pull requests

7 participants