Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions process_improvement/calculations/capability_calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def calculate_capability_indices(
LSL: int,
Target: int,
round_value: int = 2,
) -> dict[str, float]:
) -> ProcessCapabilityIndices:
"""
Calculate process capability and performance indices.

Expand Down Expand Up @@ -142,4 +142,4 @@ def calculate_capability_indices(
mean=mean,
s=s, # The standard deviation
average_mR=ave_mR,
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def taguchi_loss_calcs(
USL: float,
LSL: float,
Target: Optional[float] = None
) -> dict[str, float or list]:
) -> TaguchiLossCalcResults:
"""
Compute quadratic loss function (Taguchi loss function) values over a
specification range.
Expand Down Expand Up @@ -117,9 +117,9 @@ def expected_loss_calc(
USL: float,
LSL: float,
Target: Optional[float] = None,
cost_of_scrap: Optional[float] = 1,
cost_of_scrap: float = 1,
# round_value: Optional[float] = 1
) -> dict[str, float or list]:
) -> ExpectedLossCalcResults:
"""
Docstring for expected_loss
Expand Down Expand Up @@ -157,4 +157,4 @@ def expected_loss_calc(

return ExpectedLossCalcResults(
df=stats_df
)
)
4 changes: 2 additions & 2 deletions process_improvement/calculations/xmr_calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def calculate_xmr_limits(
restrict_LPL: bool,
max_value: float = 100.0,
min_value: float = 0.0
) -> dict[str, float]:
) -> XmRLimits:
"""
Calculate Individuals and Moving Range (XmR) process limits.
Expand Down Expand Up @@ -227,4 +227,4 @@ def characterize_mr_variation(
),
index=mr.index,
name="mR chart variation"
)
)