(self, X, y, sample_weight=None)
return self
Compute reference sinusoid signal

        These sinusoid are generated for each frequency in the dataset
Compute reference sinusoid signal
Compute reference sinusoid signal
def fit(self, X, y, sample_weight=None):
        """Compute reference sinusoid signal

        These sinusoid are generated for each frequency in the dataset
        """
        n_times = X.shape[2]

        for f in self.freqs:
            if f.replace(".", "", 1).isnumeric():
                freq = float(f)
                yf = []
                for h in range(1, self.n_harmonics + 1):
                    yf.append(
                        np.sin(2 * np.pi * freq * h * np.linspace(0, self.slen, n_times))
                    )
                    yf.append(
                        np.cos(2 * np.pi * freq * h * np.linspace(0, self.slen, n_times))
                    )
                self.Yf[f] = np.array(yf)
        return self
def fit ( self , X , y , sample_weight = None ) : n_times = X . shape [ 2 ] for f in self . freqs : if f . replace ( "." , "" , 1 ) . isnumeric ( ) : freq = float ( f ) yf = [ ] for h in range ( 1 , self . n_harmonics + 1 ) : yf . append ( np . sin ( 2 * np . pi * freq * h * np . linspace ( 0 , self . slen , n_times ) ) ) yf . append ( np . cos ( 2 * np . pi * freq * h * np . linspace ( 0 , self . slen , n_times ) ) ) self . Yf [ f ] = np . array ( yf ) return self