Skip to content

List primitive input types and return type#1341

Merged
jeff-hernandez merged 12 commits into
mainfrom
list_primitive_metadata
Feb 26, 2021
Merged

List primitive input types and return type#1341
jeff-hernandez merged 12 commits into
mainfrom
list_primitive_metadata

Conversation

@jeff-hernandez
Copy link
Copy Markdown
Contributor

@jeff-hernandez jeff-hernandez commented Feb 24, 2021

The function list_primitives() will also return the input types and return type of the primitive. (Closes #1181 , Closes #1084)

                  name       type  dask_compatible  koalas_compatible                                        description                valid_inputs return_type
74            latitude  transform            False              False  Returns the first tuple value in a list of Lat...                     LatLong     Numeric
75             weekday  transform             True               True    Determines the day of the week from a datetime.                    Datetime     Ordinal
76  less_than_equal_to  transform             True               True  Determines if values in one list are less than...  Datetime, Numeric, Ordinal     Boolean
77                 day  transform             True               True   Determines the day of the month from a datetime.                    Datetime     Ordinal
78                 not  transform             True               True                           Negates a boolean value.                     Boolean     Boolean

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2021

Codecov Report

Merging #1341 (1a91bba) into main (6f7cead) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1341      +/-   ##
==========================================
+ Coverage   98.38%   98.58%   +0.19%     
==========================================
  Files         135      135              
  Lines       14496    14538      +42     
==========================================
+ Hits        14262    14332      +70     
+ Misses        234      206      -28     
Impacted Files Coverage Δ
featuretools/computational_backends/utils.py 95.54% <ø> (ø)
...mputational_backend/test_feature_set_calculator.py 100.00% <ø> (+0.36%) ⬆️
...uretools/tests/entityset_tests/test_es_metadata.py 100.00% <ø> (+0.59%) ⬆️
...eaturetools/tests/entityset_tests/test_plotting.py 100.00% <ø> (+1.63%) ⬆️
...ols/tests/synthesis/test_deep_feature_synthesis.py 99.29% <ø> (+0.13%) ⬆️
featuretools/utils/plot_utils.py 92.00% <ø> (ø)
...s/computational_backends/feature_set_calculator.py 98.70% <100.00%> (+0.01%) ⬆️
featuretools/entityset/entityset.py 98.77% <100.00%> (+0.81%) ⬆️
featuretools/primitives/utils.py 99.20% <100.00%> (+0.09%) ⬆️
...utational_backend/test_calculate_feature_matrix.py 99.44% <100.00%> (+<0.01%) ⬆️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc65ecd...1a91bba. Read the comment docs.

@jeff-hernandez jeff-hernandez marked this pull request as ready for review February 24, 2021 17:47
@rwedge
Copy link
Copy Markdown
Contributor

rwedge commented Feb 24, 2021

Can we change the column name input_types to valid_inputs and have rows in that column consist of a string listing each unique variable type present in that primitives input_types? So for Haversine, valid_inputs would be "LatLong", whereas GreaterThan would be "Datetime, Numeric, Ordinal"

Copy link
Copy Markdown
Contributor

@rwedge rwedge left a comment

Choose a reason for hiding this comment

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

Let's test these changes. One way would be to modify test_list_primitives_order

Copy link
Copy Markdown
Contributor

@rwedge rwedge left a comment

Choose a reason for hiding this comment

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

It'd also be good to test _get_names_valid_inputs directly with a few input_type combinations

Comment thread docs/source/release_notes.rst Outdated
Comment thread docs/source/release_notes.rst Outdated
Copy link
Copy Markdown
Contributor

@rwedge rwedge left a comment

Choose a reason for hiding this comment

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

Looks good

@jeff-hernandez jeff-hernandez merged commit 8506164 into main Feb 26, 2021
@jeff-hernandez jeff-hernandez deleted the list_primitive_metadata branch February 26, 2021 15:08
@gsheni gsheni mentioned this pull request Feb 26, 2021
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.

Add descriptive categories to list_primitives() [Enhancement] Generate metadata for custom variables and primitives

2 participants