Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Custom Optimizers for Hyperparameter Optimization #204

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

esavary
Copy link
Member

@esavary esavary commented Jun 6, 2024

  • Introduces custom optimization methods for hyperparameter tuning in Gaussian Process models, inspired by Andersson et al. (2015):
    • Negative Log-Likelihood Optimization
    • Leave-One-Out Cross-Validation (LOO-CV)
  • Includes test with standard kernels from scikit-learn.

@esavary
Copy link
Member Author

esavary commented Jun 6, 2024

The import of scipy in optimizers.py causes an error during the documentation build process. The issue seems to be related to the handling of dependencies or environment configuration in the Sphinx build. Has anyone encountered a similar problem, or does anyone have suggestions on how to resolve this? (Maybe @effigies @jhlegarreta )

@effigies
Copy link
Member

effigies commented Jun 6, 2024

You can probably fix this by adding scipy to the mocked imports:

eddymotion/docs/conf.py

Lines 45 to 65 in 2b07b0e

autodoc_mock_imports = [
"dipy",
"h5py",
"joblib",
"matplotlib",
"nest_asyncio",
"nibabel",
"nilearn",
"nipy",
"nipype",
"nitime",
"nitransforms",
"numpy",
"pandas",
"seaborn",
"skimage",
"sklearn",
"svgutils",
"tqdm",
"transforms3d",
]

@esavary
Copy link
Member Author

esavary commented Jun 7, 2024

You can probably fix this by adding scipy to the mocked imports:

eddymotion/docs/conf.py

Lines 45 to 65 in 2b07b0e

autodoc_mock_imports = [
"dipy",
"h5py",
"joblib",
"matplotlib",
"nest_asyncio",
"nibabel",
"nilearn",
"nipy",
"nipype",
"nitime",
"nitransforms",
"numpy",
"pandas",
"seaborn",
"skimage",
"sklearn",
"svgutils",
"tqdm",
"transforms3d",
]

Thanks a lot, it worked!

Copy link
Collaborator

@jhlegarreta jhlegarreta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this.

Made some comments about docstrings. Have not checked the details, or have not thought how this can be tested more thoroughly. @oesteban any thought on this?

If we think this is enough, it can be merged as is.

src/eddymotion/model/optimizers.py Show resolved Hide resolved
src/eddymotion/model/optimizers.py Outdated Show resolved Hide resolved
src/eddymotion/model/optimizers.py Outdated Show resolved Hide resolved
src/eddymotion/model/optimizers.py Outdated Show resolved Hide resolved
@esavary
Copy link
Member Author

esavary commented Jun 11, 2024

Thanks for doing this.

Made some comments about docstrings. Have not checked the details, or have not thought how this can be tested more thoroughly. @oesteban any thought on this?

If we think this is enough, it can be merged as is.

Thanks for your comments @jhlegarreta, I have addressed all of them in commit 34670bb

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.

None yet

3 participants