We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As a user, it would be useful to be able to specify the type of ordering I want to use for the LabelEncoder.
LabelEncoder
order_by
None
numerical_value
alphabetical
'numerical_value'
'alphabetical'
Error: order_by must be one of the following values: None, 'numerical_value' or 'alphabetical'
fit
Error: The data must be numerical or able to be casted as a float if order_by is 'numerical_value'
Error: The data must be of type string if order_by is 'alphabetical'
The text was updated successfully, but these errors were encountered:
amontanez24
Successfully merging a pull request may close this issue.
Problem Description
As a user, it would be useful to be able to specify the type of ordering I want to use for the
LabelEncoder
.Expected behavior
order_by
None
(default): Just use the order the values appear in. Same as current implementationnumerical_value
: Order by the numerical value (ie. the numerically first number should be mapped to 1, so on and so forth)alphabetical
: Order strings alphabetically (ie. the alphabetically first string should be mapped to 1, so on and so forth)Validation
None
,'numerical_value'
or'alphabetical'
, raise the following error:Error: order_by must be one of the following values: None, 'numerical_value' or 'alphabetical'
fit
if theorder_by
value is'numerical_value'
but the data is not numerical, then raise the following error:Error: The data must be numerical or able to be casted as a float if order_by is 'numerical_value'
fit
, if theorder_by
value is'alphabetical'
but the data is not a string, raise the following error:Error: The data must be of type string if order_by is 'alphabetical'
The text was updated successfully, but these errors were encountered: