Open sylvaticus opened 7 months ago
For consistency, as in the documentation of each method, all methods at most assume that
X: A matrix of real numbers or a table with element scitypes that subtype Union{Finite, Infinite}.
Here the column a
has scientific type Textual
and should be coerced to MultiClass
first. I see that the error does not seem to signal that directly and will consider making a PR that throws a better one.
We can also add support for the Textual
type but it may not be exactly straightforward given the current implementation.
So, for example, this works:
using CategoricalArrays
a = DataFrame(a =categorical(["a","b","c"]), b=[1,2,3]);
Or:
using ScientificTypes
coerce!(a, a: => Multiclass)
But I agree with @sylvaticus that it's worth special casing this algorithm which can deal with arbitrary column types.
Take this example:
This fails because
ScientificTypes.schema(X).scitypes
fails, but the algorithms emploied doesn't really care about scientific types.