Skip to content

Commit

Permalink
Make FAQ more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodv authored May 10, 2020
1 parent 8eabc90 commit c7a5e50
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,27 @@ examples for some benchmarks.
FAQ
---

Q: I'm seeing errors such as :code:`TypeError: '<' not supported between instances of 'str' and 'float'`
when using the :code:`kprototypes` algorithm.
**Q: I'm seeing errors such as :code:`TypeError: '<' not supported between instances of 'str' and 'float'`
when using the :code:`kprototypes` algorithm.**

A: One or more of your numerical feature columns have string values in them. Make sure that all
columns have consistent data types.

Q: How does k-protypes know which of my features are numerical and which are categorical?
----

**Q: How does k-protypes know which of my features are numerical and which are categorical?**

A: You tell it which column indices are categorical using the :code:`categorical` argument. All others are assumed numerical. E.g., :code:`clusters = KPrototypes().fit_predict(X, categorical=[1, 2])`

Q: I'm getting the following error, what gives? :code:`ModuleNotFoundError: No module named 'kmodes.kmodes'; 'kmodes' is not a package`.
----

**Q: I'm getting the following error, what gives? :code:`ModuleNotFoundError: No module named 'kmodes.kmodes'; 'kmodes' is not a package`.**

A: Make sure your working file is not called 'kmodes.py', because it might overrule the :code:`kmodes` package.

Q: I'm getting the following error: :code:`ValueError: Clustering algorithm could not initialize. Consider assigning the initial clusters manually.`
----

**Q: I'm getting the following error: :code:`ValueError: Clustering algorithm could not initialize. Consider assigning the initial clusters manually.`**

A: This is a feature, not a bug. :code:`kmodes` is telling you that it can't make sense of the data you are presenting it. At least, not with the parameters you are setting the algorithm with. It is up to you, the data scientist, to figure out why. Some hints to possible solutions:

Expand Down

0 comments on commit c7a5e50

Please sign in to comment.