poreflow.steps.cpic
¶
cpic_less_than_1000(x)
¶
Calculates the CPIC (Change-Point Information Criterion) for values less than 1000.
This function uses a predefined model to compute the CPIC value for datasets where the total number of data points (N_T) is less than 1000. The model combines logarithmic transformations, polynomial terms, and absolute value functions to estimate the CPIC.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
The input value representing the total number of data points (N_T), which must be less than 1000. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
The computed CPIC value. |
Example
cpic_value = cpic_less_than_1000(500) print(cpic_value) 7.123
get_cpic_penalty(N_T)
¶
Calculates the CPIC penalty to prevent overfitting in the likelihood maximizing model.
This penalty is based on the methodology developed by LaMont and Wiggins (2016), utilizing Monte Carlo simulations. It is used to adjust the model's likelihood function in order to avoid overfitting when identifying transitions in data. The penalty is calculated using different formulas depending on the value of N_T (the total number of data points).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N_T
|
int
|
The total number of data points, which is used to determine the appropriate CPIC penalty. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The calculated CPIC penalty based on the number of data points. |