Skip to content

Commit

Permalink
added interface for statistic modules
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraBoenchenLB committed Sep 16, 2024
1 parent 742f403 commit 53a3ba0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from typing import Dict

import polars as pl

from medmodels.medrecord import MedRecord
from medmodels.medrecord.querying import NodeOperation
from medmodels.medrecord.schema import AttributeType

def determine_attribute_type(attribute_values: pl.Series) -> AttributeType: ...
def get_continuos_attribute_statistics(
medrecord: MedRecord, attribute_query: NodeOperation
) -> Dict[str, float]: ...
def get_temporal_attribute_statistics(
medrecord: MedRecord, attribute_query: NodeOperation
) -> Dict[str, str]: ...
def get_categorical_attribute_statistics(
medrecord: MedRecord, attribute_query: NodeOperation
) -> Dict[str, str]: ...
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from typing import Dict, List, Union

from numpy.typing import ArrayLike

class TestHypothesis:
alpha: float
samples: List[ArrayLike]
sample_number: int
normal_distribution: bool
test: str
hypothesis: str
p_value: float

def test_for_normal_distribution(self) -> bool: ...
def decide_hypothesis_test(self) -> Dict[str, Union[str, bool, float]]: ...
def two_tailed_t_test(self) -> float: ...
def mann_whitney_u_test(self) -> float: ...
def ANOVA(self) -> float: ...
def chi_sqare_independece_test(self) -> float: ...
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies = [
"pandas>=2.2.2",
"polars[pandas]>=1.6.0",
"scikit-learn>=1.5.0",
"scipy>=1.9.0",
]

[project.optional-dependencies]
Expand Down

0 comments on commit 53a3ba0

Please sign in to comment.