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

752 one hot and bin functions in daphne lib #760

Merged

Conversation

saminbassiri
Copy link
Contributor

@saminbassiri saminbassiri commented Jun 18, 2024

This PR closes #752 and makes the oneHot and bin built-in functions available on matrices in DaphneLib.

Features:

  • Use oneHot(info) to Applies one-hot-encoding on matrices in DaphneLib.
  • Use bin(numBins, Min, Max) or bin(numBins) to apply binning on matrices in DaphneLib.

Changes:

  • Add oneHot and bin built-in functions for matrices in DaphneLib.
  • Script-level test case is added in test/api/python/, ensuring that execution works as expected.
  • Update doc/DaphneLib/APIRef.md to add oneHot and bin built-in functions for matrices.

The below changes are related to issue #666. Since using seq function with optional inc argument is only implemented at the DSL level in PR #756 , to use seq function with optional inc in DaphneLib API we have these changes:

  • Update doc/DaphneLib/APIRef.md for seq() function with optional inc arguments.
  • make argument inc optional with default value 1 in seq() function in DaphneLib.

Copy link
Collaborator

@pdamme pdamme left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution @saminbassiri. Making more DaphneDSL built-in functions available in DaphneLib is always useful! Your code looks very good to me. This PR is ready to be merged.

@pdamme pdamme merged commit ee40181 into daphne-eu:main Jun 21, 2024
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.

oneHot and bin built-in functions in DaphneLib
2 participants