Skip to content

scikit-learn compatibility #11

@martinfleis

Description

@martinfleis

While I am trying to make our classes compatible with sklearn as much as possible (in #10 we start subclassing BaseEstimator), there are some limits to this at the moment. Notably, the signature of fit in sklearn estimator should be fit(X, y), while we have fit(X, y, geometry). I believe that what we have is the best option but it makes non-conformant.

We fail sklearn.utils.estimator_checks.check_estimator checks due to expected geometry and stuff like GridSearchCV does not work either as it is unable to pass geometry to predict. Same issue applies to score.

We could potentially pass geometry within init but then any CV splits would break anyway. Alternatively, geometry could be part of X but then none of the transformers in sklearn pipelines will work.

I am not sure if there is a way to make our API fully sklearn compatible at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions