Skip to content

Add missing primitives to API Docs #2737

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

Merged
merged 7 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ clean:

.PHONY: html
html:
# Remove the following line when sphinx issue (https://github.com/sphinx-doc/sphinx/issues/10943) is closed
python -m pip install .. --quiet --no-dependencies
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html $(SPHINXOPTS)
# Remove the following line when sphinx issue (https://github.com/sphinx-doc/sphinx/issues/10943) is closed
python -m pip install -e .. --quiet --no-dependencies
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

Expand Down
46 changes: 44 additions & 2 deletions docs/source/api_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Aggregation Primitives

All
Any
AverageCountPerUnique
AvgTimeBetween
Count
CountAboveMean
Expand All @@ -80,25 +81,46 @@ Aggregation Primitives
CountLessThan
CountOutsideNthSTD
CountOutsideRange
DateFirstEvent
Entropy
First
FirstLastTimeDelta
HasNoDuplicates
IsMonotonicallyDecreasing
IsMonotonicallyIncreasing
IsUnique
Kurtosis
Last
Max
MaxConsecutiveFalse
MaxConsecutiveNegatives
MaxConsecutivePositives
MaxConsecutiveTrue
MaxConsecutiveZeros
MaxCount
MaxMinDelta
Mean
Median
MedianCount
Min
MinCount
Mode
NMostCommon
NMostCommonFrequency
NUniqueDays
NUniqueDaysOfCalendarYear
NUniqueMonths
NUniqueWeeks
NumConsecutiveGreaterMean
NumConsecutiveLessMean
NumFalseSinceLastTrue
NumPeaks
NumTrue
NumTrueSinceLastFalse
NumUnique
NumZeroCrossings
PercentTrue
PercentUnique
Skew
Std
Sum
Expand All @@ -109,6 +131,7 @@ Aggregation Primitives
TimeSinceLastMin
TimeSinceLastTrue
Trend
Variance

Transform Primitives
--------------------
Expand All @@ -120,6 +143,7 @@ Binary Transform Primitives
AddNumeric
AddNumericScalar
DivideByFeature
DivideNumeric
DivideNumericScalar
Equal
EqualScalar
Expand All @@ -135,6 +159,7 @@ Binary Transform Primitives
ModuloNumeric
ModuloNumericScalar
MultiplyBoolean
MultiplyNumeric
MultiplyNumericBoolean
MultiplyNumericScalar
NotEqual
Expand Down Expand Up @@ -170,6 +195,8 @@ Cumulative Transform Primitives
CumMean
CumMin
CumMax
CumulativeTimeSinceLastFalse
CumulativeTimeSinceLastTrue


Datetime Transform Primitives
Expand All @@ -186,6 +213,7 @@ Datetime Transform Primitives
DistanceToHoliday
Hour
IsFederalHoliday
IsFirstWeekOfMonth
IsLeapYear
IsLunchTime
IsMonthEnd
Expand All @@ -198,21 +226,24 @@ Datetime Transform Primitives
IsYearStart
Minute
Month
NthWeekOfMonth
PartOfDay
Quarter
Season
Second
TimeSince
Week
Weekday
Year


Email and URL Transform Primitives
**********************************
Email, URL and File Transform Primitives
****************************************
.. autosummary::
:toctree: generated/

EmailAddressToDomain
FileExtension
IsFreeEmailDomain
URLToDomain
URLToProtocol
Expand Down Expand Up @@ -241,8 +272,10 @@ General Transform Primitives
NaturalLogarithm
Negate
Percentile
PercentChange
RateOfChange
SameAsPrevious
SavgolFilter
Sine
SquareRoot
Tangent
Expand All @@ -260,6 +293,15 @@ Location Transform Primitives
Latitude
Longitude

Name Transform Primitives
*************************
.. autosummary::
:toctree: generated/

FullNameToFirstName
FullNameToLastName
FullNameToTitle

