You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValueError: Cannot import column 'feat_2' with semantic=Semantic.CATEGORICAL_SET as it contains floating point values.
Note: If the column is a label, make sure the correct task is selected. For example, you cannot train a classification model (task=ydf.Task.CLASSIFICATION) with floating point labels.
In this case, I am not sure how to override the feature semantic for multi-dimensional features. I could not find it in your documentation. I tried to use
In the current implementation, YDF does not support unpacking pandas dataframes to multi-dimensional features, but I'll take this as a feature request to add this functionality. In the first case you're describing, YDF actually creates categorical set features for each column, which is probably not what you want.
If you want to unpack multi-dimensional features, feed the dataset e.g. as a dictionary of Numpy arrays, as shown in this tutorial
Improving the feature handling is a goal for the next version.
In the current implementation, YDF does not support unpacking pandas dataframes to multi-dimensional features, but I'll take this as a feature request to add this functionality. In the first case you're describing, YDF actually creates categorical set features for each column, which is probably not what you want.
If you want to unpack multi-dimensional features, feed the dataset e.g. as a dictionary of Numpy arrays, as shown in this tutorial
Improving the feature handling is a goal for the next version.
Thank you for your kind reply! I will try reformatting the feature as Numpy arrays for the model. Besides, given this, I think that at the present stage, it might be helpful if you could consider adding some notes and explanations in that tutorial so that other people can also know the function of your library better. Thank you again for your help!
I am trying to run a RF regression based on my dataset. My dataframe looks like this [below is only the first 5 rows]:
When running the code to do the regression using only
feat_1
, the code works perfectly fine.[it works well. I can use
model.describe()
later to read the model]However, as I include
feat_2
in the regression,It raises the error:
In this case, I am not sure how to override the feature semantic for multi-dimensional features. I could not find it in your documentation. I tried to use
but it seems not to work:
In this case, I am not sure how to deal with it.
The text was updated successfully, but these errors were encountered: