I/O functions
- regrank.io.cast2sum_squares_form(data, alpha, regularization=True)[source]
This is how we linearize the objective function: B_ind i j 0 0 1 1 0 2 2 0 3 3 1 0 4 1 2 5 1 3 6 2 0 … 11 3 2 12 0 0 13 1 1 14 2 2 15 3 3
- regrank.io.cast2sum_squares_form_t(g, alpha, lambd, from_year=1960, to_year=1961, top_n=70, separate=False)[source]
Operator to linearize the sum of squares loss function.
- Args:
g (_type_): _description_ alpha (_type_): _description_ lambd (_type_): _description_ from_year (int, optional): _description_. Defaults to 1960. to_year (int, optional): _description_. Defaults to 1961. top_n (int, optional): _description_. Defaults to 70. separate (bool, optional): _description_. Defaults to False.
- Raises:
ValueError: _description_ ValueError: _description_ TypeError: _description_
- Returns:
_type_: _description_
- regrank.io.compute_cache_from_data(data, alpha, regularization=True, **kwargs)[source]
_summary_
Args:
data (_type_): _description_
alpha (_type_): _description_
regularization (bool, optional): _description_. Defaults to True.
Returns:
dictionary: _description_