11. Create Calendar Window Aggregates from Time Series
Creating Features from Monthly Installments¶
In this step, we define 9 features by aggregating monthly installment records from the PRIOR_APPLICATIONS table within 12-month and 24-month calendar windows, after applying a filter on the INSTALLMENT_STATUS column.
1. Statistical Aggregations (Max, Min, Avg)¶
These features summarize consumer installment records using basic statistical functions:
Maximum (Max)¶
CLIENT_Max_of_Consumer_installments_records_Payment_Delays_24cMo
CLIENT_Max_of_Consumer_installments_records_Consumer_Loan_AMT_APPLICATIONs_24cMo
Minimum (Min)¶
CLIENT_Min_of_Consumer_installments_records_Consumer_Loan_AMT_CREDIT_To_AMT_APPLICATIONs_24cMo
CLIENT_Min_of_Consumer_installments_records_AMT_PAYMENTs_12cMo
Average (Avg)¶
CLIENT_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo
CLIENT_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo
2. Temporal Mean Derived from Two Features¶
This feature computes a temporal mean by dividing the sum of annuities by the number of unique installment dates:
CLIENT_Temporal_Mean_of_Sums_of_Consumer_installments_records_Consumer_Loan_AMT_ANNUITYs_24cMo
3. Aggregations Across INSTALLMENT_STATUS
or YIELD_GROUP
¶
These features summarize installment payments across different categories:
CLIENT_Consumer_installments_records_AMT_PAYMENTs_by_Consumer_installments_record_INSTALLMENT_STATUS_6cMo
CLIENT_Count_of_Consumer_installments_records_by_Consumer_Loan_YIELD_GROUP_24cMo
Activate catalog¶
In [1]:
Copied!
import featurebyte as fb
# Set your profile to the tutorial environment
fb.use_profile("tutorial")
catalog_name = "Credit Default Dataset SDK Tutorial"
catalog = fb.Catalog.activate(catalog_name)
import featurebyte as fb
# Set your profile to the tutorial environment
fb.use_profile("tutorial")
catalog_name = "Credit Default Dataset SDK Tutorial"
catalog = fb.Catalog.activate(catalog_name)
16:43:19 | WARNING | Service endpoint is inaccessible: http://featurebyte-server:8088/ 16:43:19 | INFO | Using profile: tutorial 16:43:20 | INFO | Using configuration file at: /Users/gxav/.featurebyte/config.yaml 16:43:20 | INFO | Active profile: tutorial (https://tutorials.featurebyte.com/api/v1) 16:43:20 | INFO | SDK version: 2.1.0.dev113 16:43:20 | INFO | No catalog activated. 16:43:20 | INFO | Catalog activated: Credit Default Dataset SDK Tutorial
Get view from table¶
In [2]:
Copied!
# Get view from CONSUMER_LOAN_STATUS scd table.
consumer_loan_status_view = catalog.get_view("CONSUMER_LOAN_STATUS")
# Get view from CONSUMER_LOAN_STATUS scd table.
consumer_loan_status_view = catalog.get_view("CONSUMER_LOAN_STATUS")
In [3]:
Copied!
# Get view from CONSUMER_INSTALLMENTS time series table.
consumer_installments_view = catalog.get_view("CONSUMER_INSTALLMENTS")
# Get view from CONSUMER_INSTALLMENTS time series table.
consumer_installments_view = catalog.get_view("CONSUMER_INSTALLMENTS")
Create ratio and time delta columns¶
In [4]:
Copied!
consumer_loan_status_view["AMT_CREDIT To AMT_APPLICATION"] = (
consumer_loan_status_view["AMT_CREDIT"]
/ consumer_loan_status_view["AMT_APPLICATION"]
)
consumer_loan_status_view["AMT_CREDIT To AMT_APPLICATION"] = (
consumer_loan_status_view["AMT_CREDIT"]
/ consumer_loan_status_view["AMT_APPLICATION"]
)
In [5]:
Copied!
consumer_installments_view["Payment Delay"] = (
consumer_installments_view["ACTUAL_INSTALLMENT_DATE"]
- consumer_installments_view["SCHEDULED_INSTALLMENT_DATE"]
).dt.day
consumer_installments_view["Payment Delay"] = (
consumer_installments_view["ACTUAL_INSTALLMENT_DATE"]
- consumer_installments_view["SCHEDULED_INSTALLMENT_DATE"]
).dt.day
Join views¶
In [6]:
Copied!
# Join CONSUMER_LOAN_STATUS view to CONSUMER_INSTALLMENTS view.
consumer_installments_view = consumer_installments_view.join(
consumer_loan_status_view, rprefix="Consumer Loan_"
)
# Join CONSUMER_LOAN_STATUS view to CONSUMER_INSTALLMENTS view.
consumer_installments_view = consumer_installments_view.join(
consumer_loan_status_view, rprefix="Consumer Loan_"
)
Filter View¶
Read on view subsetting
In [7]:
Copied!
# Filter consumer_installments_view with INSTALLMENT_STATUS equal to Late.
cond = consumer_installments_view["INSTALLMENT_STATUS"] == "Late"
consumer_installments_late_status_view = consumer_installments_view[cond]
# Filter consumer_installments_view with INSTALLMENT_STATUS equal to Late.
cond = consumer_installments_view["INSTALLMENT_STATUS"] == "Late"
consumer_installments_late_status_view = consumer_installments_view[cond]
Declare simple stats from CONSUMER_INSTALLMENTS¶
See SDK reference for features
See SDK reference to groupby a view
See SDK reference to do aggregation over time
In [8]:
Copied!
# Group CONSUMER_INSTALLMENTS view by Client entity (Consumer Loan_CLIENT_ID).
consumer_installments_view_by_client = consumer_installments_view.groupby(["Consumer Loan_CLIENT_ID"])
# Group CONSUMER_INSTALLMENTS view by Client entity (Consumer Loan_CLIENT_ID).
consumer_installments_view_by_client = consumer_installments_view.groupby(["Consumer Loan_CLIENT_ID"])
In [9]:
Copied!
# Get Min of AMT_PAYMENT for the Client over time.
client_min_of_consumer_installments_records_amt_payments_12cmo = (
consumer_installments_view_by_client.aggregate_over(
"AMT_PAYMENT",
method="min",
feature_names=[
"CLIENT_Min_of_Consumer_installments_records_AMT_PAYMENTs_12cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=12)],
)["CLIENT_Min_of_Consumer_installments_records_AMT_PAYMENTs_12cMo"]
)
# Get Min of AMT_PAYMENT for the Client over time.
client_min_of_consumer_installments_records_amt_payments_12cmo = (
consumer_installments_view_by_client.aggregate_over(
"AMT_PAYMENT",
method="min",
feature_names=[
"CLIENT_Min_of_Consumer_installments_records_AMT_PAYMENTs_12cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=12)],
)["CLIENT_Min_of_Consumer_installments_records_AMT_PAYMENTs_12cMo"]
)
In [10]:
Copied!
# Get Avg of AMT_PAYMENT for the Client over time.
client_avg_of_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"CLIENT_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
# Get Avg of AMT_PAYMENT for the Client over time.
client_avg_of_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"CLIENT_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
In [11]:
Copied!
# Get Max of Payment Delay for the Client over time.
client_max_of_consumer_installments_records_payment_delays_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Payment Delay",
method="max",
feature_names=[
"CLIENT_Max_of_Consumer_installments_records_Payment_Delays_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Max_of_Consumer_installments_records_Payment_Delays_24cMo"]
)
# Get Max of Payment Delay for the Client over time.
client_max_of_consumer_installments_records_payment_delays_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Payment Delay",
method="max",
feature_names=[
"CLIENT_Max_of_Consumer_installments_records_Payment_Delays_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Max_of_Consumer_installments_records_Payment_Delays_24cMo"]
)
In [12]:
Copied!
# Get Max of Consumer Loan_AMT_APPLICATION for the Client over time.
client_max_of_consumer_installments_records_consumer_loan_amt_applications_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Consumer Loan_AMT_APPLICATION",
method="max",
feature_names=[
"CLIENT_Max_of_Consumer_installments_records_Consumer_Loan_AMT_APPLICATIONs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Max_of_Consumer_installments_records_Consumer_Loan_AMT_APPLICATIONs_24cMo"]
)
# Get Max of Consumer Loan_AMT_APPLICATION for the Client over time.
client_max_of_consumer_installments_records_consumer_loan_amt_applications_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Consumer Loan_AMT_APPLICATION",
method="max",
feature_names=[
"CLIENT_Max_of_Consumer_installments_records_Consumer_Loan_AMT_APPLICATIONs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Max_of_Consumer_installments_records_Consumer_Loan_AMT_APPLICATIONs_24cMo"]
)
In [13]:
Copied!
# Get Min of Consumer Loan_AMT_CREDIT To AMT_APPLICATION for the Client over time.
client_min_of_consumer_installments_records_consumer_loan_amt_credit_to_amt_applications_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Consumer Loan_AMT_CREDIT To AMT_APPLICATION",
method="min",
feature_names=[
"CLIENT_Min_of_Consumer_installments_records_Consumer_Loan_AMT_CREDIT_To_AMT_APPLICATIONs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Min_of_Consumer_installments_records_Consumer_Loan_AMT_CREDIT_To_AMT_APPLICATIONs_24cMo"]
)
# Get Min of Consumer Loan_AMT_CREDIT To AMT_APPLICATION for the Client over time.
client_min_of_consumer_installments_records_consumer_loan_amt_credit_to_amt_applications_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Consumer Loan_AMT_CREDIT To AMT_APPLICATION",
method="min",
feature_names=[
"CLIENT_Min_of_Consumer_installments_records_Consumer_Loan_AMT_CREDIT_To_AMT_APPLICATIONs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Min_of_Consumer_installments_records_Consumer_Loan_AMT_CREDIT_To_AMT_APPLICATIONs_24cMo"]
)
Declare temporal mean from two features¶
In [14]:
Copied!
# Get Unique Count of ACTUAL_INSTALLMENT_DATE for the Client over time.
client_temporary_unique_count_of_consumer_installments_records_actual_installment_dates_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"ACTUAL_INSTALLMENT_DATE",
method="count_distinct",
feature_names=[
"CLIENT_Temporary_Unique_Count_of_Consumer_installments_records_ACTUAL_INSTALLMENT_DATEs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Temporary_Unique_Count_of_Consumer_installments_records_ACTUAL_INSTALLMENT_DATEs_24cMo"]
)
# Get Unique Count of ACTUAL_INSTALLMENT_DATE for the Client over time.
client_temporary_unique_count_of_consumer_installments_records_actual_installment_dates_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"ACTUAL_INSTALLMENT_DATE",
method="count_distinct",
feature_names=[
"CLIENT_Temporary_Unique_Count_of_Consumer_installments_records_ACTUAL_INSTALLMENT_DATEs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Temporary_Unique_Count_of_Consumer_installments_records_ACTUAL_INSTALLMENT_DATEs_24cMo"]
)
In [15]:
Copied!
# Get Sum of Consumer Loan_AMT_ANNUITY for the Client over time.
client_temporary_sum_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Consumer Loan_AMT_ANNUITY",
method="sum",
feature_names=[
"CLIENT_Temporary_Sum_of_Consumer_installments_records_Consumer_Loan_AMT_ANNUITYs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Temporary_Sum_of_Consumer_installments_records_Consumer_Loan_AMT_ANNUITYs_24cMo"]
)
# Get Sum of Consumer Loan_AMT_ANNUITY for the Client over time.
client_temporary_sum_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo = (
consumer_installments_view_by_client.aggregate_over(
"Consumer Loan_AMT_ANNUITY",
method="sum",
feature_names=[
"CLIENT_Temporary_Sum_of_Consumer_installments_records_Consumer_Loan_AMT_ANNUITYs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Temporary_Sum_of_Consumer_installments_records_Consumer_Loan_AMT_ANNUITYs_24cMo"]
)
In [16]:
Copied!
# Derive Average of Sums
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo = (
client_temporary_sum_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo
/ client_temporary_unique_count_of_consumer_installments_records_actual_installment_dates_24cmo
)
# Give a name to new feature
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo.name = (
"CLIENT_Temporal_Mean_of_Sums_of_Consumer_installments_records_Consumer_Loan_AMT_ANNUITYs_24cMo"
)
# Derive Average of Sums
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo = (
client_temporary_sum_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo
/ client_temporary_unique_count_of_consumer_installments_records_actual_installment_dates_24cmo
)
# Give a name to new feature
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo.name = (
"CLIENT_Temporal_Mean_of_Sums_of_Consumer_installments_records_Consumer_Loan_AMT_ANNUITYs_24cMo"
)
Do window aggregation across different INSTALLMENT_STATUS¶
In [17]:
Copied!
# Group CONSUMER_INSTALLMENTS view by Client entity (Consumer Loan_CLIENT_ID) across different INSTALLMENT_STATUS.
consumer_installments_view_by_client_across_installment_statuss = (
consumer_installments_view.groupby(
["Consumer Loan_CLIENT_ID"], category="INSTALLMENT_STATUS"
)
)
# Group CONSUMER_INSTALLMENTS view by Client entity (Consumer Loan_CLIENT_ID) across different INSTALLMENT_STATUS.
consumer_installments_view_by_client_across_installment_statuss = (
consumer_installments_view.groupby(
["Consumer Loan_CLIENT_ID"], category="INSTALLMENT_STATUS"
)
)
In [18]:
Copied!
# Distribution of the total AMT_PAYMENTs of Consumer_installments_records, segmented by
# Consumer_installments_record's INSTALLMENT_STATUS for the Client over time.
client_consumer_installments_records_amt_payments_by_consumer_installments_record_installment_status_6cmo = (
consumer_installments_view_by_client_across_installment_statuss.aggregate_over(
"AMT_PAYMENT",
method="sum",
feature_names=[
"CLIENT_Consumer_installments_records_AMT_PAYMENTs_by_Consumer_installments_record_INSTALLMENT_STATUS_6cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=6)],
)["CLIENT_Consumer_installments_records_AMT_PAYMENTs_by_Consumer_installments_record_INSTALLMENT_STATUS_6cMo"]
)
# Distribution of the total AMT_PAYMENTs of Consumer_installments_records, segmented by
# Consumer_installments_record's INSTALLMENT_STATUS for the Client over time.
client_consumer_installments_records_amt_payments_by_consumer_installments_record_installment_status_6cmo = (
consumer_installments_view_by_client_across_installment_statuss.aggregate_over(
"AMT_PAYMENT",
method="sum",
feature_names=[
"CLIENT_Consumer_installments_records_AMT_PAYMENTs_by_Consumer_installments_record_INSTALLMENT_STATUS_6cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=6)],
)["CLIENT_Consumer_installments_records_AMT_PAYMENTs_by_Consumer_installments_record_INSTALLMENT_STATUS_6cMo"]
)
Do window aggregation across different Loan_YIELD_GROUPs¶
In [19]:
Copied!
# Group CONSUMER_INSTALLMENTS view by Client entity (Consumer Loan_CLIENT_ID) across different
# Consumer Loan_YIELD_GROUPs.
consumer_installments_view_by_client_across_consumer_loan_yield_groups = (
consumer_installments_view.groupby(
["Consumer Loan_CLIENT_ID"], category="Consumer Loan_YIELD_GROUP"
)
)
# Group CONSUMER_INSTALLMENTS view by Client entity (Consumer Loan_CLIENT_ID) across different
# Consumer Loan_YIELD_GROUPs.
consumer_installments_view_by_client_across_consumer_loan_yield_groups = (
consumer_installments_view.groupby(
["Consumer Loan_CLIENT_ID"], category="Consumer Loan_YIELD_GROUP"
)
)
In [20]:
Copied!
# Count Consumer_installments_records across different Consumer Loan_YIELD_GROUPs for the Client
# over time.
client_count_of_consumer_installments_records_by_consumer_loan_yield_group_24cmo = (
consumer_installments_view_by_client_across_consumer_loan_yield_groups.aggregate_over(
None,
method="count",
feature_names=[
"CLIENT_Count_of_Consumer_installments_records_by_Consumer_Loan_YIELD_GROUP_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Count_of_Consumer_installments_records_by_Consumer_Loan_YIELD_GROUP_24cMo"]
)
# Count Consumer_installments_records across different Consumer Loan_YIELD_GROUPs for the Client
# over time.
client_count_of_consumer_installments_records_by_consumer_loan_yield_group_24cmo = (
consumer_installments_view_by_client_across_consumer_loan_yield_groups.aggregate_over(
None,
method="count",
feature_names=[
"CLIENT_Count_of_Consumer_installments_records_by_Consumer_Loan_YIELD_GROUP_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Count_of_Consumer_installments_records_by_Consumer_Loan_YIELD_GROUP_24cMo"]
)
Do window aggregation from consumer_installments_late_status_view¶
See SDK reference for features
See SDK reference to groupby a view
See SDK reference to do aggregation over time
In [21]:
Copied!
# Group consumer_installments_late_status_view view by Client entity (Consumer Loan_CLIENT_ID).
consumer_installments_late_status_view_by_client = (
consumer_installments_late_status_view.groupby(["Consumer Loan_CLIENT_ID"])
)
# Group consumer_installments_late_status_view view by Client entity (Consumer Loan_CLIENT_ID).
consumer_installments_late_status_view_by_client = (
consumer_installments_late_status_view.groupby(["Consumer Loan_CLIENT_ID"])
)
In [22]:
Copied!
# Get Avg of Late Status AMT_PAYMENT for the Client over time.
client_avg_of_late_status_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_late_status_view_by_client.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"CLIENT_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
# Get Avg of Late Status AMT_PAYMENT for the Client over time.
client_avg_of_late_status_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_late_status_view_by_client.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"CLIENT_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["CLIENT_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
Do window aggregation on all data¶
In [23]:
Copied!
# Group CONSUMER_INSTALLMENTS view without any groupby key for aggregates on all data.
consumer_installments_view_by_overall = consumer_installments_view.groupby([])
# Group CONSUMER_INSTALLMENTS view without any groupby key for aggregates on all data.
consumer_installments_view_by_overall = consumer_installments_view.groupby([])
In [24]:
Copied!
# Get Avg of AMT_PAYMENT over time.
overall_avg_of_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_view_by_overall.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"OVERALL_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["OVERALL_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
# Get Avg of AMT_PAYMENT over time.
overall_avg_of_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_view_by_overall.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"OVERALL_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["OVERALL_Avg_of_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
In [25]:
Copied!
# Group consumer_installments_late_status_view view without any groupby key for aggregates on all
# data.
consumer_installments_late_status_view_by_overall = (
consumer_installments_late_status_view.groupby([])
)
# Group consumer_installments_late_status_view view without any groupby key for aggregates on all
# data.
consumer_installments_late_status_view_by_overall = (
consumer_installments_late_status_view.groupby([])
)
In [26]:
Copied!
# Get Avg of Late Status AMT_PAYMENT over time.
overall_avg_of_late_status_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_late_status_view_by_overall.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"OVERALL_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["OVERALL_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
# Get Avg of Late Status AMT_PAYMENT over time.
overall_avg_of_late_status_consumer_installments_records_amt_payments_24cmo = (
consumer_installments_late_status_view_by_overall.aggregate_over(
"AMT_PAYMENT",
method="avg",
feature_names=[
"OVERALL_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"
],
windows=[fb.CalendarWindow(unit="MONTH", size=24)],
)["OVERALL_Avg_of_Late_Status_Consumer_installments_records_AMT_PAYMENTs_24cMo"]
)
In [27]:
Copied!
fb.FeatureGroup(
[
client_max_of_consumer_installments_records_payment_delays_24cmo,
client_max_of_consumer_installments_records_consumer_loan_amt_applications_24cmo,
client_min_of_consumer_installments_records_consumer_loan_amt_credit_to_amt_applications_24cmo,
client_min_of_consumer_installments_records_amt_payments_12cmo,
client_avg_of_consumer_installments_records_amt_payments_24cmo,
client_avg_of_late_status_consumer_installments_records_amt_payments_24cmo,
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo,
client_count_of_consumer_installments_records_by_consumer_loan_yield_group_24cmo,
client_consumer_installments_records_amt_payments_by_consumer_installments_record_installment_status_6cmo,
]
).save()
fb.FeatureGroup(
[
client_max_of_consumer_installments_records_payment_delays_24cmo,
client_max_of_consumer_installments_records_consumer_loan_amt_applications_24cmo,
client_min_of_consumer_installments_records_consumer_loan_amt_credit_to_amt_applications_24cmo,
client_min_of_consumer_installments_records_amt_payments_12cmo,
client_avg_of_consumer_installments_records_amt_payments_24cmo,
client_avg_of_late_status_consumer_installments_records_amt_payments_24cmo,
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo,
client_count_of_consumer_installments_records_by_consumer_loan_yield_group_24cmo,
client_consumer_installments_records_amt_payments_by_consumer_installments_record_installment_status_6cmo,
]
).save()
Done! |████████████████████████████████████████| 100% in 9.1s (0.11%/s) Done! |████████████████████████████████████████| 100% in 6.1s (0.17%/s) Loading Feature(s) |████████████████████████████████████████| 9/9 [100%] in 0.4s
Add description¶
In [28]:
Copied!
client_max_of_consumer_installments_records_payment_delays_24cmo.update_description(
"Max of Consumer_installments_records Payment Delays for the Client "
"over a 24 calendar months period."
)
client_max_of_consumer_installments_records_consumer_loan_amt_applications_24cmo.update_description(
"Max of Consumer_installments_records Consumer Loan_AMT_APPLICATIONs "
"for the Client over a 24 calendar months period."
)
client_min_of_consumer_installments_records_consumer_loan_amt_credit_to_amt_applications_24cmo.update_description(
"Min of Consumer_installments_records Consumer Loan_AMT_CREDIT To "
"AMT_APPLICATIONs for the Client over a 24 calendar months period."
)
client_min_of_consumer_installments_records_amt_payments_12cmo.update_description(
"Min of Consumer_installments_records AMT_PAYMENTs for the Client over "
"a 12 calendar months period."
)
client_avg_of_consumer_installments_records_amt_payments_24cmo.update_description(
"Avg of Consumer_installments_records AMT_PAYMENTs for "
"the Client over a 24 calendar months period."
)
client_avg_of_late_status_consumer_installments_records_amt_payments_24cmo.update_description(
"Avg of Late Status Consumer_installments_records AMT_PAYMENTs for "
"the Client over a 24 calendar months period."
)
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo.update_description(
"Temporal Avg of Sum of Consumer_installments_records Consumer "
"Loan_AMT_ANNUITYs for the Client over a 24 calendar months period."
)
client_count_of_consumer_installments_records_by_consumer_loan_yield_group_24cmo.update_description(
"Count of Consumer_installments_records across different Consumer "
"Loan_YIELD_GROUP categories for the Client over a 24 calendar months "
"period. It provides a detailed breakdown in the form of a dictionary, "
"where each key represents a unique Consumer Loan_YIELD_GROUP. The "
"corresponding value for each key is the count within that Consumer "
"Loan_YIELD_GROUP. This distribution offers insights into the spread "
"across different Consumer Loan_YIELD_GROUPs for the Client."
)
client_consumer_installments_records_amt_payments_by_consumer_installments_record_installment_status_6cmo.update_description(
"Distribution of the total AMT_PAYMENTs of "
"Consumer_installments_records, segmented by "
"Consumer_installments_record's INSTALLMENT_STATUS for the Client over "
"a 6 calendar months period. It provides a detailed breakdown in the "
"form of a dictionary, where each key represents a unique "
"INSTALLMENT_STATUS. The corresponding value for each key is the "
"cumulative sum of AMT_PAYMENTs within that INSTALLMENT_STATUS. This "
"distribution offers insights into the AMT_PAYMENT spread across "
"different INSTALLMENT_STATUSs for the Client."
)
client_max_of_consumer_installments_records_payment_delays_24cmo.update_description(
"Max of Consumer_installments_records Payment Delays for the Client "
"over a 24 calendar months period."
)
client_max_of_consumer_installments_records_consumer_loan_amt_applications_24cmo.update_description(
"Max of Consumer_installments_records Consumer Loan_AMT_APPLICATIONs "
"for the Client over a 24 calendar months period."
)
client_min_of_consumer_installments_records_consumer_loan_amt_credit_to_amt_applications_24cmo.update_description(
"Min of Consumer_installments_records Consumer Loan_AMT_CREDIT To "
"AMT_APPLICATIONs for the Client over a 24 calendar months period."
)
client_min_of_consumer_installments_records_amt_payments_12cmo.update_description(
"Min of Consumer_installments_records AMT_PAYMENTs for the Client over "
"a 12 calendar months period."
)
client_avg_of_consumer_installments_records_amt_payments_24cmo.update_description(
"Avg of Consumer_installments_records AMT_PAYMENTs for "
"the Client over a 24 calendar months period."
)
client_avg_of_late_status_consumer_installments_records_amt_payments_24cmo.update_description(
"Avg of Late Status Consumer_installments_records AMT_PAYMENTs for "
"the Client over a 24 calendar months period."
)
client_temporal_mean_of_sums_of_consumer_installments_records_consumer_loan_amt_annuitys_24cmo.update_description(
"Temporal Avg of Sum of Consumer_installments_records Consumer "
"Loan_AMT_ANNUITYs for the Client over a 24 calendar months period."
)
client_count_of_consumer_installments_records_by_consumer_loan_yield_group_24cmo.update_description(
"Count of Consumer_installments_records across different Consumer "
"Loan_YIELD_GROUP categories for the Client over a 24 calendar months "
"period. It provides a detailed breakdown in the form of a dictionary, "
"where each key represents a unique Consumer Loan_YIELD_GROUP. The "
"corresponding value for each key is the count within that Consumer "
"Loan_YIELD_GROUP. This distribution offers insights into the spread "
"across different Consumer Loan_YIELD_GROUPs for the Client."
)
client_consumer_installments_records_amt_payments_by_consumer_installments_record_installment_status_6cmo.update_description(
"Distribution of the total AMT_PAYMENTs of "
"Consumer_installments_records, segmented by "
"Consumer_installments_record's INSTALLMENT_STATUS for the Client over "
"a 6 calendar months period. It provides a detailed breakdown in the "
"form of a dictionary, where each key represents a unique "
"INSTALLMENT_STATUS. The corresponding value for each key is the "
"cumulative sum of AMT_PAYMENTs within that INSTALLMENT_STATUS. This "
"distribution offers insights into the AMT_PAYMENT spread across "
"different INSTALLMENT_STATUSs for the Client."
)
In [ ]:
Copied!