Skip to content

implementing automatic smoothening parameter selection#529

Open
amanpandey2587 wants to merge 3 commits into
dswah:mainfrom
amanpandey2587:feat/automatic-smoothening-parameter-selection
Open

implementing automatic smoothening parameter selection#529
amanpandey2587 wants to merge 3 commits into
dswah:mainfrom
amanpandey2587:feat/automatic-smoothening-parameter-selection

Conversation

@amanpandey2587
Copy link
Copy Markdown

I have implemented the following changes after referring the document provided in the issue :

  • I have added higher-order variance and link derviatives to distributions and link functions in order to support smoothness derivative calculations.
  • I have made a new file named pygam/smoother_optimizer.py with QR/rank utilites, finite difference gradient/Hessian helpers and a safeguarded modified-Newton step function.
  • I have also implemented fit_auto_smooth in GAM for Wood-2008 style outer-loop smoothing selection around the existing PIRLS inner loop which included dense penalty helper and objective wrapper.
  • I have kept backward compatibility while storing optimization metadata (lam_opt_result, tuned λ) and wiring lambda handling utilities.
    -Finally I added comprehensive tests for derivative correctness, QR sanity, finite-difference helpers, and auto-smoothing on Gaussian, Poisson, and logistic concurvity scenarios.

** Solves issue ** #192

Tests : There are two tests included in

  • pygam/tests/test_outer_lambda.py (outer-loop λ search coverage)
  • pygam/tests/test_smooth_optimizer.py (derivative helpers and auto-smoothing integration)
    Below is the result showing their successful passing :
image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant