Skip to content

ECMClassifier fit method errors when using match_index #209

@chris-jackson7

Description

@chris-jackson7
Image

Gemini's response:
"The error TypeError: fit() takes 2 positional arguments but 3 were given is happening at the call to BaseClassifier.fit (the Classifier.fit in your traceback).

This implies that when ECMClassifier.fit calls Classifier.fit(self, X, *args, **kwargs), it is somehow passing three positional arguments to BaseClassifier.fit(self, X, y=None).

This is highly unusual and not standard behavior for recordlinkage v0.16. The ECMClassifier.fit method (at least in the standard source) does not call Classifier.fit(self, X, *args, **kwargs). Instead, it directly calls self._fit(comparison_vectors.values, y.values) (if match_index is provided) or self._fit(comparison_vectors.values) (if match_index is None).

The presence of Classifier.fit(self, X, *args, **kwargs) at line 580 of classifiers.py suggests that your specific recordlinkage installation is modified or corrupted. This is not how ECMClassifier in v0.16 typically handles the call to its parent's fit method when match_index is provided."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions