Coverage for C: \ Users \ peaco \ OneDrive \ Documents \ GitHub \ mt_metadata \ mt_metadata \ processing \ aurora \ regression.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-10 00:11 -0800

1# ===================================================== 

2# Imports 

3# ===================================================== 

4from typing import Annotated 

5 

6from pydantic import Field 

7 

8from mt_metadata.base import MetadataBase 

9 

10 

11# ===================================================== 

12class Regression(MetadataBase): 

13 minimum_cycles: Annotated[ 

14 int, 

15 Field( 

16 default=1, 

17 description="Minimum number of cycles in the regression", 

18 alias=None, 

19 json_schema_extra={ 

20 "units": None, 

21 "required": True, 

22 "examples": ["10"], 

23 }, 

24 ), 

25 ] 

26 

27 max_iterations: Annotated[ 

28 int, 

29 Field( 

30 default=10, 

31 description="Max iterations of the regression", 

32 alias=None, 

33 json_schema_extra={ 

34 "units": None, 

35 "required": True, 

36 "examples": ["10"], 

37 }, 

38 ), 

39 ] 

40 

41 max_redescending_iterations: Annotated[ 

42 int, 

43 Field( 

44 default=2, 

45 description="Max redescending iterations of the regression", 

46 alias=None, 

47 json_schema_extra={ 

48 "units": None, 

49 "required": True, 

50 "examples": ["2"], 

51 }, 

52 ), 

53 ] 

54 

55 r0: Annotated[ 

56 float, 

57 Field( 

58 default=1.5, 

59 description="The number of standard deviations where the influence function changes from linear to quadratic", 

60 alias=None, 

61 json_schema_extra={ 

62 "units": None, 

63 "required": True, 

64 "examples": ["1.4"], 

65 }, 

66 ), 

67 ] 

68 

69 u0: Annotated[ 

70 float, 

71 Field( 

72 default=2.8, 

73 description="Control for redescending Huber regression weights.", 

74 alias=None, 

75 json_schema_extra={ 

76 "units": None, 

77 "required": True, 

78 "examples": ["2.8"], 

79 }, 

80 ), 

81 ] 

82 

83 tolerance: Annotated[ 

84 float, 

85 Field( 

86 default=0.005, 

87 description="Control for convergence of RME algorithm. Lower means more iterations", 

88 alias=None, 

89 json_schema_extra={ 

90 "units": None, 

91 "required": True, 

92 "examples": ["0.005"], 

93 }, 

94 ), 

95 ] 

96 

97 verbosity: Annotated[ 

98 int, 

99 Field( 

100 default=1, 

101 description="Control for logging messages during regression -- Higher means more messages", 

102 alias=None, 

103 json_schema_extra={ 

104 "units": None, 

105 "required": True, 

106 "examples": ["1"], 

107 }, 

108 ), 

109 ]