diff --git a/docs/Makefile b/docs/Makefile index 394b2e3834..35d5909a15 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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." diff --git a/docs/source/api_reference.rst b/docs/source/api_reference.rst index 21e333f656..a2a81a0c88 100644 --- a/docs/source/api_reference.rst +++ b/docs/source/api_reference.rst @@ -70,6 +70,7 @@ Aggregation Primitives All Any + AverageCountPerUnique AvgTimeBetween Count CountAboveMean @@ -80,8 +81,15 @@ Aggregation Primitives CountLessThan CountOutsideNthSTD CountOutsideRange + DateFirstEvent Entropy First + FirstLastTimeDelta + HasNoDuplicates + IsMonotonicallyDecreasing + IsMonotonicallyIncreasing + IsUnique + Kurtosis Last Max MaxConsecutiveFalse @@ -89,16 +97,30 @@ Aggregation Primitives 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 @@ -109,6 +131,7 @@ Aggregation Primitives TimeSinceLastMin TimeSinceLastTrue Trend + Variance Transform Primitives -------------------- @@ -120,6 +143,7 @@ Binary Transform Primitives AddNumeric AddNumericScalar DivideByFeature + DivideNumeric DivideNumericScalar Equal EqualScalar @@ -135,6 +159,7 @@ Binary Transform Primitives ModuloNumeric ModuloNumericScalar MultiplyBoolean + MultiplyNumeric MultiplyNumericBoolean MultiplyNumericScalar NotEqual @@ -170,6 +195,8 @@ Cumulative Transform Primitives CumMean CumMin CumMax + CumulativeTimeSinceLastFalse + CumulativeTimeSinceLastTrue Datetime Transform Primitives @@ -186,6 +213,7 @@ Datetime Transform Primitives DistanceToHoliday Hour IsFederalHoliday + IsFirstWeekOfMonth IsLeapYear IsLunchTime IsMonthEnd @@ -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 @@ -241,8 +272,10 @@ General Transform Primitives NaturalLogarithm Negate Percentile + PercentChange RateOfChange SameAsPrevious + SavgolFilter Sine SquareRoot Tangent @@ -260,6 +293,15 @@ Location Transform Primitives Latitude Longitude +Name Transform Primitives +************************* +.. autosummary:: + :toctree: generated/ + + FullNameToFirstName + FullNameToLastName + FullNameToTitle + NaturalLanguage Transform Primitives ************************************ .. autosummary:: diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 7fad98c0f7..1a2eae7a09 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -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 ==================== diff --git a/featuretools/primitives/standard/aggregation/has_no_duplicates.py b/featuretools/primitives/standard/aggregation/has_no_duplicates.py index d7bf0b5ad0..4474906248 100644 --- a/featuretools/primitives/standard/aggregation/has_no_duplicates.py +++ b/featuretools/primitives/standard/aggregation/has_no_duplicates.py @@ -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]) diff --git a/featuretools/primitives/standard/aggregation/n_most_common_frequency.py b/featuretools/primitives/standard/aggregation/n_most_common_frequency.py index 40d51611f3..98d36580a8 100644 --- a/featuretools/primitives/standard/aggregation/n_most_common_frequency.py +++ b/featuretools/primitives/standard/aggregation/n_most_common_frequency.py @@ -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. @@ -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() diff --git a/featuretools/primitives/standard/aggregation/num_false_since_last_true.py b/featuretools/primitives/standard/aggregation/num_false_since_last_true.py index 61d5c32e04..feb2cabfd0 100644 --- a/featuretools/primitives/standard/aggregation/num_false_since_last_true.py +++ b/featuretools/primitives/standard/aggregation/num_false_since_last_true.py @@ -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]) diff --git a/featuretools/primitives/standard/aggregation/num_true_since_last_false.py b/featuretools/primitives/standard/aggregation/num_true_since_last_false.py index 947b310aa2..f14bd9b537 100644 --- a/featuretools/primitives/standard/aggregation/num_true_since_last_false.py +++ b/featuretools/primitives/standard/aggregation/num_true_since_last_false.py @@ -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]) diff --git a/featuretools/primitives/standard/aggregation/num_zero_crossings.py b/featuretools/primitives/standard/aggregation/num_zero_crossings.py index 152b0878e9..166c7cda33 100644 --- a/featuretools/primitives/standard/aggregation/num_zero_crossings.py +++ b/featuretools/primitives/standard/aggregation/num_zero_crossings.py @@ -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])