NaturalLanguage Transform Primitives
************************************
.. autosummary::
Expand Down
8 changes: 5 additions & 3 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
Release Notes
-------------

.. Future Release
==============
Future Release
==============
* Enhancements
* Fixes
* Changes
* Documentation Changes
* Update API Docs to include previously missing primitives (:pr:`2737`)
* Testing Changes

.. Thanks to the following people for contributing to this release:
Thanks to the following people for contributing to this release:
:user:`thehomebrewnerd`

v1.31.0 May 14, 2024
====================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class HasNoDuplicates(AggregationPrimitive):
>>> has_no_duplicates([1, 2, 3])
True

`NaN`s are skipped by default.
NaNs are skipped by default.

>>> has_no_duplicates([1, 2, 3, None, None])
True

However, the way `NaN`s are treated can be controlled.
However, the way NaNs are treated can be controlled.

>>> has_no_duplicates_skipna = HasNoDuplicates(skipna=False)
>>> has_no_duplicates_skipna([1, 2, 3, None, None])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class NMostCommonFrequency(AggregationPrimitive):
"""Determines the frequency of the n most common items.

Args:
n (int): defines "n" in "n most common". Defaults to
3.
n (int): defines "n" in "n most common". Defaults to 3.
skipna (bool): Determines if to use NA/null values.
Defaults to True to skip NA/null.

Expand All @@ -31,13 +30,13 @@ class NMostCommonFrequency(AggregationPrimitive):
>>> n_most_common_frequency([1, 1, 1, 2, 2, 3, 4, 4]).to_list()
[3, 2, 2, 1]

`NaN`s are skipped by default.
NaNs are skipped by default.

>>> n_most_common_frequency = NMostCommonFrequency(3)
>>> n_most_common_frequency([1, 1, 1, 2, 2, 3, 4, 4, None, None, None]).to_list()
[3, 2, 2]

However, the way `NaN`s are treated can be controlled.
However, the way NaNs are treated can be controlled.

>>> n_most_common_frequency = NMostCommonFrequency(3, skipna=False)
>>> n_most_common_frequency([1, 1, 1, 2, 2, 3, 4, 4, None, None, None]).to_list()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@


class NumFalseSinceLastTrue(AggregationPrimitive):
"""Calculates the number of 'False' values since the last `True` value.
"""Calculates the number of `False` values since the last `True` value.

Description:
From a series of Booleans, find the last record with a `True` value.
Return the count of 'False' values between that record and the end of
Return the count of `False` values between that record and the end of
the series. Return nan if no values are `True`. Any nan values in the
input are ignored. A 'True' value in the last row will result in a
input are ignored. A `True` value in the last row will result in a
count of 0. Inputs are converted too booleans before calculating
the result.

Examples:
>>> num_false_since_last_true = NumFalseSinceLastTrue()
>>> num_false_since_last_true([True, False, True, False, False])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@


class NumTrueSinceLastFalse(AggregationPrimitive):
"""Calculates the number of 'True' values since the last `False` value.
"""Calculates the number of `True` values since the last `False` value.

Description:
From a series of Booleans, find the last record with a `False` value.
Return the count of 'True' values between that record and the end of
Return the count of `True` values between that record and the end of
the series. Return nan if no values are `False`. Any nan values in the
input are ignored. A 'False' value in the last row will result in a
input are ignored. A `False` value in the last row will result in a
count of 0.

Examples:
>>> num_true_since_last_false = NumTrueSinceLastFalse()
>>> num_true_since_last_false([False, True, False, True, True])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@

class NumZeroCrossings(AggregationPrimitive):
"""Determines the number of times a list crosses 0.

Description:
Given a list of numbers, return the number of times the value
crosses 0. It is the number of times the value goes from a
positive number to a negative number, or a negative number to
a positive number. NaN values are ignored.

Examples:
>>> num_zero_crossings = NumZeroCrossings()
>>> num_zero_crossings([1, -1, 2, -2, 3, -3])
Expand Down
Loading