A standard for assumption vectors
See original GitHub issueMany assumptions/hypterparameters of Estimators take on a vector-like feel along an axis of a Triangle. However, there is a great deal of inconsistency in implementation across estimators with at least five different approaches being used.
For example:
import chainladder as cl
import numpy as np
raa = cl.load_sample('raa')
# List-style approach
cl.Development(n_periods=[3]*5+[-1]*4).fit(raa)
# Dict-style approach
cl.DevelopmentConstant(
patterns={k: 3.0**(12/k) for k in range(12, 120, 12)},
style='cdf').fit(raa)
# tuple-style approach
cl.TailCurve(fit_period=(3, None)).fit(raa)
# callable approach
cl.DevelopmentConstant(
patterns=lambda x : {k: 3.0**(12/k) for k in range(12, 120, 12)},
style='cdf').fit(raa)
# numpy array approach
bcl, bf, cc = cl.Chainladder(), cl.BornhuetterFerguson(), cl.CapeCod()
estimators = [('bcl', bcl), ('bf', bf), ('cc', cc)]
weights = np.array([[1, 0, 0]] * 4 + [[0, 1, 0]] * 3 + [[0, 0, 1]] * 3)
cl.VotingChainladder(estimators=estimators, weights=weights)
We need to determine a flexible standard that can can be used by all estimators. Multiple approaches should be fine but should be implemented everywhere so that users can use the style that matches their mental model. We will also need to retain backward compatibility of any deprecated approaches until the next major release.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Chapter 30 Assumptions of the Regression Model
In this chapter, you will learn about how matrix algebra is used to express and understand the distributional assumptions underlying the regression model....
Read more >Random Vectors - Probability Course
Here, we assume X is a real random vector, i.e., the Xi's can only take real values. A special important property of the...
Read more >Practical Question about the Assumptions of Support Vector ...
As far as I know, the only assumptions of support vector machines are independent and identically distributed data.
Read more >4.4 The Least Squares Assumptions
We start by creating a vector containing values that are uniformly distributed on the interval [−5,5] [ − 5 , 5 ] ....
Read more >8.10 - Two-way MANOVA Additive Model and Assumptions
Assumptions · The error vectors ε i j have zero population mean; · The error vectors ε i j have common variance-covariance matrix...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In that case I think
MethodBase
should just have a private function that coerces the inputs to an array, and then each estimator can do with the array what it needs to after having been refactored to handle the array.makes sense