-
-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
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
Categorical columns #273
Comments
Hi @AlexanderZender ,nice catch! I'm on holiday until the end of the month so away from keyboard, but if you want to try to write up a PR I can see if I can have a look at it and get it released once I'm back |
I found the issue(?) with my changed columns and values. The question is, should the user ensure this, or should explainer dashboard maybe only pass copies down to the model in the first place? I would suggest to only pass copies, to avoid potential issues with other models or pipeline in which the user might not have influence or doesnt want to add a wrapper. @oegedijk If you dont mind i will open a PR in a bit with both things |
I encountered an issue that was documented before with LightGBM models.
![image](https://private-user-images.githubusercontent.com/79153884/253270899-45a19979-ca5b-4905-92d0-a4022beea344.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2OTc1NTksIm5iZiI6MTcyNDY5NzI1OSwicGF0aCI6Ii83OTE1Mzg4NC8yNTMyNzA4OTktNDVhMTk5NzktY2E1Yi00OTA1LTkyZDAtYTQwMjJiZWVhMzQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDE4MzQxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNhODc2YTdlNTZmYWI1MjBjNWQ4YWZhNGExMjMyMmNhOGEwNGE5ZjliM2ViZmI0MjlhMjYxNzEzYmEwNzlkYTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.CAj152DBqnRbjle0LhHhKXfy6ZUdqjQz52d9kbyXoTo)
In my case it is not related to LightGBM, as it occurs before data arrives at the model.
This error occurs here in explainer dashboard:
It triggers when sorting a string column, and the column contains nan values.
Additionally, some categorical columns get deleted during the explainer process.
![image](https://private-user-images.githubusercontent.com/79153884/253302378-4aadce7d-7e96-48a5-8c80-04ee5e3c13b7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2OTc1NTksIm5iZiI6MTcyNDY5NzI1OSwicGF0aCI6Ii83OTE1Mzg4NC8yNTMzMDIzNzgtNGFhZGNlN2QtN2U5Ni00OGE1LThjODAtMDRlZTVlM2MxM2I3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDE4MzQxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViMTUzZGZjYjNkOWE1NThiMGQ0YzBjNmVjODZkNWRhN2U3MzViMjE2OTllYmM1MTZkNDNkMWY5MzU0NWIyZTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MxR9FevJ4QSgDYi_TOTINcOPC8KRVcTS_yqZyj07374)
Here self.X still has all columns:
But two lines further down, they are gone. I can't really tell what's happening, as nothing should be happening:
![image](https://private-user-images.githubusercontent.com/79153884/253302591-ea8dac2c-f147-402c-85ac-531caccf6d50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2OTc1NTksIm5iZiI6MTcyNDY5NzI1OSwicGF0aCI6Ii83OTE1Mzg4NC8yNTMzMDI1OTEtZWE4ZGFjMmMtZjE0Ny00MDJjLTg1YWMtNTMxY2FjY2Y2ZDUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDE4MzQxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyZDllN2UyNGI4MTY3N2ZhNWNkMTcxZTY4ZTU4YTM5MDVjZmE2NjNjYWU3NGE4ZmJmZTg4MDk4NDM4YzFjYzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.lu-oZhQzV-s8Nf91F8YfyVU0lJ_Xm94fizq0UOLD354)
At this point these column seem to not be needed. The explainer dashboard process works fine until the liftcurve_dfs is computed. It will crash as the sample df does not contain the necessary columns for the model:
Update: In the last picture I also realized that the feature "Sex" got changed from either male or female to 1 or 0. While the other categories still present like "Embarked" was not changed. This will break the model too, as the preprocessing will be handled by it.
The text was updated successfully, but these errors were encountered: