-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmatching.py
More file actions
20 lines (18 loc) · 808 Bytes
/
matching.py
File metadata and controls
20 lines (18 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from ..dataset.dataset import DatasetAdapter, ExperimentData
from ..dataset.roles import StatisticRole
from ..operators.operators import MatchingMetrics
from ..utils.enums import ExperimentDataEnum
from .abstract import Analyzer
class MatchingAnalyzer(Analyzer):
def execute(self, data: ExperimentData):
variables = data.variables[
data.get_one_id(MatchingMetrics, space=ExperimentDataEnum.variables)
]
columns = ["Effect Size", "Standard Error", "P-value", "CI Lower", "CI Upper"]
return self._set_value(
data,
DatasetAdapter.to_dataset(
variables,
{field: StatisticRole() for field in list(variables.keys())},
).transpose(roles={column: StatisticRole() for column in columns}),
)