Add local casual analysis data (#511)
* temp * data format * index 0 Co-authored-by: Bo Zhang <zhb@microsoft.com>
This commit is contained in:
Родитель
cd6766fe29
Коммит
deccbb7ffa
|
@ -2612,24 +2612,324 @@ export const adultCensusWithFairnessModelExplanationData: IModelExplanationData
|
|||
export const adultCensusCasualAnalysisData: ICasualAnalysisData = {
|
||||
global: {
|
||||
ciLower: [
|
||||
-0.2419328967749073,
|
||||
0.024554703670239472,
|
||||
0.0000018156074109169128
|
||||
[[-0.2419328967749073, 0.024554703670239472, 0.0000018156074109169128]]
|
||||
],
|
||||
ciUpper: [
|
||||
[[-0.1428698896693828, 0.07637320978494788, 0.0000162287897705993]]
|
||||
],
|
||||
ciUpper: [-0.1428698896693828, 0.07637320978494788, 0.0000162287897705993],
|
||||
name: ["OverTime (base=No): Yes", "StockOptionLevel", "MonthlyIncome"],
|
||||
point: [-0.19240139322214506, 0.05046395672759368, 0.000009022198590758107],
|
||||
point: [
|
||||
[[-0.19240139322214506, 0.05046395672759368, 0.000009022198590758107]]
|
||||
],
|
||||
pValue: [
|
||||
2.6711762067333496e-14,
|
||||
0.0001348326275600237,
|
||||
0.014137461979327226
|
||||
[[2.6711762067333496e-14, 0.0001348326275600237, 0.014137461979327226]]
|
||||
],
|
||||
stderr: [
|
||||
0.025271639654330606,
|
||||
0.013219249568728346,
|
||||
0.0000036768997985094956
|
||||
[[0.025271639654330606, 0.013219249568728346, 0.0000036768997985094956]]
|
||||
],
|
||||
zstat: [-7.613332409524711, 3.8174600203457816, 2.4537515529836944]
|
||||
zstat: [[[-7.613332409524711, 3.8174600203457816, 2.4537515529836944]]]
|
||||
},
|
||||
local: []
|
||||
local: {
|
||||
ciLower: [
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]],
|
||||
[[-0.6205969134844145, 0.013814157021996676, 0.000013135089088685406]],
|
||||
[[-0.5852475174832195, -0.04502125543631039, 0.000026488867786397727]]
|
||||
],
|
||||
ciUpper: [
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]],
|
||||
[[0.08391259687531821, 0.4224305766318246, 0.00016718524433278489]],
|
||||
[[0.018440074107750837, 0.291109171393397, 0.00012910783721632458]]
|
||||
],
|
||||
name: ["OverTime (base=No): Yes", "StockOptionLevel", "MonthlyIncome"],
|
||||
point: [
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]],
|
||||
[[-0.2683421583045481, 0.21812236682691066, 0.00009016016671073516]],
|
||||
[[-0.2834037216877343, 0.12304395797854331, 0.00007779835250136117]]
|
||||
],
|
||||
pValue: [
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]],
|
||||
[[0.13541889529026166, 0.036395100224307066, 0.021779202266668587]],
|
||||
[[0.06573492498091793, 0.15130719936772685, 0.002960511625147853]]
|
||||
],
|
||||
stderr: [
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]],
|
||||
[[0.17972511635846725, 0.10424079800265262, 0.000039299231123435804]],
|
||||
[[0.1540047665040738, 0.08574913352517222, 0.00002617878956944418]]
|
||||
],
|
||||
zstat: [
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]],
|
||||
[[-1.4930698821712345, 2.0924855815221224, 2.2941967090284576]],
|
||||
[[-1.8402269496005346, 1.4349294613271277, 2.9718086199129394]]
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -67,14 +67,14 @@ export class CasualAggregateChart extends React.PureComponent<
|
|||
plotlyProps.data = [
|
||||
{
|
||||
error_y: {
|
||||
array: (this.props.data.pValue as unknown) as Datum[],
|
||||
array: (this.props.data?.pValue?.[0]?.[0] as unknown) as Datum[],
|
||||
type: "data",
|
||||
visible: true
|
||||
},
|
||||
mode: "markers",
|
||||
type: "scatter",
|
||||
x: this.props.data.name,
|
||||
y: this.props.data.point
|
||||
y: this.props.data.point[0][0]
|
||||
}
|
||||
];
|
||||
return plotlyProps;
|
||||
|
|
|
@ -2,38 +2,25 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
import {
|
||||
FontWeights,
|
||||
getTheme,
|
||||
IProcessedStyleSet,
|
||||
IStyle,
|
||||
mergeStyleSets
|
||||
} from "office-ui-fabric-react";
|
||||
|
||||
export interface ICasualAggregateStyles {
|
||||
callout: IStyle;
|
||||
container: IStyle;
|
||||
description: IStyle;
|
||||
infoButton: IStyle;
|
||||
label: IStyle;
|
||||
lasso: IStyle;
|
||||
link: IStyle;
|
||||
table: IStyle;
|
||||
title: IStyle;
|
||||
leftPane: IStyle;
|
||||
rightPane: IStyle;
|
||||
modalContentHelp: IStyle;
|
||||
modalContentHelpText: IStyle;
|
||||
}
|
||||
|
||||
export const CasualAggregateStyles: () => IProcessedStyleSet<
|
||||
ICasualAggregateStyles
|
||||
> = () => {
|
||||
const theme = getTheme();
|
||||
return mergeStyleSets<ICasualAggregateStyles>({
|
||||
callout: {
|
||||
padding: "20px 24px",
|
||||
width: 320
|
||||
},
|
||||
container: {
|
||||
display: "flex",
|
||||
flex: 1,
|
||||
|
@ -44,19 +31,6 @@ export const CasualAggregateStyles: () => IProcessedStyleSet<
|
|||
justifyContent: "space-between",
|
||||
padding: "10px"
|
||||
},
|
||||
infoButton: {
|
||||
borderRadius: "50%",
|
||||
color: theme.semanticColors.bodyText,
|
||||
float: "left",
|
||||
fontSize: "12px",
|
||||
fontWeight: "600",
|
||||
height: "15px",
|
||||
lineHeight: "14px",
|
||||
marginRight: "3px",
|
||||
marginTop: "3px",
|
||||
textAlign: "center",
|
||||
width: "15px"
|
||||
},
|
||||
label: {
|
||||
cursor: "pointer",
|
||||
display: "inline-block",
|
||||
|
@ -77,28 +51,11 @@ export const CasualAggregateStyles: () => IProcessedStyleSet<
|
|||
padding: "10px",
|
||||
width: "70%"
|
||||
},
|
||||
link: {
|
||||
display: "block",
|
||||
marginTop: 20
|
||||
},
|
||||
modalContentHelp: {
|
||||
float: "left",
|
||||
width: "350px"
|
||||
},
|
||||
modalContentHelpText: {
|
||||
padding: "0px 20px",
|
||||
textAlign: "center",
|
||||
wordWrap: "break-word"
|
||||
},
|
||||
rightPane: {
|
||||
width: "25%"
|
||||
},
|
||||
table: {
|
||||
width: "50%"
|
||||
},
|
||||
title: {
|
||||
fontWeight: FontWeights.semilight,
|
||||
marginBottom: 12
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -103,7 +103,13 @@ export class CasualAggregateTable extends React.PureComponent<
|
|||
const len = this.props.data[props[0]].length;
|
||||
for (let i = 0; i < len; i++) {
|
||||
const temp = {};
|
||||
props.forEach((p) => (temp[p] = this.props.data?.[p]?.[i]));
|
||||
props.forEach(
|
||||
(p) =>
|
||||
(temp[p] =
|
||||
p === "name"
|
||||
? this.props.data?.[p]?.[i]
|
||||
: this.props.data?.[p]?.[0]?.[0]?.[i])
|
||||
);
|
||||
items.push(temp);
|
||||
}
|
||||
return items;
|
||||
|
|
|
@ -7,9 +7,11 @@ import {
|
|||
ModelAssessmentContext
|
||||
} from "@responsible-ai/core-ui";
|
||||
import { localization } from "@responsible-ai/localization";
|
||||
import { Callout, IconButton, Link, Stack, Text } from "office-ui-fabric-react";
|
||||
import { Stack, Text } from "office-ui-fabric-react";
|
||||
import React from "react";
|
||||
|
||||
import { CasualCallout } from "../../Common/CasualCallout";
|
||||
|
||||
import { CasualAggregateChart } from "./CasualAggregateChart";
|
||||
import { CasualAggregateStyles } from "./CasualAggregateStyles";
|
||||
import { CasualAggregateTable } from "./CasualAggregateTable";
|
||||
|
@ -17,30 +19,17 @@ import { CasualAggregateTable } from "./CasualAggregateTable";
|
|||
export interface ICasualAggregateViewProps {
|
||||
data: ICasualAnalysisData;
|
||||
}
|
||||
interface ICasualAggregateViewState {
|
||||
showCallout: boolean;
|
||||
}
|
||||
|
||||
export class CasualAggregateView extends React.PureComponent<
|
||||
ICasualAggregateViewProps,
|
||||
ICasualAggregateViewState
|
||||
ICasualAggregateViewProps
|
||||
> {
|
||||
public static contextType = ModelAssessmentContext;
|
||||
public context: React.ContextType<
|
||||
typeof ModelAssessmentContext
|
||||
> = defaultModelAssessmentContext;
|
||||
constructor(props: ICasualAggregateViewProps) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showCallout: false
|
||||
};
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
const styles = CasualAggregateStyles();
|
||||
const buttonId = "casualAggregateCalloutBtn";
|
||||
const labelId = "casualAggregateCalloutLabel";
|
||||
const descriptionId = "casualAggregateCalloutDesp";
|
||||
return (
|
||||
<Stack grow={true} tokens={{ padding: "16px 24px" }}>
|
||||
<Stack horizontal={false} tokens={{ childrenGap: "15px" }}>
|
||||
|
@ -50,48 +39,7 @@ export class CasualAggregateView extends React.PureComponent<
|
|||
<Text variant={"medium"} className={styles.label}>
|
||||
<b>{localization.CasualAnalysis.AggregateView.directAggregate}</b>
|
||||
</Text>
|
||||
<Stack horizontal>
|
||||
<IconButton
|
||||
iconProps={{ iconName: "Info" }}
|
||||
id={buttonId}
|
||||
onClick={this.toggleInfo}
|
||||
className={styles.infoButton}
|
||||
/>
|
||||
<Text variant={"medium"} className={styles.label}>
|
||||
{"Why must casual insights assume unconfoundedness?"}
|
||||
</Text>
|
||||
</Stack>
|
||||
{this.state.showCallout && (
|
||||
<Callout
|
||||
className={styles.callout}
|
||||
ariaLabelledBy={labelId}
|
||||
ariaDescribedBy={descriptionId}
|
||||
role="alertdialog"
|
||||
gapSpace={0}
|
||||
target={`#${buttonId}`}
|
||||
onDismiss={this.toggleInfo}
|
||||
setInitialFocus
|
||||
>
|
||||
<Text
|
||||
block
|
||||
variant="xLarge"
|
||||
className={styles.title}
|
||||
id={labelId}
|
||||
>
|
||||
{localization.CasualAnalysis.AggregateView.unconfounding}
|
||||
</Text>
|
||||
<Text block variant="small" id={descriptionId}>
|
||||
{localization.CasualAnalysis.AggregateView.confoundingFeature}
|
||||
</Text>
|
||||
<Link
|
||||
href="http://microsoft.com"
|
||||
target="_blank"
|
||||
className={styles.link}
|
||||
>
|
||||
{"Learn more"}
|
||||
</Link>
|
||||
</Callout>
|
||||
)}
|
||||
<CasualCallout />
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Stack.Item className={styles.table}>
|
||||
|
@ -104,10 +52,4 @@ export class CasualAggregateView extends React.PureComponent<
|
|||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
private readonly toggleInfo = (): void => {
|
||||
this.setState((prevState) => {
|
||||
return { showCallout: !prevState.showCallout };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import {
|
|||
ColumnCategories,
|
||||
JointDataset,
|
||||
Cohort,
|
||||
ModelExplanationUtils,
|
||||
ChartTypes,
|
||||
IGenericChartProps,
|
||||
ISelectorConfig,
|
||||
|
@ -29,7 +28,9 @@ import {
|
|||
getTheme,
|
||||
Text,
|
||||
DefaultButton,
|
||||
IDropdownOption
|
||||
IDropdownOption,
|
||||
ComboBox,
|
||||
Stack
|
||||
} from "office-ui-fabric-react";
|
||||
import React from "react";
|
||||
|
||||
|
@ -48,17 +49,10 @@ export interface ICasualIndividualChartState {
|
|||
selectedWhatIfRootIndex: number;
|
||||
selectedCohortIndex: number;
|
||||
featuresOption: IDropdownOption[];
|
||||
filteredFeatureList: IDropdownOption[];
|
||||
request?: AbortController;
|
||||
selectedPointsIndexes: number[];
|
||||
pointIsActive: boolean[];
|
||||
customPointIsActive: boolean[];
|
||||
topK: number;
|
||||
sortArray: number[];
|
||||
sortingSeriesIndex: number | undefined;
|
||||
selectedFeatureKey: string;
|
||||
crossClassInfoVisible: boolean;
|
||||
iceTooltipVisible: boolean;
|
||||
}
|
||||
|
||||
export class CasualIndividualChart extends React.PureComponent<
|
||||
|
@ -81,20 +75,13 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
super(props);
|
||||
|
||||
this.state = {
|
||||
crossClassInfoVisible: false,
|
||||
customPointIsActive: [],
|
||||
featuresOption: [],
|
||||
filteredFeatureList: [],
|
||||
iceTooltipVisible: false,
|
||||
pointIsActive: [],
|
||||
request: undefined,
|
||||
selectedCohortIndex: 0,
|
||||
selectedFeatureKey: JointDataset.DataLabelRoot + "0",
|
||||
selectedPointsIndexes: [],
|
||||
selectedWhatIfRootIndex: 0,
|
||||
sortArray: [],
|
||||
sortingSeriesIndex: undefined,
|
||||
topK: 4,
|
||||
xDialogOpen: false,
|
||||
yDialogOpen: false
|
||||
};
|
||||
|
@ -125,8 +112,7 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
|
||||
this.setState({
|
||||
chartProps: this.generateDefaultChartAxes(),
|
||||
featuresOption,
|
||||
filteredFeatureList: featuresOption
|
||||
featuresOption
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -137,8 +123,6 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
if (!this.state) {
|
||||
return;
|
||||
}
|
||||
let sortingSeriesIndex = this.state.sortingSeriesIndex;
|
||||
let sortArray = this.state.sortArray;
|
||||
const selectionsAreEqual = _.isEqual(
|
||||
this.state.selectedPointsIndexes,
|
||||
prevState.selectedPointsIndexes
|
||||
|
@ -174,21 +158,6 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
};
|
||||
}
|
||||
);
|
||||
if (
|
||||
this.state.sortingSeriesIndex === undefined ||
|
||||
!this.state.selectedPointsIndexes.includes(
|
||||
this.state.sortingSeriesIndex
|
||||
)
|
||||
) {
|
||||
if (this.state.selectedPointsIndexes.length !== 0) {
|
||||
sortingSeriesIndex = 0;
|
||||
sortArray = ModelExplanationUtils.getSortIndices(
|
||||
this.selectedFeatureImportance[0].unsortedAggregateY
|
||||
).reverse();
|
||||
} else {
|
||||
sortingSeriesIndex = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
!selectionsAreEqual ||
|
||||
|
@ -197,7 +166,6 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
) {
|
||||
this.forceUpdate();
|
||||
}
|
||||
this.setState({ sortArray, sortingSeriesIndex });
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
|
@ -205,7 +173,7 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
if (!this.context.jointDataset.hasDataset) {
|
||||
return (
|
||||
<MissingParametersPlaceholder>
|
||||
{"This tab requires an evaluation dataset be supplied."}
|
||||
{localization.CasualAnalysis.IndividualView.dataRequired}
|
||||
</MissingParametersPlaceholder>
|
||||
);
|
||||
}
|
||||
|
@ -290,7 +258,7 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
{canRenderChart && (
|
||||
<AccessibleChart
|
||||
plotlyProps={plotlyProps}
|
||||
theme={getTheme() as any}
|
||||
theme={getTheme()}
|
||||
onClickHandler={this.selectPointFromChart}
|
||||
/>
|
||||
)}
|
||||
|
@ -298,51 +266,69 @@ export class CasualIndividualChart extends React.PureComponent<
|
|||
<div className={classNames.horizontalAxisWithPadding}>
|
||||
<div className={classNames.paddingDiv}></div>
|
||||
<div className={classNames.horizontalAxis}>
|
||||
<div>
|
||||
<DefaultButton
|
||||
onClick={this.setXOpen.bind(this, true)}
|
||||
text={
|
||||
this.context.jointDataset.metaDict[
|
||||
this.state.chartProps.xAxis.property
|
||||
].abbridgedLabel
|
||||
}
|
||||
title={
|
||||
this.context.jointDataset.metaDict[
|
||||
this.state.chartProps.xAxis.property
|
||||
].label
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<DefaultButton
|
||||
onClick={this.setXOpen.bind(this, true)}
|
||||
text={
|
||||
this.context.jointDataset.metaDict[
|
||||
this.state.chartProps.xAxis.property
|
||||
].abbridgedLabel
|
||||
}
|
||||
title={
|
||||
this.context.jointDataset.metaDict[
|
||||
this.state.chartProps.xAxis.property
|
||||
].label
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={classNames.legendAndText}>
|
||||
<div className={classNames.legendHlepWrapper}>
|
||||
<Text variant={"small"} className={classNames.legendHelpText}>
|
||||
{localization.Interpret.WhatIfTab.scatterLegendText}
|
||||
<Stack horizontal={false}>
|
||||
<div className={classNames.legendAndText}>
|
||||
<Text variant={"small"} block className={classNames.legendLabel}>
|
||||
{localization.CasualAnalysis.IndividualView.index}
|
||||
</Text>
|
||||
{this.selectedFeatureImportance.length > 0 && (
|
||||
<InteractiveLegend
|
||||
items={this.selectedFeatureImportance.map((row, rowIndex) => {
|
||||
return {
|
||||
activated: this.state.pointIsActive[rowIndex],
|
||||
color: FabricStyles.fabricColorPalette[rowIndex],
|
||||
name: row.name,
|
||||
onDelete: this.toggleSelectionOfPoint.bind(this, row.id)
|
||||
};
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
{this.selectedFeatureImportance.length === 0 && (
|
||||
<Text variant={"xSmall"} className={classNames.smallItalic}>
|
||||
{localization.Interpret.WhatIfTab.noneSelectedYet}
|
||||
</Text>
|
||||
)}
|
||||
</div>
|
||||
<Text variant={"small"} block className={classNames.legendLabel}>
|
||||
{localization.Interpret.WhatIfTab.realPoint}
|
||||
</Text>
|
||||
{this.selectedFeatureImportance.length > 0 && (
|
||||
<InteractiveLegend
|
||||
items={this.selectedFeatureImportance.map((row, rowIndex) => {
|
||||
return {
|
||||
activated: this.state.pointIsActive[rowIndex],
|
||||
color: FabricStyles.fabricColorPalette[rowIndex],
|
||||
name: row.name,
|
||||
onDelete: this.toggleSelectionOfPoint.bind(this, row.id)
|
||||
};
|
||||
})}
|
||||
<div className={classNames.legendAndText}>
|
||||
<ComboBox
|
||||
label={localization.CasualAnalysis.IndividualView.selectTreatment}
|
||||
// onChange={this.setChart}
|
||||
options={[
|
||||
{
|
||||
key: "a",
|
||||
text: "a"
|
||||
},
|
||||
{
|
||||
key: "b",
|
||||
text: "b"
|
||||
},
|
||||
{
|
||||
key: "c",
|
||||
text: "c"
|
||||
}
|
||||
]}
|
||||
ariaLabel={"chart type picker"}
|
||||
useComboBoxAsMenuWidth={true}
|
||||
styles={FabricStyles.smallDropdownStyle}
|
||||
/>
|
||||
)}
|
||||
{this.selectedFeatureImportance.length === 0 && (
|
||||
<Text variant={"xSmall"} className={classNames.smallItalic}>
|
||||
{localization.Interpret.WhatIfTab.noneSelectedYet}
|
||||
</Text>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -40,10 +40,8 @@ export interface ICasualIndividualChartStyles {
|
|||
featureImportanceControls: IStyle;
|
||||
featureImportanceLegend: IStyle;
|
||||
featureImportanceChartAndLegend: IStyle;
|
||||
legendHelpText: IStyle;
|
||||
legendLabel: IStyle;
|
||||
smallItalic: IStyle;
|
||||
legendHlepWrapper: IStyle;
|
||||
choiceBoxArea: IStyle;
|
||||
choiceGroup: IStyle;
|
||||
choiceGroupFlexContainer: IStyle;
|
||||
|
@ -248,14 +246,6 @@ export const casualIndividualChartStyles: () => IProcessedStyleSet<
|
|||
paddingRight: "10px",
|
||||
width: legendWidth
|
||||
},
|
||||
legendHelpText: {
|
||||
fontWeight: "300",
|
||||
lineHeight: "14px",
|
||||
width: "120px"
|
||||
},
|
||||
legendHlepWrapper: {
|
||||
width: "120px"
|
||||
},
|
||||
legendLabel: {
|
||||
fontWeight: "600",
|
||||
paddingBottom: "5px",
|
||||
|
|
|
@ -2,37 +2,24 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
import {
|
||||
FontWeights,
|
||||
getTheme,
|
||||
IProcessedStyleSet,
|
||||
IStyle,
|
||||
mergeStyleSets
|
||||
} from "office-ui-fabric-react";
|
||||
|
||||
export interface ICasualIndividualStyles {
|
||||
callout: IStyle;
|
||||
container: IStyle;
|
||||
description: IStyle;
|
||||
infoButton: IStyle;
|
||||
label: IStyle;
|
||||
lasso: IStyle;
|
||||
link: IStyle;
|
||||
individualTable: IStyle;
|
||||
title: IStyle;
|
||||
individualChart: IStyle;
|
||||
modalContentHelp: IStyle;
|
||||
modalContentHelpText: IStyle;
|
||||
}
|
||||
|
||||
export const CasualIndividualStyles: () => IProcessedStyleSet<
|
||||
ICasualIndividualStyles
|
||||
> = () => {
|
||||
const theme = getTheme();
|
||||
return mergeStyleSets<ICasualIndividualStyles>({
|
||||
callout: {
|
||||
padding: "20px 24px",
|
||||
width: 320
|
||||
},
|
||||
container: {
|
||||
display: "flex",
|
||||
flex: 1,
|
||||
|
@ -49,19 +36,6 @@ export const CasualIndividualStyles: () => IProcessedStyleSet<
|
|||
individualTable: {
|
||||
width: "50%"
|
||||
},
|
||||
infoButton: {
|
||||
borderRadius: "50%",
|
||||
color: theme.semanticColors.bodyText,
|
||||
float: "left",
|
||||
fontSize: "12px",
|
||||
fontWeight: "600",
|
||||
height: "15px",
|
||||
lineHeight: "14px",
|
||||
marginRight: "3px",
|
||||
marginTop: "3px",
|
||||
textAlign: "center",
|
||||
width: "15px"
|
||||
},
|
||||
label: {
|
||||
cursor: "pointer",
|
||||
display: "inline-block",
|
||||
|
@ -76,23 +50,6 @@ export const CasualIndividualStyles: () => IProcessedStyleSet<
|
|||
fontSize: 14,
|
||||
paddingTop: "25px",
|
||||
textAlign: "left"
|
||||
},
|
||||
link: {
|
||||
display: "block",
|
||||
marginTop: 20
|
||||
},
|
||||
modalContentHelp: {
|
||||
float: "left",
|
||||
width: "350px"
|
||||
},
|
||||
modalContentHelpText: {
|
||||
padding: "0px 20px",
|
||||
textAlign: "center",
|
||||
wordWrap: "break-word"
|
||||
},
|
||||
title: {
|
||||
fontWeight: FontWeights.semilight,
|
||||
marginBottom: 12
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -4,13 +4,15 @@
|
|||
import {
|
||||
defaultModelAssessmentContext,
|
||||
ICasualAnalysisData,
|
||||
ICasualAnalysisSingleData,
|
||||
MissingParametersPlaceholder,
|
||||
ModelAssessmentContext
|
||||
} from "@responsible-ai/core-ui";
|
||||
import { localization } from "@responsible-ai/localization";
|
||||
import { Callout, IconButton, Link, Stack, Text } from "office-ui-fabric-react";
|
||||
import { Stack, Text } from "office-ui-fabric-react";
|
||||
import React from "react";
|
||||
|
||||
import { CasualCallout } from "../../Common/CasualCallout";
|
||||
import { CasualAggregateChart } from "../CasualAggregateView/CasualAggregateChart";
|
||||
import { CasualAggregateTable } from "../CasualAggregateView/CasualAggregateTable";
|
||||
|
||||
|
@ -21,8 +23,7 @@ export interface ICasualIndividualViewProps {
|
|||
data: ICasualAnalysisData;
|
||||
}
|
||||
interface ICasualIndividualViewState {
|
||||
showCallout: boolean;
|
||||
selectedDataIndex?: number;
|
||||
selectedData?: ICasualAnalysisSingleData;
|
||||
}
|
||||
|
||||
export class CasualIndividualView extends React.PureComponent<
|
||||
|
@ -36,19 +37,12 @@ export class CasualIndividualView extends React.PureComponent<
|
|||
constructor(props: ICasualIndividualViewProps) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedDataIndex: undefined,
|
||||
showCallout: false
|
||||
selectedData: undefined
|
||||
};
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
const styles = CasualIndividualStyles();
|
||||
const buttonId = "casualIndividualCalloutBtn";
|
||||
const labelId = "casualIndividualCalloutLabel";
|
||||
const descriptionId = "casualIndividualCalloutDesp";
|
||||
const selectedData =
|
||||
this.state.selectedDataIndex &&
|
||||
this.context.jointDataset.getRow(this.state.selectedDataIndex);
|
||||
return (
|
||||
<Stack grow={true} tokens={{ padding: "16px 24px" }}>
|
||||
<Stack.Item>
|
||||
|
@ -66,53 +60,12 @@ export class CasualIndividualView extends React.PureComponent<
|
|||
{localization.CasualAnalysis.IndividualView.directIndividual}
|
||||
</b>
|
||||
</Text>
|
||||
<Stack horizontal>
|
||||
<IconButton
|
||||
iconProps={{ iconName: "Info" }}
|
||||
id={buttonId}
|
||||
onClick={this.toggleInfo}
|
||||
className={styles.infoButton}
|
||||
/>
|
||||
<Text variant={"medium"} className={styles.label}>
|
||||
{"Why must casual insights assume unconfoundedness?"}
|
||||
</Text>
|
||||
</Stack>
|
||||
{this.state.showCallout && (
|
||||
<Callout
|
||||
className={styles.callout}
|
||||
ariaLabelledBy={labelId}
|
||||
ariaDescribedBy={descriptionId}
|
||||
role="alertdialog"
|
||||
gapSpace={0}
|
||||
target={`#${buttonId}`}
|
||||
onDismiss={this.toggleInfo}
|
||||
setInitialFocus
|
||||
>
|
||||
<Text
|
||||
block
|
||||
variant="xLarge"
|
||||
className={styles.title}
|
||||
id={labelId}
|
||||
>
|
||||
{localization.CasualAnalysis.AggregateView.unconfounding}
|
||||
</Text>
|
||||
<Text block variant="small" id={descriptionId}>
|
||||
{localization.CasualAnalysis.AggregateView.confoundingFeature}
|
||||
</Text>
|
||||
<Link
|
||||
href="http://microsoft.com"
|
||||
target="_blank"
|
||||
className={styles.link}
|
||||
>
|
||||
{"Learn more"}
|
||||
</Link>
|
||||
</Callout>
|
||||
)}
|
||||
<CasualCallout />
|
||||
</Stack>
|
||||
</Stack.Item>
|
||||
<Stack.Item className={styles.individualTable}>
|
||||
{selectedData ? (
|
||||
<CasualAggregateTable data={this.props.data.global} />
|
||||
{this.state.selectedData ? (
|
||||
<CasualAggregateTable data={this.state.selectedData} />
|
||||
) : (
|
||||
<MissingParametersPlaceholder>
|
||||
{localization.CasualAnalysis.IndividualView.dataRequired}
|
||||
|
@ -120,22 +73,32 @@ export class CasualIndividualView extends React.PureComponent<
|
|||
)}
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
{selectedData && (
|
||||
<CasualAggregateChart data={this.props.data.global} />
|
||||
{this.state.selectedData && (
|
||||
<CasualAggregateChart data={this.state.selectedData} />
|
||||
)}
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
private readonly toggleInfo = (): void => {
|
||||
this.setState((prevState) => {
|
||||
return { showCallout: !prevState.showCallout };
|
||||
});
|
||||
};
|
||||
private readonly handleOnClick = (dataIndex: number | undefined): void => {
|
||||
this.setState({
|
||||
selectedDataIndex: dataIndex
|
||||
selectedData: this.getDataFromIndex(dataIndex)
|
||||
});
|
||||
};
|
||||
private readonly getDataFromIndex = (
|
||||
dataIndex: number | undefined
|
||||
): ICasualAnalysisSingleData | undefined => {
|
||||
const casualLocal = this.context?.casualAnalysisData?.local;
|
||||
if (!(dataIndex !== undefined && dataIndex >= 0 && casualLocal)) {
|
||||
return undefined;
|
||||
}
|
||||
const keys = Object.keys(casualLocal);
|
||||
const localData = {};
|
||||
keys.map(
|
||||
(k) =>
|
||||
(localData[k] =
|
||||
k === "name" ? casualLocal[k] : [casualLocal[k][dataIndex]])
|
||||
);
|
||||
return (localData as unknown) as ICasualAnalysisSingleData;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {
|
||||
defaultModelAssessmentContext,
|
||||
ModelAssessmentContext
|
||||
} from "@responsible-ai/core-ui";
|
||||
import { localization } from "@responsible-ai/localization";
|
||||
import {
|
||||
Callout,
|
||||
FontWeights,
|
||||
getTheme,
|
||||
IconButton,
|
||||
Link,
|
||||
mergeStyleSets,
|
||||
Stack,
|
||||
Text
|
||||
} from "office-ui-fabric-react";
|
||||
import React from "react";
|
||||
|
||||
interface ICasualCalloutState {
|
||||
showCallout: boolean;
|
||||
selectedDataIndex?: number;
|
||||
}
|
||||
|
||||
export class CasualCallout extends React.Component<
|
||||
Record<string, unknown>,
|
||||
ICasualCalloutState
|
||||
> {
|
||||
public static contextType = ModelAssessmentContext;
|
||||
public context: React.ContextType<
|
||||
typeof ModelAssessmentContext
|
||||
> = defaultModelAssessmentContext;
|
||||
constructor(props: Record<string, unknown>) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showCallout: false
|
||||
};
|
||||
}
|
||||
|
||||
public render(): React.ReactNode {
|
||||
const theme = getTheme();
|
||||
const styles = mergeStyleSets({
|
||||
callout: {
|
||||
padding: "20px 24px",
|
||||
width: 320
|
||||
},
|
||||
description: {
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
padding: "10px"
|
||||
},
|
||||
infoButton: {
|
||||
borderRadius: "50%",
|
||||
color: theme.semanticColors.bodyText,
|
||||
float: "left",
|
||||
fontSize: "12px",
|
||||
fontWeight: "600",
|
||||
height: "15px",
|
||||
lineHeight: "14px",
|
||||
marginRight: "3px",
|
||||
marginTop: "3px",
|
||||
textAlign: "center",
|
||||
width: "15px"
|
||||
},
|
||||
label: {
|
||||
cursor: "pointer",
|
||||
display: "inline-block",
|
||||
flex: "1",
|
||||
fontSize: 14,
|
||||
textAlign: "left"
|
||||
},
|
||||
link: {
|
||||
display: "block",
|
||||
marginTop: 20
|
||||
},
|
||||
title: {
|
||||
fontWeight: FontWeights.semilight,
|
||||
marginBottom: 12
|
||||
}
|
||||
});
|
||||
const buttonId = "casualCalloutBtn";
|
||||
const labelId = "casualCalloutLabel";
|
||||
const descriptionId = "casualCalloutDesp";
|
||||
return (
|
||||
<>
|
||||
<Stack horizontal>
|
||||
<IconButton
|
||||
iconProps={{ iconName: "Info" }}
|
||||
id={buttonId}
|
||||
onClick={this.toggleInfo}
|
||||
className={styles.infoButton}
|
||||
/>
|
||||
<Text variant={"medium"} className={styles.label}>
|
||||
{localization.CasualAnalysis.MainMenu.why}
|
||||
</Text>
|
||||
</Stack>
|
||||
{this.state.showCallout && (
|
||||
<Callout
|
||||
className={styles.callout}
|
||||
ariaLabelledBy={labelId}
|
||||
ariaDescribedBy={descriptionId}
|
||||
role="alertdialog"
|
||||
gapSpace={0}
|
||||
target={`#${buttonId}`}
|
||||
onDismiss={this.toggleInfo}
|
||||
setInitialFocus
|
||||
>
|
||||
<Text block variant="xLarge" className={styles.title} id={labelId}>
|
||||
{localization.CasualAnalysis.AggregateView.unconfounding}
|
||||
</Text>
|
||||
<Text block variant="small" id={descriptionId}>
|
||||
{localization.CasualAnalysis.AggregateView.confoundingFeature}
|
||||
</Text>
|
||||
<Link
|
||||
href="http://microsoft.com"
|
||||
target="_blank"
|
||||
className={styles.link}
|
||||
>
|
||||
{localization.CasualAnalysis.MainMenu.learnMore}
|
||||
</Link>
|
||||
</Callout>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
private readonly toggleInfo = (): void => {
|
||||
this.setState((prevState) => {
|
||||
return { showCallout: !prevState.showCallout };
|
||||
});
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { ErrorCohort } from "@responsible-ai/core-ui";
|
||||
import { ErrorCohort, ICasualAnalysisData } from "@responsible-ai/core-ui";
|
||||
import { ITheme } from "office-ui-fabric-react";
|
||||
import React from "react";
|
||||
|
||||
|
@ -13,6 +13,7 @@ import { ITelemetryMessage } from "../util/ITelemetryMessage";
|
|||
import { JointDataset } from "../util/JointDataset";
|
||||
|
||||
export interface IModelAssessmentContext {
|
||||
casualAnalysisData?: ICasualAnalysisData;
|
||||
dataset: IDataset;
|
||||
modelExplanationData: IModelExplanationData;
|
||||
theme?: ITheme;
|
||||
|
@ -44,6 +45,7 @@ export interface IModelAssessmentContext {
|
|||
|
||||
export const defaultModelAssessmentContext: IModelAssessmentContext = {
|
||||
baseErrorCohort: {} as ErrorCohort,
|
||||
casualAnalysisData: {} as ICasualAnalysisData,
|
||||
dataset: {} as IDataset,
|
||||
errorCohorts: [],
|
||||
jointDataset: {} as JointDataset,
|
||||
|
|
|
@ -5,5 +5,5 @@ import { ICasualAnalysisSingleData } from "./ICasualAnalysisSingleData";
|
|||
|
||||
export interface ICasualAnalysisData {
|
||||
global: ICasualAnalysisSingleData;
|
||||
local: ICasualAnalysisSingleData[];
|
||||
local: ICasualAnalysisSingleData;
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
export interface ICasualAnalysisSingleData {
|
||||
name: string[];
|
||||
point: number[];
|
||||
pValue?: number[];
|
||||
stderr?: number[];
|
||||
zstat?: number[];
|
||||
ciLower?: number[];
|
||||
ciUpper?: number[];
|
||||
point: number[][][];
|
||||
pValue: number[][][];
|
||||
stderr: number[][][];
|
||||
zstat: number[][][];
|
||||
ciLower: number[][][];
|
||||
ciUpper: number[][][];
|
||||
}
|
||||
|
|
|
@ -600,10 +600,12 @@
|
|||
"binaryDescription": "On average in this sample, turing on this feature will cause the outcome to increase by X units"
|
||||
},
|
||||
"IndividualView": {
|
||||
"index": "Datapoint index",
|
||||
"description": "Individual casual effects can inform targeted or personalized interventions, such as a targeted promition to customers or an individualized treatment plan. How will an individual with a particular set of features respond to a change in a causal driver? These plots show the marginal change in an outcome when each causal driver is changed. The causal what-if tool calculates counterfactual real world outcomes for a particular individual if you changed their causal drivers. For this tool, you need to specify the current outcome and current treatment option for an observation, then specify the counterfactual treatment you would like to explore.",
|
||||
"directIndividual": "Direct individual casual effect of each treatment with 95% confidence interval",
|
||||
"missingParameters": "This tab requires an evaluation dataset be supplied.",
|
||||
"dataRequired": "This tab requires a datapoint be selected."
|
||||
"dataRequired": "This tab requires a datapoint be selected.",
|
||||
"selectTreatment": "Select treatment"
|
||||
}
|
||||
},
|
||||
"ErrorAnalysis": {
|
||||
|
|
|
@ -62,6 +62,7 @@ export class ModelAssessmentDashboard extends CohortBasedComponent<
|
|||
<ModelAssessmentContext.Provider
|
||||
value={{
|
||||
baseErrorCohort: this.state.baseCohort,
|
||||
casualAnalysisData: this.props.casualAnalysisData,
|
||||
dataset: this.props.dataset,
|
||||
errorCohorts: this.state.cohorts,
|
||||
jointDataset: this.state.jointDataset,
|
||||
|
|
Загрузка…
Ссылка в новой задаче