Skip to content

Commit

Permalink
Merge pull request #226 from dswah/periodic
Browse files Browse the repository at this point in the history
improve docs for periodic basis
  • Loading branch information
dswah authored Oct 31, 2018
2 parents e6dc537 + 95e6bc6 commit 3a6e5d6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions pygam/terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,26 @@ def __init__(self, feature, n_splines=20, spline_order=3, lam=0.6,
dtype : {'numerical', 'categorical'}
String describing the data-type of the feature.
basis : {'ps'}
basis : {'ps', 'cp'}
Type of basis function to use in the term.
'ps' : p-spline basis
'cp' : cyclic p-spline basis, useful for building periodic functions.
by default, the maximum and minimum of the feature values
are used to determine the function's period.
NotImplemented:
'cp' : cyclic p-spline basis
to specify a custom period use argument `edge_knots`
edge_knots : optional, array-like of floats of length 2
these values specify minimum and maximum domain of the spline function.
in the case that `spline_basis="cp"`, `edge_knots` determines
the period of the cyclic function.
when `edge_knots=None` these values are inferred from the data.
default: None
by : int, optional
Feature to use as a by-variable in the term.
Expand Down

0 comments on commit 3a6e5d6

Please sign in to comment.