Skip to content
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

Update predicted class value to uneditable text in counterfactual panel #1458

Merged
merged 26 commits into from
Jun 2, 2022
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d0047f1
fix error on machines with pyspark installed where passed dataframe i…
imatiach-msft May 11, 2022
a4a46d5
add postbuild branch trigger (#1417)
romanlutz May 11, 2022
c53ba4d
Fix causal UI strings according to classification/regression tasks (#…
gaugup May 12, 2022
fb5c769
Fix description for model overview (#1425)
romanlutz May 13, 2022
29b57af
fix failing to create error report when filter_features is empty list…
imatiach-msft May 13, 2022
4f1e262
filter out missing values from what if dropdown to prevent explanatio…
imatiach-msft May 13, 2022
cf3c25b
Remove |Set Value| blurb in case it is not availble in counterfactual…
gaugup May 13, 2022
42a495c
Add y-axis description to counterfactual feature importance chart (#1…
gaugup May 13, 2022
839f2ae
Add the user class name to causal UI strings (#1422)
gaugup May 13, 2022
bc7a9f9
fix math.min / max for array size more than 10^7 (#1427)
xuke444 May 13, 2022
8c4ce56
upgrade pytest and lightgbm to try to fix random pytest segfault test…
imatiach-msft May 17, 2022
b982016
fix flaky notebook causing build failures by adding retry logic (#1431)
imatiach-msft May 17, 2022
f7b2fc8
Upper bound SciKit-Learn to address freeze in causal (#1432)
riedgar-ms May 17, 2022
6e57f20
fix dependency chart axis updating with incorrect values in explanati…
imatiach-msft May 18, 2022
4968e90
fix codecov and widget test screenshot uploads (#1428)
imatiach-msft May 18, 2022
b74045a
release raiwidgets and responsibleai v0.18.2 (#1439)
imatiach-msft May 18, 2022
4c81157
fix (#1441)
vinuthakaranth May 19, 2022
7de48f7
Fix cohort name conflict and not run few tests for AML (#1442)
vinuthakaranth May 20, 2022
b1bf638
Few e2e tests changes to accommodate AML static tests (#1445)
vinuthakaranth May 23, 2022
0010330
Fix locators logic for string features - data explorer and model sta…
vinuthakaranth May 24, 2022
f19be20
Add more unittests RAI dashboard input class (#1448)
gaugup May 25, 2022
6472964
Update the way to get the length of elements obtained in e2e tests (#…
vinuthakaranth May 26, 2022
7fd9b53
Merge branch 'postbuild' into main
romanlutz May 26, 2022
ada93ff
update cf predicted class to non-editable text
tongyu-microsoft Jun 1, 2022
a2c71f4
Merge branch 'main' into tongy/cfPredictedClass
tongyu-microsoft Jun 1, 2022
e00ecad
Merge branch 'postbuild' into tongy/cfPredictedClass
tongyu-microsoft Jun 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
);
}
tongyu-microsoft marked this conversation as resolved.
Show resolved Hide resolved
if (column && dropdownOption?.data?.categoricalOptions) {
return (
<Stack horizontal={false} tokens={{ childrenGap: "s1" }}>
Expand Down