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

Counterfactual applied to state_value is not used on state_value's target state component #244

Open
AJamesPhillips opened this issue Apr 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AJamesPhillips
Copy link
Owner

Describe the bug

In the screenshot below the state_value component "Alternative state value for Some state no2", targets the state component "Some state no2". And the counterfactual component "Counterfactual of: Alternative state value for Some state no2" targets this state_value component. However the counterfactual state is not applied to the state component. Nor is it possible to target the state component directly as seen by "Counterfactual of: Some state no2" not having the option to set a counterfactual of the new values forced by the state_value component.

image

To Reproduce

Steps to reproduce the behavior, see this view or use the following components:

[
  {
    "id": "0f7085b0-0bac-4b42-a088-4674b3868a37",
    "created_at": "2023-10-01T23:18:48.510Z",
    "title": "Some state no2",
    "description": "",
    "type": "statev2",
    "values_and_prediction_sets": [
      {
        "id": "vps7ac8468e-330e-42e2-a4f5-d358b1e5a2f8",
        "created_at": "2024-04-09T20:03:12.493Z",
        "base_id": 1,
        "datetime": {},
        "entries": [
          {
            "id": "VAP6cbd318c-5aaa-4cd5-85e3-43edbaf05cc4",
            "explanation": "",
            "probability": 1,
            "conviction": 1,
            "value": "111",
            "description": "",
            "value_id": "b972e48e-cf1e-488f-b7a2-2e053e3ae98a",
            "relative_probability": 1
          },
          {
            "id": "VAP1eea1af5-b813-46d5-a4f0-621cbb5034fd",
            "explanation": "",
            "probability": 0,
            "conviction": 1,
            "value": "222",
            "description": "",
            "relative_probability": 0
          }
        ]
      }
    ],
    "label_ids": [],
    "modified_by_username": "ajp",
    "modified_at": "2024-04-09T20:04:31.726Z",
    "subtype": "number",
    "value_possibilities": {
      "b972e48e-cf1e-488f-b7a2-2e053e3ae98a": {
        "id": "b972e48e-cf1e-488f-b7a2-2e053e3ae98a",
        "value": "111",
        "description": "",
        "order": 0
      }
    },
    "base_id": 1
  },
  {
    "id": "ce2f13e6-10c9-48c9-874a-36d5fb2aed28",
    "created_at": "2024-04-09T20:03:28.018Z",
    "title": "",
    "description": "",
    "type": "counterfactualv2",
    "values_and_prediction_sets": [],
    "label_ids": [],
    "modified_by_username": "ajp",
    "modified_at": "2024-04-09T20:50:57.023Z",
    "target_wcomponent_id": "0f7085b0-0bac-4b42-a088-4674b3868a37",
    "target_VAP_set_id": "vps7ac8468e-330e-42e2-a4f5-d358b1e5a2f8",
    "target_VAP_id": "VAP1eea1af5-b813-46d5-a4f0-621cbb5034fd",
    "base_id": 1
  },
  {
    "id": "e162edf1-6768-4086-ad7a-19f25b420609",
    "created_at": "2023-10-01T23:18:59.717Z",
    "title": "Alternative [state value](https://datacurator.org/) for @@0f7085b0-0bac-4b42-a088-4674b3868a37 <auto generated/>",
    "description": "",
    "type": "state_value",
    "values_and_prediction_sets": [
      {
        "id": "vpsb3864d12-f6fb-44fa-8be0-919574f4fb53",
        "created_at": "2023-10-01T23:21:13.980Z",
        "base_id": 1,
        "datetime": {},
        "entries": [
          {
            "id": "VAPb9717023-50a7-436f-86e2-01eebce0fb02",
            "explanation": "",
            "probability": 1,
            "conviction": 1,
            "value": "123",
            "description": "",
            "value_id": "169f00ce-7096-4a81-b59e-77b30d0e1537",
            "relative_probability": 1
          },
          {
            "id": "VAPea078af5-9361-4513-80aa-9fbb0819d258",
            "explanation": "",
            "probability": 0,
            "conviction": 1,
            "value": "456",
            "description": "",
            "relative_probability": 0
          }
        ]
      }
    ],
    "label_ids": [],
    "modified_by_username": "ajp",
    "modified_at": "2024-04-09T20:04:43.126Z",
    "attribute_wcomponent_id": "0f7085b0-0bac-4b42-a088-4674b3868a37",
    "value_possibilities": {
      "169f00ce-7096-4a81-b59e-77b30d0e1537": {
        "id": "169f00ce-7096-4a81-b59e-77b30d0e1537",
        "value": "123",
        "description": "",
        "order": 0
      }
    },
    "base_id": 1
  },
  {
    "id": "8c7ae547-65db-4c7c-a7cc-044946cc672b",
    "created_at": "2024-04-09T20:04:04.252Z",
    "title": "Counterfactual of: Alternative [state value](https://datacurator.org/) for @@0f7085b0-0bac-4b42-a088-4674b3868a37 <auto generated/>",
    "description": "",
    "type": "counterfactualv2",
    "values_and_prediction_sets": [],
    "label_ids": [],
    "modified_by_username": "ajp",
    "modified_at": "2024-04-09T20:48:32.120Z",
    "target_wcomponent_id": "e162edf1-6768-4086-ad7a-19f25b420609",
    "target_VAP_set_id": "vpsb3864d12-f6fb-44fa-8be0-919574f4fb53",
    "target_VAP_id": "VAPea078af5-9361-4513-80aa-9fbb0819d258",
    "base_id": 1
  }
]

Expected behavior

The counterfactual of "Counterfactual of: Alternative state value for Some state no2" is correctly applied to state_value component "Alternative state value for Some state no2" and this should then be applied to the state component "Some state no2".

@AJamesPhillips AJamesPhillips added the bug Something isn't working label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant