Comments (4)
@yangwendy if you are doing the local install using pip install -e
, you will first need to build the UI code.
You can build the UI code by running at the root directory of the repository:
yarn install
yarn buildall
Note you will need to have node, npm and yarn installed. For more detailed information please see the guide:
https://github.com/microsoft/responsible-ai-toolbox/blob/main/CONTRIBUTING.md#development-process
Particularly, this might be useful:
https://github.com/microsoft/responsible-ai-toolbox/blob/main/CONTRIBUTING.md#run-e2e-tests-locally-with-notebook-data
Hope this helps clarify how to build locally.
For the original issue, you can wrap the model to have a predict/predict_proba function in the scikit-learn format. I wonder if using our ml-wrappers repository may resolve this for you:
https://github.com/microsoft/ml-wrappers/
from ml_wrappers import wrap_model
wrapped_model = wrap_model(model, input, model_task='regression')
This function automatically wraps models and tries to put them in a common scikit-learn format all other RAI related packages can work with, but it may not always work.
Can you give more information about which specific catboost python class you are using, and how you trained it? If you have a sample notebook, we can also try to debug if the wrap_model function does not work for you.
from responsible-ai-toolbox.
Thank you so much for your help. I am waiting for the IT team to install yarn. Meanwhile, I tried the ml_wrapper. It cannot transfer array[[1],[2],[3]] to array[1,2,3]. I attached a simple notebook for your reference.
from responsible-ai-toolbox.
@yangwendy thank you for the example notebook. I've sent a PR here to add support for catboost framework (classifier and regressor) to ml-wrappers:
microsoft/ml-wrappers#55
Taken from PR description:
Mainly, the current predict and predict_proba functions from catboost classifier fail to support scikit-learn specification due to two issues:
1.) Catboost predict_proba returns different results when either a single array is passed to the prediction function or multiple arrays are passed. In the single instance case, catboost returns a single dimensional array of probabilities, whereas scikit-learn models always return a two-dimensional array of probabilities.
2.) Catboost predict function returns two dimensional array of one column, in the format [[1], [3], [2], [1]] etc, whereas scikit learn models return a one dimensional array on predict in the format [1, 3, 2, 1], etc.
For the first issue, we detect if the output dimensions are different in the single vs multi instance case - and if they differ by one, we add an extra dimension for the single instance prediction scenario.
For the second issue, a simple ravel() to one dimension resolves this inconsistency from catboost.
from responsible-ai-toolbox.
@yangwendy I've released ml-wrappers 0.2.1 which should now support catboost. Please run:
pip install --upgrade ml-wrappers
Then, you can use wrap_model function to wrap the catboost model:
https://github.com/microsoft/ml-wrappers/
from ml_wrappers import wrap_model
wrapped_model = wrap_model(model, input, model_task='regression')
The wrapped catboost model can then be passed to the ExplanationDashboard for viewing.
from responsible-ai-toolbox.
Related Issues (20)
- Broken links HOT 1
- ResponsibleAIDashboard CORS origin issue
- Support for bias/unfairness mitigation for multiclass classification problems HOT 1
- fairness-interpretability-dashboard-income-prediction.ipynb / from raiwidgets import ExplanationDashboard command --> TypeError: init() got an unexpected keyword argument 'unbound_message' HOT 2
- Question: Is it possible to use the decision tree visualization on its own? HOT 3
- Not able to build Numba and LLVM wheel for raiwidgets HOT 5
- Make responsible ai dashboard work with Databricks HOT 1
- Installation Error. HOT 4
- Widget is not displaying in localhost HOT 1
- Tree Map not working in error analysis HOT 5
- ImportError: numpy.core.multiarray failed to import HOT 1
- Flask Issue HOT 5
- RAIVisionInsights to accept torch Datasets HOT 1
- Examples links broken HOT 1
- erroranalysis conda feedstock - requirements-object-detection.txt not found
- nlp-feature-extractors pypi source does not include requirements.txt and LICENSE - needed for conda feedstock
- responsibleai-text pypi source does not include requirements.txt and LICENSE - needed for conda feedstock
- Bug report HOT 1
- not able to install raiwidgets
- Feature enhancements and bug fixes for generative text task
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from responsible-ai-toolbox.