You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chainladder/development/barnzehn.py
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,35 @@ class BarnettZehnwirth(TweedieGLM):
24
24
----------
25
25
formula: formula-like
26
26
A patsy formula describing the independent variables, X of the GLM
27
+
feat_eng: dict
28
+
A dictionary with feature names as keys and a dictionary of function (with a key of 'func') and keyword arguments (with a key of 'kwargs')
29
+
(e.g. {
30
+
'feature_1':{
31
+
'func': function_name for feature 1,
32
+
'kwargs': keyword arguments for the function
33
+
},
34
+
'feature_2':{
35
+
'func': function_name for feature 2,
36
+
'kwargs': keyword arguments for the function
37
+
}
38
+
}
39
+
);
40
+
functions should be written with a input Dataframe named df; this is the DataFrame containing origin, development, and valuation that will passed into the function at run time
41
+
(e.g. this function adds 1 to every origin
42
+
def test_func(df)
43
+
return df['origin'] + 1
44
+
)
27
45
response: str
28
46
Column name for the reponse variable of the GLM. If ommitted, then the
Copy file name to clipboardExpand all lines: chainladder/development/learning.py
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,24 @@ class DevelopmentML(DevelopmentBase):
33
33
Time Series aspects of the model. Predictions from one development period
34
34
get used as featues in the next development period. Lags should be negative
35
35
integers.
36
+
feat_eng: dict
37
+
A dictionary with feature names as keys and a dictionary of function (with a key of 'func') and keyword arguments (with a key of 'kwargs')
38
+
(e.g. {
39
+
'feature_1':{
40
+
'func': function_name for feature 1,
41
+
'kwargs': keyword arguments for the function
42
+
},
43
+
'feature_2':{
44
+
'func': function_name for feature 2,
45
+
'kwargs': keyword arguments for the function
46
+
}
47
+
}
48
+
);
49
+
functions should be written with a input Dataframe named df; this is the DataFrame containing origin, development, and valuation that will passed into the function at run time
50
+
(e.g. this function adds 1 to every origin
51
+
def test_func(df)
52
+
return df['origin'] + 1
53
+
)
36
54
fit_incrementals:
37
55
Whether the response variable should be converted to an incremental basis
38
56
for fitting.
@@ -48,12 +66,13 @@ class DevelopmentML(DevelopmentBase):
The subset of response column(s) to use as lagged features for the
33
+
Time Series aspects of the model. Predictions from one development period
34
+
get used as featues in the next development period. Lags should be negative
35
+
integers.
36
+
feat_eng: dict
37
+
A dictionary with feature names as keys and a dictionary of function (with a key of 'func') and keyword arguments (with a key of 'kwargs')
38
+
(e.g. {
39
+
'feature_1':{
40
+
'func': function_name for feature 1,
41
+
'kwargs': keyword arguments for the function
42
+
},
43
+
'feature_2':{
44
+
'func': function_name for feature 2,
45
+
'kwargs': keyword arguments for the function
46
+
}
47
+
}
48
+
);
49
+
functions should be written with a input Dataframe named df; this is the DataFrame containing origin, development, and valuation that will passed into the function at run time
50
+
(e.g. this function adds 1 to every origin
51
+
def test_func(df)
52
+
return df['origin'] + 1
53
+
)
54
+
fit_incrementals:
55
+
Whether the response variable should be converted to an incremental basis
56
+
for fitting.
57
+
58
+
Attributes
59
+
----------
60
+
estimator_ml: Estimator
61
+
An sklearn-style estimator to predict development patterns
0 commit comments