You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[.../lib/python3.11/site-packages/sklearn/model_selection/_validation.py:821](.../lib/python3.11/site-packages/sklearn/model_selection/_validation.py:821): UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details:
Traceback (most recent call last):
File ".../lib/python3.11/site-packages/sklearn/model_selection/_validation.py", line 810, in _score
scores = scorer(estimator, X_test, y_test)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/skfda/preprocessing/smoothing/validation.py", line 129, in __call__
y_est, hat_matrix = _get_input_estimation_and_matrix(estimator, X)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/skfda/preprocessing/smoothing/validation.py", line 26, in _get_input_estimation_and_matrix
hat_matrix = estimator.hat_matrix_
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'BasisSmoother' object has no attribute 'hat_matrix_'
warnings.warn(
The best smoothing parameter is {'smoothing_parameter': 4.5399929762484854e-05}
[/.../lib/python3.11/site-packages/sklearn/model_selection/_search.py:979](.../lib/python3.11/site-packages/sklearn/model_selection/_search.py:979): UserWarning: One or more of the test scores are non-finite: [nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
nan nan]
warnings.warn(
Version information
OS: Ubuntu 22.04 LTS
Python version: 3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:40:35) [GCC 12.3.0]
scikit-fda version: 0.9
numpy: 1.26.0
The text was updated successfully, but these errors were encountered:
Describe the bug
Setting
return_basis=True
inBasisSmoother
leads toWith a further look into the codes, I found that in
_LinearSmoother
thehat_matrix_
attribute is created inside thefit
method with the lineMeanwhile, that line of code does not appear in the
fit
method of theBasisSmoother
.To Reproduce
Code to reproduce the behavior:
Forgive me for copying the long code to generate data for the example:
And the
skfda
part starts from here:Error messages
Version information
The text was updated successfully, but these errors were encountered: