0

I saw this blog (https://towardsdatascience.com/fuzzy-name-matching-with-machine-learning-f09895dce7b4) and their Github page (https://github.com/Christopher-Thornton/hmni), I followed the installation setup and got the below error in my pycharm console. Error screenshots are attached along with this post. Please help me , as am trying to learn python

This is my Pycharm IDE code look likes

import hmni
matcher = hmni.Matcher(model='latin')

matcher.similarity('Alan', 'Al')
# 0.6838303319889133
matcher.similarity('Alan', 'Al', prob=False)
# 1
matcher.similarity('Alan Turing', 'Al Turing', surname_first=False)
# 0.68383033198891

and package , Error

Full Error list



/Users/user/folder/venv/bin/python /Users/user/folder/main.py
/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator MaxAbsScaler from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator MinMaxScaler from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator Pipeline from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator LogisticRegression from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
Traceback (most recent call last):
  File "/Users/user/folder/main.py", line 8, in <module>
    matcher.similarity('Alan', 'Al')
  File "/Users/user/folder/venv/lib/python3.8/site-packages/hmni/matcher.py", line 266, in similarity
    sim = self.meta_inf(pair, features)
  File "/Users/user/folder/venv/lib/python3.8/site-packages/hmni/matcher.py", line 418, in meta_inf
    meta_features[0] = self.base_model_inf(base_features)
  File "/Users/user/folder/venv/lib/python3.8/site-packages/hmni/matcher.py", line 413, in base_model_inf
    y_pred = self.baseModel.predict_proba(x.reshape(1, -1))[0, 1]
  File "/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/utils/metaestimators.py", line 113, in <lambda>
    out = lambda *args, **kwargs: self.fn(obj, *args, **kwargs)  # noqa
  File "/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/pipeline.py", line 535, in predict_proba
    Xt = transform.transform(Xt)
  File "/Users/user/folder/venv/lib/python3.8/site-packages/sklearn/preprocessing/_data.py", line 506, in transform
    if self.clip:
AttributeError: 'MinMaxScaler' object has no attribute 'clip'

screenshots are attached here. Pls help me, my expected result was printing similarity score like the GitHub page shows

JOhn Mic
  • 41
  • 6
  • 1
    You've posed a screenshot of some warnings but not an actual error – Tom Dalton Feb 24 '22 at 15:51
  • [What is the difference between a warning and an error](https://stackoverflow.com/questions/61001549/what-exactly-is-the-difference-between-warning-and-error-in-jupyter-notebook) – G. Anderson Feb 24 '22 at 15:52
  • @TomDalton i have updated with full console errors , apologies – JOhn Mic Feb 24 '22 at 15:58
  • 1
    From googling the error: https://stackoverflow.com/questions/65635575/attributeerror-minmaxscaler-object-has-no-attribute-clip – Tom Dalton Feb 24 '22 at 16:01
  • 1
    Does this answer your question? [AttributeError: 'MinMaxScaler' object has no attribute 'clip'](https://stackoverflow.com/questions/65635575/attributeerror-minmaxscaler-object-has-no-attribute-clip) – Tom Dalton Feb 24 '22 at 16:01

0 Answers0