Skip to content

Commit

Permalink
Update predicted class value to uneditable text in counterfactual pan…
Browse files Browse the repository at this point in the history
…el (#1458)

* fix error on machines with pyspark installed where passed dataframe is not spark pandas (#1415)

* add postbuild branch trigger (#1417)

* Fix causal UI strings according to classification/regression tasks (#1419)

* Fix causal UI strings according to classification/regression tasks

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix lint error

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix UI test

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix description for model overview (#1425)

* fix description for model overview

* keep new description for new model overview

* fix failing to create error report when filter_features is empty list (#1421)

* filter out missing values from what if dropdown to prevent explanation dashboard from crashing (#1418)

* Remove |Set Value| blurb in case it is not availble in counterfactual panel (#1426)

Signed-off-by: Gaurav Gupta <[email protected]>

* Add y-axis description to counterfactual feature importance chart (#1423)

Signed-off-by: Gaurav Gupta <[email protected]>

Co-authored-by: xuke444 <[email protected]>

* Add the user class name to causal UI strings (#1422)

* Fix causal UI strings according to classification/regression tasks

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix lint error

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix UI test

Signed-off-by: Gaurav Gupta <[email protected]>

* Add the user class name to causal UI strings

Signed-off-by: Gaurav Gupta <[email protected]>

Co-authored-by: xuke444 <[email protected]>

* fix math.min / max for array size more than 10^7 (#1427)

Signed-off-by: Ke Xu <[email protected]>

* upgrade pytest and lightgbm to try to fix random pytest segfault test failures (#1424)

s

* fix flaky notebook causing build failures by adding retry logic (#1431)

* Upper bound SciKit-Learn to address freeze in causal (#1432)

<!--- Provide a general summary of your changes in the Title above -->

## Description

Replaces #1429  to address #1430 . Causal analysis is getting stuck with the latest release of SciKit-Learn. This contains:

- Test case which gets stuck with SciKit-Learn 1.1.0
- Upper bound on SciKit-Learn in `requirements.txt`

## Checklist

<!--- Make sure to satisfy all the criteria listed below. -->

- [x] I have added screenshots above for all UI changes.
- [x] Documentation was updated if it was needed.
- [x] New tests were added or changes were manually verified.


Signed-off-by: Richard Edgar <[email protected]>

* fix dependency chart axis updating with incorrect values in explanation dashboard (#1437)

* fix codecov and widget test screenshot uploads (#1428)

* release raiwidgets and responsibleai v0.18.2 (#1439)

* fix (#1441)

Signed-off-by: vinutha karanth <[email protected]>

* Fix cohort name conflict and not run few tests for AML (#1442)

* fix

Signed-off-by: vinutha karanth <[email protected]>

* lintfix

Signed-off-by: vinutha karanth <[email protected]>

* Few e2e tests changes to accommodate AML static tests (#1445)

* update

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* Fix locators logic for string features -  data explorer and model statistics components (#1446)

* update

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* fix

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* lintfix

Signed-off-by: vinutha karanth <[email protected]>

* fix

Signed-off-by: vinutha karanth <[email protected]>

* Add more unittests RAI dashboard input class  (#1448)

* Add unit tests for ResponsibleAIDashboardInput

Signed-off-by: Gaurav Gupta <[email protected]>

* Add more tests

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix imports

Signed-off-by: Gaurav Gupta <[email protected]>

* Address code review comments

Signed-off-by: Gaurav Gupta <[email protected]>

* Update the way to get the length of elements obtained in e2e tests (#1450)

* update

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* skip what-if create tests for AML

Signed-off-by: vinutha karanth <[email protected]>

* update cf predicted class to non-editable text

Co-authored-by: Ilya Matiach <[email protected]>
Co-authored-by: Roman Lutz <[email protected]>
Co-authored-by: Gaurav Gupta <[email protected]>
Co-authored-by: xuke444 <[email protected]>
Co-authored-by: Richard Edgar <[email protected]>
Co-authored-by: Vinutha Karanth <[email protected]>
  • Loading branch information
7 people authored Jun 2, 2022
1 parent f968546 commit 82a47e4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libs/counterfactuals/src/lib/CounterfactualList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import {
defaultModelAssessmentContext,
ICounterfactualData,
JointDataset,
MissingParametersPlaceholder,
ModelAssessmentContext
} from "@responsible-ai/core-ui";
Expand Down Expand Up @@ -253,6 +254,7 @@ export class CounterfactualList extends React.Component<
</Stack>
);
};

private getColumns(): IColumn[] {
const columns: IColumn[] = [];
const targetFeature = this.getTargetFeatureName();
Expand Down Expand Up @@ -369,6 +371,22 @@ export class CounterfactualList extends React.Component<
column?.key
);
const styles = counterfactualListStyle();
const targetFeature = this.getTargetFeatureName();
if (column && targetFeature && column.fieldName === targetFeature) {
const predictedClass = this.context.jointDataset.hasPredictedY
? this.props.temporaryPoint?.[JointDataset.PredictedYLabel]
: undefined;
return (
<Stack horizontal={false} tokens={{ childrenGap: "s1" }}>
<Stack.Item className={styles.dropdownLabel}>
<Text>{column.name}</Text>
</Stack.Item>
<Stack.Item>
<Text>{predictedClass}</Text>
</Stack.Item>
</Stack>
);
}
if (column && dropdownOption?.data?.categoricalOptions) {
return (
<Stack horizontal={false} tokens={{ childrenGap: "s1" }}>
Expand Down

0 comments on commit 82a47e4

Please sign in to comment.