@@ -18,102 +18,92 @@ namespace khiva.interop
18
18
/// </summary>
19
19
public static class DLLNormalization
20
20
{
21
-
22
- /// <summary> Normalizes the given time series according to its maximum value and adjusts each value within the range
23
- /// (-1, 1).
24
- ///</summary>
25
- /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
26
- /// one indicates the number of time series.</param>
27
- /// <param name="result">An array with the same dimensions as tss, whose values (time series in dimension 0) have been
28
- /// normalized by dividing each number by 10^j, where j is the number of integer digits of the max number in the time
29
- /// series.</param>
21
+ /// <summary> Normalizes the given time series according to its maximum value and adjusts each value within the range
22
+ /// (-1, 1).
23
+ ///</summary>
24
+ /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
25
+ /// one indicates the number of time series.</param>
26
+ /// <param name="result">An array with the same dimensions as tss, whose values (time series in dimension 0) have been
27
+ /// normalized by dividing each number by 10^j, where j is the number of integer digits of the max number in the time series.</param>
30
28
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
31
29
public extern static void decimal_scaling_norm ( [ In ] ref IntPtr tss , [ Out ] out IntPtr result ) ;
32
-
33
30
34
- /// <summary> Same as decimal_scaling_norm, but it performs the operation in place, without allocating further memory.
35
- ///</summary>
36
- /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
37
- /// one indicates the number of time series.</param>
31
+ /// <summary> Same as decimal_scaling_norm, but it performs the operation in place, without allocating further memory.
32
+ ///</summary>
33
+ /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
34
+ /// one indicates the number of time series.</param>
38
35
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
39
36
public extern static void decimal_scaling_norm_in_place ( [ In , Out ] ref IntPtr tss ) ;
40
-
41
37
42
- /// <summary> Normalizes the given time series according to its minimum and maximum value and adjusts each value within the
43
- /// range [low, high].
44
- ///</summary>
45
- /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
46
- /// one indicates the number of time series.</param>
47
- /// <param name="high">Maximum final value (Defaults to 1.0).</param>
48
- /// <param name="low"> Minimum final value (Defaults to 0.0).</param>
49
- /// <param name="epsilon">Safeguard for constant (or near constant) time series as the operation implies a unit scale operation
50
- /// between min and max values in the tss.</param>
51
- /// <param name="result">KhivaArray with the same dimensions as tss, whose values (time series in dimension 0) have been
52
- /// normalized by maximum and minimum values, and scaled as per high and low parameters.</param>
38
+ /// <summary> Normalizes the given time series according to its minimum and maximum value and adjusts each value within the
39
+ /// range [low, high].
40
+ ///</summary>
41
+ /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
42
+ /// one indicates the number of time series.</param>
43
+ /// <param name="high">Maximum final value (Defaults to 1.0).</param>
44
+ /// <param name="low"> Minimum final value (Defaults to 0.0).</param>
45
+ /// <param name="epsilon">Safeguard for constant (or near constant) time series as the operation implies a unit scale operation
46
+ /// between min and max values in the tss.</param>
47
+ /// <param name="result">KhivaArray with the same dimensions as tss, whose values (time series in dimension 0) have been
48
+ /// normalized by maximum and minimum values, and scaled as per high and low parameters.</param>
53
49
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
54
50
public extern static void max_min_norm ( [ In ] ref IntPtr tss , [ In ] ref double high , [ In ] ref double low , [ In ] ref double epsilon , [ Out ] out IntPtr result ) ;
55
-
56
51
57
- /// <summary> Same as max_min_norm, but it performs the operation in place, without allocating further memory.
58
- ///</summary>
59
- /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
60
- /// one indicates the number of time series.</param>
61
- /// <param name="high">Maximum final value (Defaults to 1.0).</param>
62
- /// <param name="low"> Minimum final value (Defaults to 0.0).</param>
63
- /// <param name="epsilon">Safeguard for constant (or near constant) time series as the operation implies a unit scale operation
64
- /// between min and max values in the tss.</param>
52
+ /// <summary> Same as max_min_norm, but it performs the operation in place, without allocating further memory.
53
+ ///</summary>
54
+ /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
55
+ /// one indicates the number of time series.</param>
56
+ /// <param name="high">Maximum final value (Defaults to 1.0).</param>
57
+ /// <param name="low"> Minimum final value (Defaults to 0.0).</param>
58
+ /// <param name="epsilon">Safeguard for constant (or near constant) time series as the operation implies a unit scale operation
59
+ /// between min and max values in the tss.</param>
65
60
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
66
61
public extern static void max_min_norm_in_place ( [ In , Out ] ref IntPtr tss , [ In ] ref double high , [ In ] ref double low , [ In ] ref double epsilon ) ;
67
-
68
62
69
- /// <summary> Normalizes the given time series according to its maximum-minimum value and its mean. It follows the following
70
- /// formulae:
71
- /// \f[
72
- /// \acute{x} = \frac{x - mean(x)}{max(x) - min(x)}.
73
- /// \f]
74
- ///</summary>
75
- /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
76
- /// one indicates the number of time series.
77
- ///</param>
78
- /// <param name="result">An array with the same dimensions as tss, whose values (time series in dimension 0) have been
79
- /// normalized by substracting the mean from each number and dividing each number by \f$ max(x) - min(x)\f$, in the
80
- /// time series.</param>
63
+ /// <summary> Normalizes the given time series according to its maximum-minimum value and its mean. It follows the following
64
+ /// formulae:
65
+ /// \f[
66
+ /// \acute{x} = \frac{x - mean(x)}{max(x) - min(x)}.
67
+ /// \f]
68
+ ///</summary>
69
+ /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
70
+ /// one indicates the number of time series.
71
+ ///</param>
72
+ /// <param name="result">An array with the same dimensions as tss, whose values (time series in dimension 0) have been
73
+ /// normalized by substracting the mean from each number and dividing each number by \f$ max(x) - min(x)\f$, in the
74
+ /// time series.</param>
81
75
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
82
76
public extern static void mean_norm ( [ In ] ref IntPtr tss , [ Out ] out IntPtr result ) ;
83
-
84
77
85
- /// <summary> Normalizes the given time series according to its maximum-minimum value and its mean. It follows the following
86
- /// formulae:
87
- /// \f[
88
- /// \acute{x} = \frac{x - mean(x)}{max(x) - min(x)}.
89
- /// \f]
90
- ///</summary>
91
- /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
92
- /// one indicates the number of time series.</param>
78
+ /// <summary> Normalizes the given time series according to its maximum-minimum value and its mean. It follows the following
79
+ /// formulae:
80
+ /// \f[
81
+ /// \acute{x} = \frac{x - mean(x)}{max(x) - min(x)}.
82
+ /// \f]
83
+ ///</summary>
84
+ /// <param name="tss">Expects an input array whose dimension zero is the length of the time series (all the same) and dimension
85
+ /// one indicates the number of time series.</param>
93
86
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
94
87
public extern static void mean_norm_in_place ( [ In , Out ] ref IntPtr tss ) ;
95
-
96
88
97
- /// <summary> Calculates a new set of times series with zero mean and standard deviation one.
98
- ///</summary>
99
- /// <param name="tss">Time series concatenated in a single row.</param>
100
- /// <param name="epsilon">Minimum standard deviation to consider. It acts as a gatekeeper for
101
- /// those time series that may be constant or near constant.</param>
102
- /// <param name="result">KhivaArray with the same dimensions as tss where the time series have been
103
- /// adjusted for zero mean and one as standard deviation.</param>
89
+ /// <summary> Calculates a new set of times series with zero mean and standard deviation one.
90
+ ///</summary>
91
+ /// <param name="tss">Time series concatenated in a single row.</param>
92
+ /// <param name="epsilon">Minimum standard deviation to consider. It acts as a gatekeeper for
93
+ /// those time series that may be constant or near constant.</param>
94
+ /// <param name="result">KhivaArray with the same dimensions as tss where the time series have been
95
+ /// adjusted for zero mean and one as standard deviation.</param>
104
96
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
105
97
public extern static void znorm ( [ In ] ref IntPtr tss , [ In ] ref double epsilon , [ Out ] out IntPtr result ) ;
106
-
107
98
108
- /// <summary> Adjusts the time series in the given input and performs z-norm
109
- /// inplace (without allocating further memory).
110
- ///</summary>
111
- /// <param name="tss">Expects an input array whose dimension zero is the length of the time
112
- /// series (all the same) and dimension one indicates the number of time series.</param>
113
- /// <param name="epsilon">Minimum standard deviation to consider. It acts as a gatekeeper for
114
- /// those time series that may be constant or near constant.</param>
99
+ /// <summary> Adjusts the time series in the given input and performs z-norm
100
+ /// inplace (without allocating further memory).
101
+ ///</summary>
102
+ /// <param name="tss">Expects an input array whose dimension zero is the length of the time
103
+ /// series (all the same) and dimension one indicates the number of time series.</param>
104
+ /// <param name="epsilon">Minimum standard deviation to consider. It acts as a gatekeeper for
105
+ /// those time series that may be constant or near constant.</param>
115
106
[ DllImport ( DLLLibrary . khivaPath , CallingConvention = CallingConvention . Cdecl ) ]
116
107
public extern static void znorm_in_place ( [ In , Out ] ref IntPtr tss , [ In ] ref double epsilon ) ;
117
-
118
108
}
119
109
}
0 commit comments