SYMBOL INDEX (983 symbols across 79 files) FILE: data_provider/data_factory.py function data_provider (line 22) | def data_provider(args, flag): FILE: data_provider/data_loader.py class Dataset_ETT_hour (line 21) | class Dataset_ETT_hour(Dataset): method __init__ (line 22) | def __init__(self, args, root_path, flag='train', size=None, method __read_data__ (line 51) | def __read_data__(self): method __getitem__ (line 101) | def __getitem__(self, index): method __len__ (line 114) | def __len__(self): method inverse_transform (line 117) | def inverse_transform(self, data): class Dataset_ETT_minute (line 121) | class Dataset_ETT_minute(Dataset): method __init__ (line 122) | def __init__(self, args, root_path, flag='train', size=None, method __read_data__ (line 151) | def __read_data__(self): method __getitem__ (line 203) | def __getitem__(self, index): method __len__ (line 216) | def __len__(self): method inverse_transform (line 219) | def inverse_transform(self, data): class Dataset_Custom (line 223) | class Dataset_Custom(Dataset): method __init__ (line 224) | def __init__(self, args, root_path, flag='train', size=None, method __read_data__ (line 253) | def __read_data__(self): method __getitem__ (line 313) | def __getitem__(self, index): method __len__ (line 326) | def __len__(self): method inverse_transform (line 329) | def inverse_transform(self, data): class Dataset_M4 (line 333) | class Dataset_M4(Dataset): method __init__ (line 334) | def __init__(self, args, root_path, flag='pred', size=None, method __read_data__ (line 358) | def __read_data__(self): method __getitem__ (line 370) | def __getitem__(self, index): method __len__ (line 390) | def __len__(self): method inverse_transform (line 393) | def inverse_transform(self, data): method last_insample_window (line 396) | def last_insample_window(self): class PSMSegLoader (line 412) | class PSMSegLoader(Dataset): method __init__ (line 413) | def __init__(self, args, root_path, win_size, step=1, flag="train"): method __len__ (line 449) | def __len__(self): method __getitem__ (line 459) | def __getitem__(self, index): class MSLSegLoader (line 474) | class MSLSegLoader(Dataset): method __init__ (line 475) | def __init__(self, args, root_path, win_size, step=1, flag="train"): method __len__ (line 512) | def __len__(self): method __getitem__ (line 522) | def __getitem__(self, index): class SMAPSegLoader (line 537) | class SMAPSegLoader(Dataset): method __init__ (line 538) | def __init__(self, args, root_path, win_size, step=1, flag="train"): method __len__ (line 576) | def __len__(self): method __getitem__ (line 587) | def __getitem__(self, index): class SMDSegLoader (line 602) | class SMDSegLoader(Dataset): method __init__ (line 603) | def __init__(self, args, root_path, win_size, step=100, flag="train"): method __len__ (line 637) | def __len__(self): method __getitem__ (line 647) | def __getitem__(self, index): class SWATSegLoader (line 662) | class SWATSegLoader(Dataset): method __init__ (line 663) | def __init__(self, args, root_path, win_size, step=1, flag="train"): method __len__ (line 693) | def __len__(self): method __getitem__ (line 706) | def __getitem__(self, index): class UEAloader (line 721) | class UEAloader(Dataset): method __init__ (line 738) | def __init__(self, args, root_path, file_list=None, limit_size=None, f... method _resolve_ts_path (line 762) | def _resolve_ts_path(self, root_path, dataset_name, flag): method load_all (line 770) | def load_all(self, root_path, file_list=None, flag=None): method load_single (line 788) | def load_single(self, filepath): method instance_norm (line 824) | def instance_norm(self, case): method __getitem__ (line 834) | def __getitem__(self, ind): method __len__ (line 849) | def __len__(self): FILE: data_provider/m4.py function _ensure_m4_triplet (line 37) | def _ensure_m4_triplet(root_dir="./dataset/m4", repo_id=HUGGINGFACE_REPO): function url_file_name (line 57) | def url_file_name(url: str) -> str: function download (line 67) | def download(url: str, file_path: str) -> None: class M4Dataset (line 96) | class M4Dataset: method load (line 104) | def load(training: bool = True, dataset_file: str = '../dataset/m4') -... class M4Meta (line 125) | class M4Meta: function load_m4_info (line 155) | def load_m4_info() -> pd.DataFrame: FILE: data_provider/uea.py function collate_fn (line 7) | def collate_fn(data, max_len=None): function padding_mask (line 45) | def padding_mask(lengths, max_len=None): class Normalizer (line 58) | class Normalizer(object): method __init__ (line 63) | def __init__(self, norm_type='standardization', mean=None, std=None, m... method normalize (line 78) | def normalize(self, df): function interpolate_missing (line 110) | def interpolate_missing(y): function subsample (line 119) | def subsample(y, limit=256, factor=2): FILE: exp/exp_anomaly_detection.py class Exp_Anomaly_Detection (line 20) | class Exp_Anomaly_Detection(Exp_Basic): method __init__ (line 21) | def __init__(self, args): method _build_model (line 24) | def _build_model(self): method _get_data (line 31) | def _get_data(self, flag): method _select_optimizer (line 35) | def _select_optimizer(self): method _select_criterion (line 39) | def _select_criterion(self): method vali (line 43) | def vali(self, vali_data, vali_loader, criterion): method train (line 63) | def train(self, setting): method test (line 128) | def test(self, setting, test=0): FILE: exp/exp_basic.py class Exp_Basic (line 10) | class Exp_Basic(object): method __init__ (line 11) | def __init__(self, args): method _scan_models_directory (line 25) | def _scan_models_directory(self): method _build_model (line 48) | def _build_model(self): method _acquire_device (line 52) | def _acquire_device(self): method _get_data (line 66) | def _get_data(self): method vali (line 69) | def vali(self): method train (line 72) | def train(self): method test (line 75) | def test(self): class LazyModelDict (line 79) | class LazyModelDict(dict): method __init__ (line 83) | def __init__(self, model_map): method __getitem__ (line 87) | def __getitem__(self, key): FILE: exp/exp_classification.py class Exp_Classification (line 16) | class Exp_Classification(Exp_Basic): method __init__ (line 17) | def __init__(self, args): method _build_model (line 20) | def _build_model(self): method _get_data (line 34) | def _get_data(self, flag): method _select_optimizer (line 38) | def _select_optimizer(self): method _select_criterion (line 43) | def _select_criterion(self): method vali (line 47) | def vali(self, vali_data, vali_loader, criterion): method train (line 79) | def train(self, setting): method test (line 145) | def test(self, setting, test=0): FILE: exp/exp_imputation.py class Exp_Imputation (line 16) | class Exp_Imputation(Exp_Basic): method __init__ (line 17) | def __init__(self, args): method _build_model (line 20) | def _build_model(self): method _get_data (line 27) | def _get_data(self, flag): method _select_optimizer (line 31) | def _select_optimizer(self): method _select_criterion (line 35) | def _select_criterion(self): method vali (line 39) | def vali(self, vali_data, vali_loader, criterion): method train (line 78) | def train(self, setting): method test (line 156) | def test(self, setting, test=0): FILE: exp/exp_long_term_forecasting.py class Exp_Long_Term_Forecast (line 18) | class Exp_Long_Term_Forecast(Exp_Basic): method __init__ (line 19) | def __init__(self, args): method _build_model (line 22) | def _build_model(self): method _get_data (line 29) | def _get_data(self, flag): method _select_optimizer (line 33) | def _select_optimizer(self): method _select_criterion (line 37) | def _select_criterion(self): method vali (line 42) | def vali(self, vali_data, vali_loader, criterion): method train (line 76) | def train(self, setting): method test (line 168) | def test(self, setting, test=0): FILE: exp/exp_short_term_forecasting.py class Exp_Short_Term_Forecast (line 19) | class Exp_Short_Term_Forecast(Exp_Basic): method __init__ (line 20) | def __init__(self, args): method _build_model (line 23) | def _build_model(self): method _get_data (line 35) | def _get_data(self, flag): method _select_optimizer (line 39) | def _select_optimizer(self): method _select_criterion (line 43) | def _select_criterion(self, loss_name='MSE'): method train (line 53) | def train(self, setting): method vali (line 129) | def vali(self, train_loader, vali_loader, criterion): method test (line 160) | def test(self, setting, test=0): FILE: exp/exp_zero_shot_forecasting.py class Exp_Zero_Shot_Forecast (line 18) | class Exp_Zero_Shot_Forecast(Exp_Basic): method __init__ (line 19) | def __init__(self, args): method _build_model (line 22) | def _build_model(self): method _get_data (line 29) | def _get_data(self, flag): method _select_optimizer (line 33) | def _select_optimizer(self): method _select_criterion (line 37) | def _select_criterion(self): method test (line 41) | def test(self, setting, test=0): FILE: layers/AutoCorrelation.py class AutoCorrelation (line 11) | class AutoCorrelation(nn.Module): method __init__ (line 19) | def __init__(self, mask_flag=True, factor=1, scale=None, attention_dro... method time_delay_agg_training (line 27) | def time_delay_agg_training(self, values, corr): method time_delay_agg_inference (line 51) | def time_delay_agg_inference(self, values, corr): method time_delay_agg_full (line 78) | def time_delay_agg_full(self, values, corr): method forward (line 102) | def forward(self, queries, keys, values, attn_mask): class AutoCorrelationLayer (line 131) | class AutoCorrelationLayer(nn.Module): method __init__ (line 132) | def __init__(self, correlation, d_model, n_heads, d_keys=None, method forward (line 146) | def forward(self, queries, keys, values, attn_mask): FILE: layers/Autoformer_EncDec.py class my_Layernorm (line 6) | class my_Layernorm(nn.Module): method __init__ (line 11) | def __init__(self, channels): method forward (line 15) | def forward(self, x): class moving_avg (line 21) | class moving_avg(nn.Module): method __init__ (line 26) | def __init__(self, kernel_size, stride): method forward (line 31) | def forward(self, x): class series_decomp (line 41) | class series_decomp(nn.Module): method __init__ (line 46) | def __init__(self, kernel_size): method forward (line 50) | def forward(self, x): class series_decomp_multi (line 56) | class series_decomp_multi(nn.Module): method __init__ (line 61) | def __init__(self, kernel_size): method forward (line 66) | def forward(self, x): class EncoderLayer (line 79) | class EncoderLayer(nn.Module): method __init__ (line 84) | def __init__(self, attention, d_model, d_ff=None, moving_avg=25, dropo... method forward (line 95) | def forward(self, x, attn_mask=None): class Encoder (line 109) | class Encoder(nn.Module): method __init__ (line 114) | def __init__(self, attn_layers, conv_layers=None, norm_layer=None): method forward (line 120) | def forward(self, x, attn_mask=None): class DecoderLayer (line 140) | class DecoderLayer(nn.Module): method __init__ (line 145) | def __init__(self, self_attention, cross_attention, d_model, c_out, d_... method forward (line 161) | def forward(self, x, cross, x_mask=None, cross_mask=None): class Decoder (line 182) | class Decoder(nn.Module): method __init__ (line 187) | def __init__(self, layers, norm_layer=None, projection=None): method forward (line 193) | def forward(self, x, cross, x_mask=None, cross_mask=None, trend=None): FILE: layers/Conv_Blocks.py class Inception_Block_V1 (line 5) | class Inception_Block_V1(nn.Module): method __init__ (line 6) | def __init__(self, in_channels, out_channels, num_kernels=6, init_weig... method _initialize_weights (line 18) | def _initialize_weights(self): method forward (line 25) | def forward(self, x): class Inception_Block_V2 (line 33) | class Inception_Block_V2(nn.Module): method __init__ (line 34) | def __init__(self, in_channels, out_channels, num_kernels=6, init_weig... method _initialize_weights (line 48) | def _initialize_weights(self): method forward (line 55) | def forward(self, x): FILE: layers/Crossformer_EncDec.py class SegMerging (line 7) | class SegMerging(nn.Module): method __init__ (line 8) | def __init__(self, d_model, win_size, norm_layer=nn.LayerNorm): method forward (line 15) | def forward(self, x): class scale_block (line 33) | class scale_block(nn.Module): method __init__ (line 34) | def __init__(self, configs, win_size, d_model, n_heads, d_ff, depth, d... method forward (line 49) | def forward(self, x, attn_mask=None, tau=None, delta=None): class Encoder (line 61) | class Encoder(nn.Module): method __init__ (line 62) | def __init__(self, attn_layers): method forward (line 66) | def forward(self, x): class DecoderLayer (line 77) | class DecoderLayer(nn.Module): method __init__ (line 78) | def __init__(self, self_attention, cross_attention, seg_len, d_model, ... method forward (line 90) | def forward(self, x, cross): class Decoder (line 109) | class Decoder(nn.Module): method __init__ (line 110) | def __init__(self, layers): method forward (line 115) | def forward(self, x, cross): FILE: layers/DWT_Decomposition.py class Decomposition (line 18) | class Decomposition(nn.Module): method __init__ (line 19) | def __init__(self, method transform (line 66) | def transform(self, x): method inv_transform (line 74) | def inv_transform(self, yl, yh): method _dummy_forward (line 81) | def _dummy_forward(self, input_length): method _init_params (line 90) | def _init_params(self): method _wavelet_decompose (line 94) | def _wavelet_decompose(self, x): method _wavelet_reverse_decompose (line 111) | def _wavelet_reverse_decompose(self, yl, yh): class DWT1DForward (line 137) | class DWT1DForward(nn.Module): method __init__ (line 151) | def __init__(self, J=1, wave='db1', mode='zero', use_amp=False): method forward (line 169) | def forward(self, x): class DWT1DInverse (line 194) | class DWT1DInverse(nn.Module): method __init__ (line 207) | def __init__(self, wave='db1', mode='zero', use_amp=False): method forward (line 224) | def forward(self, coeffs): function roll (line 252) | def roll(x, n, dim, make_even=False): function mypad (line 271) | def mypad(x, pad, mode='constant', value=0): function afb1d (line 334) | def afb1d(x, h0, h1, use_amp, mode='zero', dim=-1): function afb1d_atrous (line 430) | def afb1d_atrous(x, h0, h1, mode='periodic', dim=-1, dilation=1): function sfb1d (line 481) | def sfb1d(lo, hi, g0, g1, use_amp, mode='zero', dim=-1): function mode_to_int (line 539) | def mode_to_int(mode): function int_to_mode (line 558) | def int_to_mode(mode): class AFB2D (line 577) | class AFB2D(Function): method forward (line 602) | def forward(ctx, x, h0_row, h1_row, h0_col, h1_col, mode): method backward (line 616) | def backward(ctx, low, highs): class AFB1D (line 634) | class AFB1D(Function): method forward (line 656) | def forward(ctx, x, h0, h1, mode, use_amp): method backward (line 676) | def backward(ctx, dx0, dx1): function afb2d (line 696) | def afb2d(x, filts, mode='zero'): function afb2d_atrous (line 744) | def afb2d_atrous(x, filts, mode='periodization', dilation=1): function afb2d_nonsep (line 793) | def afb2d_nonsep(x, filts, mode='zero'): function sfb2d (line 869) | def sfb2d(ll, lh, hl, hh, filts, mode='zero'): class SFB2D (line 916) | class SFB2D(Function): method forward (line 941) | def forward(ctx, low, highs, g0_row, g1_row, g0_col, g1_col, mode): method backward (line 953) | def backward(ctx, dy): class SFB1D (line 967) | class SFB1D(Function): method forward (line 989) | def forward(ctx, low, high, g0, g1, mode, use_amp): method backward (line 1004) | def backward(ctx, dy): function sfb2d_nonsep (line 1019) | def sfb2d_nonsep(coeffs, filts, mode='zero'): function prep_filt_afb2d_nonsep (line 1074) | def prep_filt_afb2d_nonsep(h0_col, h1_col, h0_row=None, h1_row=None, function prep_filt_sfb2d_nonsep (line 1109) | def prep_filt_sfb2d_nonsep(g0_col, g1_col, g0_row=None, g1_row=None, function prep_filt_sfb2d (line 1143) | def prep_filt_sfb2d(g0_col, g1_col, g0_row=None, g1_row=None, device=None): function prep_filt_sfb1d (line 1175) | def prep_filt_sfb1d(g0, g1, device=None): function prep_filt_afb2d (line 1198) | def prep_filt_afb2d(h0_col, h1_col, h0_row=None, h1_row=None, device=None): function prep_filt_afb1d (line 1229) | def prep_filt_afb1d(h0, h1, device=None): function reflect (line 1251) | def reflect(x, minx, maxx): FILE: layers/ETSformer_EncDec.py class Transform (line 10) | class Transform: method __init__ (line 11) | def __init__(self, sigma): method transform (line 15) | def transform(self, x): method jitter (line 18) | def jitter(self, x): method scale (line 21) | def scale(self, x): method shift (line 24) | def shift(self, x): function conv1d_fft (line 28) | def conv1d_fft(f, g, dim=-1): class ExponentialSmoothing (line 46) | class ExponentialSmoothing(nn.Module): method __init__ (line 48) | def __init__(self, dim, nhead, dropout=0.1, aux=False): method forward (line 56) | def forward(self, values, aux_values=None): method get_exponential_weight (line 70) | def get_exponential_weight(self, T): method weight (line 84) | def weight(self): class Feedforward (line 88) | class Feedforward(nn.Module): method __init__ (line 89) | def __init__(self, d_model, dim_feedforward, dropout=0.1, activation='... method forward (line 98) | def forward(self, x): class GrowthLayer (line 103) | class GrowthLayer(nn.Module): method __init__ (line 105) | def __init__(self, d_model, nhead, d_head=None, dropout=0.1): method forward (line 118) | def forward(self, inputs): class FourierLayer (line 133) | class FourierLayer(nn.Module): method __init__ (line 135) | def __init__(self, d_model, pred_len, k=None, low_freq=1): method forward (line 142) | def forward(self, x): method extrapolate (line 160) | def extrapolate(self, x_freq, f, t): method topk_freq (line 173) | def topk_freq(self, x_freq): class LevelLayer (line 182) | class LevelLayer(nn.Module): method __init__ (line 184) | def __init__(self, d_model, c_out, dropout=0.1): method forward (line 193) | def forward(self, level, growth, season): class EncoderLayer (line 205) | class EncoderLayer(nn.Module): method __init__ (line 207) | def __init__(self, d_model, nhead, c_out, seq_len, pred_len, k, dim_fe... method forward (line 230) | def forward(self, res, level, attn_mask=None): method _growth_block (line 240) | def _growth_block(self, x): method _season_block (line 244) | def _season_block(self, x): class Encoder (line 249) | class Encoder(nn.Module): method __init__ (line 251) | def __init__(self, layers): method forward (line 255) | def forward(self, res, level, attn_mask=None): class DampingLayer (line 266) | class DampingLayer(nn.Module): method __init__ (line 268) | def __init__(self, pred_len, nhead, dropout=0.1): method forward (line 275) | def forward(self, x): method damping_factor (line 288) | def damping_factor(self): class DecoderLayer (line 292) | class DecoderLayer(nn.Module): method __init__ (line 294) | def __init__(self, d_model, nhead, c_out, pred_len, dropout=0.1): method forward (line 304) | def forward(self, growth, season): class Decoder (line 312) | class Decoder(nn.Module): method __init__ (line 314) | def __init__(self, layers): method forward (line 324) | def forward(self, growths, seasons): FILE: layers/Embed.py class PositionalEmbedding (line 8) | class PositionalEmbedding(nn.Module): method __init__ (line 9) | def __init__(self, d_model, max_len=5000): method forward (line 25) | def forward(self, x): class TokenEmbedding (line 29) | class TokenEmbedding(nn.Module): method __init__ (line 30) | def __init__(self, c_in, d_model): method forward (line 40) | def forward(self, x): class FixedEmbedding (line 45) | class FixedEmbedding(nn.Module): method __init__ (line 46) | def __init__(self, c_in, d_model): method forward (line 62) | def forward(self, x): class TemporalEmbedding (line 66) | class TemporalEmbedding(nn.Module): method __init__ (line 67) | def __init__(self, d_model, embed_type='fixed', freq='h'): method forward (line 84) | def forward(self, x): class TimeFeatureEmbedding (line 96) | class TimeFeatureEmbedding(nn.Module): method __init__ (line 97) | def __init__(self, d_model, embed_type='timeF', freq='h'): method forward (line 105) | def forward(self, x): class DataEmbedding (line 109) | class DataEmbedding(nn.Module): method __init__ (line 110) | def __init__(self, c_in, d_model, embed_type='fixed', freq='h', dropou... method forward (line 120) | def forward(self, x, x_mark): class DataEmbedding_inverted (line 129) | class DataEmbedding_inverted(nn.Module): method __init__ (line 130) | def __init__(self, c_in, d_model, embed_type='fixed', freq='h', dropou... method forward (line 135) | def forward(self, x, x_mark): class DataEmbedding_wo_pos (line 146) | class DataEmbedding_wo_pos(nn.Module): method __init__ (line 147) | def __init__(self, c_in, d_model, embed_type='fixed', freq='h', dropou... method forward (line 157) | def forward(self, x, x_mark): class PatchEmbedding (line 165) | class PatchEmbedding(nn.Module): method __init__ (line 166) | def __init__(self, d_model, patch_len, stride, padding, dropout): method forward (line 182) | def forward(self, x): FILE: layers/FourierCorrelation.py function get_frequency_modes (line 10) | def get_frequency_modes(seq_len, modes=64, mode_select_method='random'): class FourierBlock (line 28) | class FourierBlock(nn.Module): method __init__ (line 29) | def __init__(self, in_channels, out_channels, n_heads, seq_len, modes=... method compl_mul1d (line 50) | def compl_mul1d(self, order, x, weights): method forward (line 65) | def forward(self, q, k, v, mask): class FourierCrossAttention (line 83) | class FourierCrossAttention(nn.Module): method __init__ (line 84) | def __init__(self, in_channels, out_channels, seq_len_q, seq_len_kv, m... method compl_mul1d (line 108) | def compl_mul1d(self, order, x, weights): method forward (line 123) | def forward(self, q, k, v, mask): FILE: layers/MSGBlock.py class Predict (line 11) | class Predict(nn.Module): method __init__ (line 12) | def __init__(self, individual, c_out, seq_len, pred_len, dropout): method forward (line 28) | def forward(self, x): class Attention_Block (line 43) | class Attention_Block(nn.Module): method __init__ (line 44) | def __init__(self, d_model, d_ff=None, n_heads=8, dropout=0.1, activa... method forward (line 55) | def forward(self, x, attn_mask=None): class self_attention (line 69) | class self_attention(nn.Module): method __init__ (line 70) | def __init__(self, attention, d_model ,n_heads): method forward (line 83) | def forward(self, queries ,keys ,values, attn_mask= None): class FullAttention (line 102) | class FullAttention(nn.Module): method __init__ (line 103) | def __init__(self, mask_flag=True, factor=5, scale=None, attention_dro... method forward (line 110) | def forward(self, queries, keys, values, attn_mask): class GraphBlock (line 128) | class GraphBlock(nn.Module): method __init__ (line 129) | def __init__(self, c_out , d_model , conv_channel, skip_channel, method forward (line 143) | def forward(self, x): class nconv (line 154) | class nconv(nn.Module): method __init__ (line 155) | def __init__(self): method forward (line 158) | def forward(self,x, A): class linear (line 164) | class linear(nn.Module): method __init__ (line 165) | def __init__(self,c_in,c_out,bias=True): method forward (line 169) | def forward(self,x): class mixprop (line 173) | class mixprop(nn.Module): method __init__ (line 174) | def __init__(self,c_in,c_out,gdep,dropout,alpha): method forward (line 182) | def forward(self, x, adj): class simpleVIT (line 196) | class simpleVIT(nn.Module): method __init__ (line 197) | def __init__(self, in_channels, emb_size, patch_size=2, depth=1, num_h... method _initialize_weights (line 216) | def _initialize_weights(self): method forward (line 223) | def forward(self,x): class MultiHeadAttention (line 234) | class MultiHeadAttention(nn.Module): method __init__ (line 235) | def __init__(self, emb_size, num_heads, dropout): method forward (line 245) | def forward(self, x: Tensor, mask: Tensor = None) -> Tensor: class FeedForward (line 263) | class FeedForward(nn.Module): method __init__ (line 264) | def __init__(self, dim, hidden_dim): method forward (line 272) | def forward(self, x): FILE: layers/MambaBlock.py class Mamba_TimeVariant (line 24) | class Mamba_TimeVariant(nn.Module): method __init__ (line 35) | def __init__( method forward (line 161) | def forward(self, hidden_states, inference_params=None): method step (line 273) | def step(self, hidden_states, conv_state, ssm_state): method allocate_inference_cache (line 349) | def allocate_inference_cache(self, batch_size, max_seqlen, dtype=None,... method _get_states_from_cache (line 362) | def _get_states_from_cache(self, inference_params, batch_size, initial... FILE: layers/MultiWaveletCorrelation.py function legendreDer (line 16) | def legendreDer(k, x): function phi_ (line 26) | def phi_(phi_c, x, lb=0, ub=1): function get_phi_psi (line 31) | def get_phi_psi(k, base): function get_filter (line 140) | def get_filter(base, k): class MultiWaveletTransform (line 201) | class MultiWaveletTransform(nn.Module): method __init__ (line 206) | def __init__(self, ich=1, k=8, alpha=16, c=128, method forward (line 219) | def forward(self, queries, keys, values, attn_mask): class MultiWaveletCross (line 242) | class MultiWaveletCross(nn.Module): method __init__ (line 247) | def __init__(self, in_channels, out_channels, seq_len_q, seq_len_kv, m... method forward (line 301) | def forward(self, q, k, v, mask=None): method wavelet_transform (line 373) | def wavelet_transform(self, x): method evenOdd (line 381) | def evenOdd(self, x): class FourierCrossAttentionW (line 394) | class FourierCrossAttentionW(nn.Module): method __init__ (line 395) | def __init__(self, in_channels, out_channels, seq_len_q, seq_len_kv, m... method compl_mul1d (line 404) | def compl_mul1d(self, order, x, weights): method forward (line 419) | def forward(self, q, k, v, mask): class sparseKernelFT1d (line 458) | class sparseKernelFT1d(nn.Module): method __init__ (line 459) | def __init__(self, method compl_mul1d (line 474) | def compl_mul1d(self, order, x, weights): method forward (line 489) | def forward(self, x): class MWT_CZ1d (line 506) | class MWT_CZ1d(nn.Module): method __init__ (line 507) | def __init__(self, method forward (line 545) | def forward(self, x): method wavelet_transform (line 568) | def wavelet_transform(self, x): method evenOdd (line 576) | def evenOdd(self, x): FILE: layers/Pyraformer_EncDec.py function get_mask (line 10) | def get_mask(input_size, window_size, inner_size): function refer_points (line 50) | def refer_points(all_sizes, window_size): class RegularMask (line 70) | class RegularMask(): method __init__ (line 71) | def __init__(self, mask): method mask (line 75) | def mask(self): class EncoderLayer (line 79) | class EncoderLayer(nn.Module): method __init__ (line 82) | def __init__(self, d_model, d_inner, n_head, dropout=0.1, normalize_be... method forward (line 92) | def forward(self, enc_input, slf_attn_mask=None): class Encoder (line 100) | class Encoder(nn.Module): method __init__ (line 103) | def __init__(self, configs, window_size, inner_size): method forward (line 121) | def forward(self, x_enc, x_mark_enc): class ConvLayer (line 139) | class ConvLayer(nn.Module): method __init__ (line 140) | def __init__(self, c_in, window_size): method forward (line 149) | def forward(self, x): class Bottleneck_Construct (line 156) | class Bottleneck_Construct(nn.Module): method __init__ (line 159) | def __init__(self, d_model, window_size, d_inner): method forward (line 176) | def forward(self, enc_input): class PositionwiseFeedForward (line 191) | class PositionwiseFeedForward(nn.Module): method __init__ (line 194) | def __init__(self, d_in, d_hid, dropout=0.1, normalize_before=True): method forward (line 205) | def forward(self, x): FILE: layers/SelfAttention_Family.py class DSAttention (line 10) | class DSAttention(nn.Module): method __init__ (line 13) | def __init__(self, mask_flag=True, factor=5, scale=None, attention_dro... method forward (line 20) | def forward(self, queries, keys, values, attn_mask, tau=None, delta=No... class FullAttention (line 48) | class FullAttention(nn.Module): method __init__ (line 49) | def __init__(self, mask_flag=True, factor=5, scale=None, attention_dro... method forward (line 56) | def forward(self, queries, keys, values, attn_mask, tau=None, delta=No... class ProbAttention (line 78) | class ProbAttention(nn.Module): method __init__ (line 79) | def __init__(self, mask_flag=True, factor=5, scale=None, attention_dro... method _prob_QK (line 87) | def _prob_QK(self, Q, K, sample_k, n_top): # n_top: c*ln(L_q) method _get_initial_context (line 113) | def _get_initial_context(self, V, L_Q): method _update_context (line 126) | def _update_context(self, context_in, V, scores, index, L_Q, attn_mask): method forward (line 147) | def forward(self, queries, keys, values, attn_mask, tau=None, delta=No... class AttentionLayer (line 179) | class AttentionLayer(nn.Module): method __init__ (line 180) | def __init__(self, attention, d_model, n_heads, d_keys=None, method forward (line 194) | def forward(self, queries, keys, values, attn_mask, tau=None, delta=No... class ReformerLayer (line 216) | class ReformerLayer(nn.Module): method __init__ (line 217) | def __init__(self, attention, d_model, n_heads, d_keys=None, method fit_length (line 229) | def fit_length(self, queries): method forward (line 239) | def forward(self, queries, keys, values, attn_mask, tau, delta): class TwoStageAttentionLayer (line 246) | class TwoStageAttentionLayer(nn.Module): method __init__ (line 252) | def __init__(self, configs, method forward (line 278) | def forward(self, x, attn_mask=None, tau=None, delta=None): FILE: layers/StandardNorm.py class Normalize (line 5) | class Normalize(nn.Module): method __init__ (line 6) | def __init__(self, num_features: int, eps=1e-5, affine=False, subtract... method forward (line 21) | def forward(self, x, mode: str): method _init_params (line 31) | def _init_params(self): method _get_statistics (line 36) | def _get_statistics(self, x): method _normalize (line 44) | def _normalize(self, x): method _denormalize (line 57) | def _denormalize(self, x): FILE: layers/TimeFilter_layers.py class GCN (line 7) | class GCN(nn.Module): method __init__ (line 8) | def __init__(self, dim, n_heads): method forward (line 13) | def forward(self, adj, x): function mask_topk_moe (line 26) | def mask_topk_moe(adj, thre, n_vars, masks): function mask_topk_area (line 56) | def mask_topk_area(adj, n_vars, masks, alpha=0.5): class mask_moe (line 98) | class mask_moe(nn.Module): method __init__ (line 99) | def __init__(self, n_vars, top_p=0.5, num_experts=3, in_dim=96): method cv_squared (line 112) | def cv_squared(self, x): method cross_entropy (line 118) | def cross_entropy(self, x): method noisy_top_k_gating (line 124) | def noisy_top_k_gating(self, x, is_training, noise_epsilon=1e-2): method forward (line 158) | def forward(self, x, masks=None): function mask_topk (line 190) | def mask_topk(x, alpha=0.5, largest=False): class GraphLearner (line 200) | class GraphLearner(nn.Module): method __init__ (line 201) | def __init__(self, dim, n_vars, top_p=0.5, in_dim=96): method forward (line 209) | def forward(self, x, masks=None, alpha=0.5): class GraphFilter (line 219) | class GraphFilter(nn.Module): method __init__ (line 220) | def __init__(self, dim, n_vars, n_heads=4, scale=None, top_p=0.5, drop... method forward (line 229) | def forward(self, x, masks=None, alpha=0.5): class GraphBlock (line 241) | class GraphBlock(nn.Module): method __init__ (line 242) | def __init__(self, dim, n_vars, d_ff=None, n_heads=4, top_p=0.5, dropo... method forward (line 256) | def forward(self, x, masks=None, alpha=0.5): class TimeFilter_Backbone (line 264) | class TimeFilter_Backbone(nn.Module): method __init__ (line 265) | def __init__(self, hidden_dim, n_vars, d_ff=None, n_heads=4, n_blocks=... method forward (line 276) | def forward(self, x, masks=None, alpha=0.5): FILE: layers/Transformer_EncDec.py class ConvLayer (line 6) | class ConvLayer(nn.Module): method __init__ (line 7) | def __init__(self, c_in): method forward (line 18) | def forward(self, x): class EncoderLayer (line 27) | class EncoderLayer(nn.Module): method __init__ (line 28) | def __init__(self, attention, d_model, d_ff=None, dropout=0.1, activat... method forward (line 39) | def forward(self, x, attn_mask=None, tau=None, delta=None): class Encoder (line 54) | class Encoder(nn.Module): method __init__ (line 55) | def __init__(self, attn_layers, conv_layers=None, norm_layer=None): method forward (line 61) | def forward(self, x, attn_mask=None, tau=None, delta=None): class DecoderLayer (line 83) | class DecoderLayer(nn.Module): method __init__ (line 84) | def __init__(self, self_attention, cross_attention, d_model, d_ff=None, method forward (line 98) | def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, de... class Decoder (line 119) | class Decoder(nn.Module): method __init__ (line 120) | def __init__(self, layers, norm_layer=None, projection=None): method forward (line 126) | def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, de... FILE: models/Autoformer.py class Model (line 11) | class Model(nn.Module): method __init__ (line 18) | def __init__(self, configs): method forecast (line 88) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 111) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 119) | def anomaly_detection(self, x_enc): method classification (line 127) | def classification(self, x_enc, x_mark_enc): method forward (line 143) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Chronos.py class Model (line 9) | class Model(nn.Module): method __init__ (line 10) | def __init__(self, configs): method forecast (line 25) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 35) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Chronos2.py class Model (line 9) | class Model(nn.Module): method __init__ (line 10) | def __init__(self, configs): method forecast (line 21) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 39) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Crossformer.py class Model (line 14) | class Model(nn.Module): method __init__ (line 18) | def __init__(self, configs): method forecast (line 82) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 94) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 106) | def anomaly_detection(self, x_enc): method classification (line 117) | def classification(self, x_enc, x_mark_enc): method forward (line 132) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/DLinear.py class Model (line 7) | class Model(nn.Module): method __init__ (line 12) | def __init__(self, configs, individual=False): method encoder (line 55) | def encoder(self, x): method forecast (line 75) | def forecast(self, x_enc): method imputation (line 79) | def imputation(self, x_enc): method anomaly_detection (line 83) | def anomaly_detection(self, x_enc): method classification (line 87) | def classification(self, x_enc): method forward (line 97) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/ETSformer.py class Model (line 7) | class Model(nn.Module): method __init__ (line 12) | def __init__(self, configs): method forecast (line 55) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 66) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 73) | def anomaly_detection(self, x_enc): method classification (line 80) | def classification(self, x_enc, x_mark_enc): method forward (line 97) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/FEDformer.py class Model (line 11) | class Model(nn.Module): method __init__ (line 17) | def __init__(self, configs, version='fourier', mode_select='random', m... method forecast (line 119) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 136) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 144) | def anomaly_detection(self, x_enc): method classification (line 152) | def classification(self, x_enc, x_mark_enc): method forward (line 165) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/FiLM.py function transition (line 11) | def transition(N): class HiPPO_LegT (line 20) | class HiPPO_LegT(nn.Module): method __init__ (line 21) | def __init__(self, N, dt=1.0, discretization='bilinear'): method forward (line 41) | def forward(self, inputs): method reconstruct (line 55) | def reconstruct(self, c): class SpectralConv1d (line 59) | class SpectralConv1d(nn.Module): method __init__ (line 60) | def __init__(self, in_channels, out_channels, seq_len, ratio=0.5): method compl_mul1d (line 77) | def compl_mul1d(self, order, x, weights_real, weights_imag): method forward (line 81) | def forward(self, x): class Model (line 91) | class Model(nn.Module): method __init__ (line 95) | def __init__(self, configs): method forecast (line 132) | def forecast(self, x_enc, x_mark_enc, x_dec_true, x_mark_dec): method imputation (line 164) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 196) | def anomaly_detection(self, x_enc): method classification (line 228) | def classification(self, x_enc, x_mark_enc): method forward (line 255) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/FreTS.py class Model (line 7) | class Model(nn.Module): method __init__ (line 12) | def __init__(self, configs): method tokenEmb (line 44) | def tokenEmb(self, x): method MLP_temporal (line 53) | def MLP_temporal(self, x, B, N, L): method MLP_channel (line 61) | def MLP_channel(self, x, B, N, L): method FreMLP (line 75) | def FreMLP(self, B, nd, dimension, x, r, i, rb, ib): method forecast (line 98) | def forecast(self, x_enc): method forward (line 113) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec): FILE: models/Informer.py class Model (line 9) | class Model(nn.Module): method __init__ (line 15) | def __init__(self, configs): method long_forecast (line 77) | def long_forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method short_forecast (line 86) | def short_forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 102) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 110) | def anomaly_detection(self, x_enc): method classification (line 118) | def classification(self, x_enc, x_mark_enc): method forward (line 131) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/KANAD.py class KANADModel (line 7) | class KANADModel(nn.Module): method __init__ (line 8) | def __init__(self, window: int, order: int, *args, **kwargs) -> None: method forward (line 28) | def forward(self, x: torch.Tensor, return_last: bool = False, *args, *... method _create_custom_periodic_cosine (line 52) | def _create_custom_periodic_cosine(self, window: int, period) -> torch... class Model (line 62) | class Model(nn.Module): method __init__ (line 63) | def __init__(self, configs): method anomaly_detection (line 74) | def anomaly_detection(self, x_enc): method forward (line 83) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Koopa.py class FourierFilter (line 8) | class FourierFilter(nn.Module): method __init__ (line 12) | def __init__(self, mask_spectrum): method forward (line 16) | def forward(self, x): class MLP (line 26) | class MLP(nn.Module): method __init__ (line 30) | def __init__(self, method forward (line 59) | def forward(self, x): class KPLayer (line 66) | class KPLayer(nn.Module): method __init__ (line 70) | def __init__(self): method one_step_forward (line 75) | def one_step_forward(self, z, return_rec=False, return_K=False): method forward (line 93) | def forward(self, z, pred_len=1): class KPLayerApprox (line 104) | class KPLayerApprox(nn.Module): method __init__ (line 108) | def __init__(self): method forward (line 114) | def forward(self, z, pred_len=1): class TimeVarKP (line 151) | class TimeVarKP(nn.Module): method __init__ (line 156) | def __init__(self, method forward (line 180) | def forward(self, x): class TimeInvKP (line 203) | class TimeInvKP(nn.Module): method __init__ (line 208) | def __init__(self, method forward (line 226) | def forward(self, x): class Model (line 237) | class Model(nn.Module): method __init__ (line 241) | def __init__(self, configs, dynamic_dim=128, hidden_dim=64, hidden_lay... method _get_mask_spectrum (line 298) | def _get_mask_spectrum(self, configs): method forecast (line 310) | def forecast(self, x_enc): method forward (line 334) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec): FILE: models/LightTS.py class IEBlock (line 6) | class IEBlock(nn.Module): method __init__ (line 7) | def __init__(self, input_dim, hid_dim, output_dim, num_node): method _build (line 17) | def _build(self): method forward (line 29) | def forward(self, x): class Model (line 39) | class Model(nn.Module): method __init__ (line 44) | def __init__(self, configs, chunk_size=24): method _build (line 74) | def _build(self): method encoder (line 102) | def encoder(self, x): method forecast (line 135) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 138) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 141) | def anomaly_detection(self, x_enc): method classification (line 144) | def classification(self, x_enc, x_mark_enc): method forward (line 152) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/MICN.py class MIC (line 8) | class MIC(nn.Module): method __init__ (line 13) | def __init__(self, feature_size=512, n_heads=8, dropout=0.05, decomp_k... method conv_trans_conv (line 48) | def conv_trans_conv(self, input, conv1d, conv1d_trans, isometric): method forward (line 69) | def forward(self, src): class SeasonalPrediction (line 90) | class SeasonalPrediction(nn.Module): method __init__ (line 91) | def __init__(self, embedding_size=512, n_heads=8, dropout=0.05, d_laye... method forward (line 102) | def forward(self, dec): class Model (line 108) | class Model(nn.Module): method __init__ (line 112) | def __init__(self, configs, conv_kernel=[12, 16]): method forecast (line 159) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 172) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 182) | def anomaly_detection(self, x_enc): method classification (line 192) | def classification(self, x_enc, x_mark_enc): method forward (line 208) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/MSGNet.py function FFT_for_Period (line 11) | def FFT_for_Period(x, k=2): class ScaleGraphBlock (line 22) | class ScaleGraphBlock(nn.Module): method __init__ (line 23) | def __init__(self, configs): method forward (line 41) | def forward(self, x): class Model (line 81) | class Model(nn.Module): method __init__ (line 82) | def __init__(self, configs): method forecast (line 118) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): method imputation (line 146) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): method anomaly_detection (line 176) | def anomaly_detection(self, x_enc): method classification (line 207) | def classification(self, x_enc, x_mark_enc): method forward (line 231) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Mamba.py class Model (line 11) | class Model(nn.Module): method __init__ (line 13) | def __init__(self, configs): method forecast (line 32) | def forecast(self, x_enc, x_mark_enc): method forward (line 45) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/MambaSimple.py class Model (line 11) | class Model(nn.Module): method __init__ (line 18) | def __init__(self, configs): method forecast (line 33) | def forecast(self, x_enc, x_mark_enc): method forward (line 49) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): class ResidualBlock (line 55) | class ResidualBlock(nn.Module): method __init__ (line 56) | def __init__(self, configs, d_inner, dt_rank): method forward (line 62) | def forward(self, x): class MambaBlock (line 66) | class MambaBlock(nn.Module): method __init__ (line 67) | def __init__(self, configs, d_inner, dt_rank): method forward (line 95) | def forward(self, x): method ssm (line 117) | def ssm(self, x): method selective_scan (line 134) | def selective_scan(self, u, delta, A, B, C, D): class RMSNorm (line 154) | class RMSNorm(nn.Module): method __init__ (line 155) | def __init__(self, d_model, eps=1e-5): method forward (line 160) | def forward(self, x): FILE: models/MambaSingleLayer.py class TokenEmbedding_cls (line 7) | class TokenEmbedding_cls(nn.Module): method __init__ (line 10) | def __init__(self, c_in, d_model, d_kernel=3): method forward (line 20) | def forward(self, x): class DataEmbedding_cls (line 25) | class DataEmbedding_cls(nn.Module): method __init__ (line 29) | def __init__(self, c_in, d_model, embed_type='fixed', freq='h', dropou... method forward (line 35) | def forward(self, x): class Model (line 41) | class Model(nn.Module): method __init__ (line 47) | def __init__(self, configs): method forward (line 100) | def forward(self, x_enc, x_mark_enc, x_dec=None, x_mark_dec=None, mask... FILE: models/Moirai.py class Model (line 12) | class Model(nn.Module): method __init__ (line 13) | def __init__(self, configs): method forecast (line 34) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 44) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/MultiPatchFormer.py class FeedForward (line 9) | class FeedForward(nn.Module): method __init__ (line 10) | def __init__(self, d_model: int, d_hidden: int = 512): method forward (line 17) | def forward(self, x): class Encoder (line 25) | class Encoder(nn.Module): method __init__ (line 26) | def __init__( method forward (line 52) | def forward(self, x): class Model (line 74) | class Model(nn.Module): method __init__ (line 75) | def __init__(self, configs): method forecast (line 217) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 346) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Nonstationary_Transformer.py class Projector (line 9) | class Projector(nn.Module): method __init__ (line 15) | def __init__(self, enc_in, seq_len, hidden_dims, hidden_layers, output... method forward (line 29) | def forward(self, x, stats): class Model (line 42) | class Model(nn.Module): method __init__ (line 47) | def __init__(self, configs): method forecast (line 113) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 140) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 166) | def anomaly_detection(self, x_enc): method classification (line 189) | def classification(self, x_enc, x_mark_enc): method forward (line 217) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/PAttn.py class Model (line 8) | class Model(nn.Module): method __init__ (line 12) | def __init__(self, configs, patch_len=16, stride=8): method forward (line 40) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec): FILE: models/PatchTST.py class Transpose (line 7) | class Transpose(nn.Module): method __init__ (line 8) | def __init__(self, *dims, contiguous=False): method forward (line 11) | def forward(self, x): class FlattenHead (line 16) | class FlattenHead(nn.Module): method __init__ (line 17) | def __init__(self, n_vars, nf, target_window, head_dropout=0): method forward (line 24) | def forward(self, x): # x: [bs x nvars x d_model x patch_num] class Model (line 31) | class Model(nn.Module): method __init__ (line 36) | def __init__(self, configs, patch_len=16, stride=8): method forecast (line 82) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 115) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 151) | def anomaly_detection(self, x_enc): method classification (line 184) | def classification(self, x_enc, x_mark_enc): method forward (line 213) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Pyraformer.py class Model (line 6) | class Model(nn.Module): method __init__ (line 12) | def __init__(self, configs, window_size=[4,4], inner_size=5): method long_forecast (line 38) | def long_forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): method short_forecast (line 44) | def short_forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=No... method imputation (line 58) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 63) | def anomaly_detection(self, x_enc, x_mark_enc): method classification (line 68) | def classification(self, x_enc, x_mark_enc): method forward (line 84) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Reformer.py class Model (line 9) | class Model(nn.Module): method __init__ (line 15) | def __init__(self, configs, bucket_size=4, n_hashes=4): method long_forecast (line 51) | def long_forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method short_forecast (line 64) | def short_forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 84) | def imputation(self, x_enc, x_mark_enc): method anomaly_detection (line 92) | def anomaly_detection(self, x_enc): method classification (line 100) | def classification(self, x_enc, x_mark_enc): method forward (line 116) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/SCINet.py class Splitting (line 6) | class Splitting(nn.Module): method __init__ (line 7) | def __init__(self): method even (line 10) | def even(self, x): method odd (line 13) | def odd(self, x): method forward (line 16) | def forward(self, x): class CausalConvBlock (line 21) | class CausalConvBlock(nn.Module): method __init__ (line 22) | def __init__(self, d_model, kernel_size=5, dropout=0.0): method forward (line 38) | def forward(self, x): class SCIBlock (line 42) | class SCIBlock(nn.Module): method __init__ (line 43) | def __init__(self, d_model, kernel_size=5, dropout=0.0): method forward (line 48) | def forward(self, x): class SCINet (line 62) | class SCINet(nn.Module): method __init__ (line 63) | def __init__(self, d_model, current_level=3, kernel_size=5, dropout=0.0): method forward (line 72) | def forward(self, x): method zip_up_the_pants (line 86) | def zip_up_the_pants(self, even, odd): class Model (line 102) | class Model(nn.Module): method __init__ (line 103) | def __init__(self, configs): method forward (line 138) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): method forecast (line 145) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method get_position_encoding (line 179) | def get_position_encoding(self, x): FILE: models/SegRNN.py class Model (line 7) | class Model(nn.Module): method __init__ (line 12) | def __init__(self, configs): method encoder (line 52) | def encoder(self, x): method forecast (line 84) | def forecast(self, x_enc): method imputation (line 88) | def imputation(self, x_enc): method anomaly_detection (line 92) | def anomaly_detection(self, x_enc): method classification (line 96) | def classification(self, x_enc): method forward (line 106) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Sundial.py class Model (line 8) | class Model(nn.Module): method __init__ (line 9) | def __init__(self, configs): method forecast (line 20) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 29) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TSMixer.py class ResBlock (line 4) | class ResBlock(nn.Module): method __init__ (line 5) | def __init__(self, configs): method forward (line 22) | def forward(self, x): class Model (line 30) | class Model(nn.Module): method __init__ (line 31) | def __init__(self, configs): method forecast (line 40) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): method forward (line 49) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TemporalFusionTransformer.py function get_known_len (line 20) | def get_known_len(embed_type, freq): class TFTTemporalEmbedding (line 32) | class TFTTemporalEmbedding(TemporalEmbedding): method __init__ (line 33) | def __init__(self, d_model, embed_type='fixed', freq='h'): method forward (line 36) | def forward(self, x): class TFTTimeFeatureEmbedding (line 50) | class TFTTimeFeatureEmbedding(nn.Module): method __init__ (line 51) | def __init__(self, d_model, embed_type='timeF', freq='h'): method forward (line 56) | def forward(self, x): class TFTEmbedding (line 60) | class TFTEmbedding(nn.Module): method __init__ (line 61) | def __init__(self, configs): method forward (line 75) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec): class GLU (line 92) | class GLU(nn.Module): method __init__ (line 93) | def __init__(self, input_size, output_size): method forward (line 99) | def forward(self, x): class GateAddNorm (line 105) | class GateAddNorm(nn.Module): method __init__ (line 106) | def __init__(self, input_size, output_size): method forward (line 112) | def forward(self, x, skip_a): class GRN (line 118) | class GRN(nn.Module): method __init__ (line 119) | def __init__(self, input_size, output_size, hidden_size=None, context_... method forward (line 129) | def forward(self, a: Tensor, c: Optional[Tensor] = None): class VariableSelectionNetwork (line 140) | class VariableSelectionNetwork(nn.Module): method __init__ (line 141) | def __init__(self, d_model, variable_num, dropout=0.0): method forward (line 146) | def forward(self, x: Tensor, context: Optional[Tensor] = None): class StaticCovariateEncoder (line 161) | class StaticCovariateEncoder(nn.Module): method __init__ (line 162) | def __init__(self, d_model, static_len, dropout=0.0): method forward (line 167) | def forward(self, static_input): class InterpretableMultiHeadAttention (line 176) | class InterpretableMultiHeadAttention(nn.Module): method __init__ (line 177) | def __init__(self, configs): method forward (line 189) | def forward(self, x): class TemporalFusionDecoder (line 210) | class TemporalFusionDecoder(nn.Module): method __init__ (line 211) | def __init__(self, configs): method forward (line 225) | def forward(self, history_input, future_input, c_c, c_h, c_e): class Model (line 254) | class Model(nn.Module): method __init__ (line 255) | def __init__(self, configs): method forecast (line 274) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 304) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec): FILE: models/TiDE.py class LayerNorm (line 6) | class LayerNorm(nn.Module): method __init__ (line 9) | def __init__(self, ndim, bias): method forward (line 14) | def forward(self, input): class ResBlock (line 19) | class ResBlock(nn.Module): method __init__ (line 20) | def __init__(self, input_dim, hidden_dim, output_dim, dropout=0.1, bia... method forward (line 30) | def forward(self, x): class Model (line 42) | class Model(nn.Module): method __init__ (line 46) | def __init__(self, configs, bias=True, feature_encode_dim=2): method forecast (line 88) | def forecast(self, x_enc, x_mark_enc, x_dec, batch_y_mark): method imputation (line 106) | def imputation(self, x_enc, x_mark_enc, x_dec, batch_y_mark, mask): method forward (line 124) | def forward(self, x_enc, x_mark_enc, x_dec, batch_y_mark, mask=None): FILE: models/TiRex.py class Model (line 9) | class Model(nn.Module): method __init__ (line 10) | def __init__(self, configs): method forecast (line 21) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 38) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TimeFilter.py class PatchEmbed (line 11) | class PatchEmbed(nn.Module): method __init__ (line 12) | def __init__(self, dim, patch_len, stride=None, pos=True): method forward (line 22) | def forward(self, x): class Model (line 32) | class Model(nn.Module): method __init__ (line 33) | def __init__(self, configs): method _get_mask (line 75) | def _get_mask(self, device): method forecast (line 90) | def forecast(self, x, masks, x_dec, x_mark_dec): method imputation (line 109) | def imputation(self, x, x_mark_enc, x_dec, x_mark_dec, mask): method classification (line 128) | def classification(self, x, x_mark_enc): method anomaly_detection (line 143) | def anomaly_detection(self, x): method forward (line 163) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TimeMixer.py class DFT_series_decomp (line 9) | class DFT_series_decomp(nn.Module): method __init__ (line 14) | def __init__(self, top_k: int = 5): method forward (line 18) | def forward(self, x): class MultiScaleSeasonMixing (line 29) | class MultiScaleSeasonMixing(nn.Module): method __init__ (line 34) | def __init__(self, configs): method forward (line 55) | def forward(self, season_list): class MultiScaleTrendMixing (line 73) | class MultiScaleTrendMixing(nn.Module): method __init__ (line 78) | def __init__(self, configs): method forward (line 97) | def forward(self, trend_list): class PastDecomposableMixing (line 118) | class PastDecomposableMixing(nn.Module): method __init__ (line 119) | def __init__(self, configs): method forward (line 155) | def forward(self, x_list): class Model (line 187) | class Model(nn.Module): method __init__ (line 189) | def __init__(self, configs): method out_projection (line 269) | def out_projection(self, dec_out, i, out_res): method pre_enc (line 277) | def pre_enc(self, x_list): method __multi_scale_process_inputs (line 289) | def __multi_scale_process_inputs(self, x_enc, x_mark_enc): method forecast (line 329) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method future_multi_mixing (line 378) | def future_multi_mixing(self, B, enc_out_list, x_list): method classification (line 398) | def classification(self, x_enc, x_mark_enc): method anomaly_detection (line 424) | def anomaly_detection(self, x_enc): method imputation (line 453) | def imputation(self, x_enc, x_mark_enc, mask): method forward (line 502) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TimeMoE.py class Model (line 8) | class Model(nn.Module): method __init__ (line 9) | def __init__(self, configs): method forecast (line 20) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 38) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TimeXer.py class FlattenHead (line 9) | class FlattenHead(nn.Module): method __init__ (line 10) | def __init__(self, n_vars, nf, target_window, head_dropout=0): method forward (line 17) | def forward(self, x): # x: [bs x nvars x d_model x patch_num] class EnEmbedding (line 24) | class EnEmbedding(nn.Module): method __init__ (line 25) | def __init__(self, n_vars, d_model, patch_len, dropout): method forward (line 36) | def forward(self, x): class Encoder (line 51) | class Encoder(nn.Module): method __init__ (line 52) | def __init__(self, layers, norm_layer=None, projection=None): method forward (line 58) | def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, de... class EncoderLayer (line 70) | class EncoderLayer(nn.Module): method __init__ (line 71) | def __init__(self, self_attention, cross_attention, d_model, d_ff=None, method forward (line 85) | def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, de... class Model (line 114) | class Model(nn.Module): method __init__ (line 116) | def __init__(self, configs): method forecast (line 157) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forecast_multi (line 187) | def forecast_multi(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 216) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TimesFM.py class Model (line 9) | class Model(nn.Module): method __init__ (line 10) | def __init__(self, configs): method forecast (line 34) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method forward (line 58) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/TimesNet.py function FFT_for_Period (line 9) | def FFT_for_Period(x, k=2): class TimesBlock (line 21) | class TimesBlock(nn.Module): method __init__ (line 22) | def __init__(self, configs): method forward (line 36) | def forward(self, x): class Model (line 71) | class Model(nn.Module): method __init__ (line 76) | def __init__(self, configs): method forecast (line 103) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 130) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 158) | def anomaly_detection(self, x_enc): method classification (line 183) | def classification(self, x_enc, x_mark_enc): method forward (line 201) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/Transformer.py class Model (line 10) | class Model(nn.Module): method __init__ (line 17) | def __init__(self, configs): method forecast (line 73) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 82) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 90) | def anomaly_detection(self, x_enc): method classification (line 98) | def classification(self, x_enc, x_mark_enc): method forward (line 111) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/WPMixer.py class TokenMixer (line 15) | class TokenMixer(nn.Module): method __init__ (line 16) | def __init__(self, input_seq=[], batch_size=[], channel=[], pred_seq=[... method forward (line 33) | def forward(self, x): class Mixer (line 40) | class Mixer(nn.Module): method __init__ (line 41) | def __init__(self, method forward (line 72) | def forward(self, x): class ResolutionBranch (line 92) | class ResolutionBranch(nn.Module): method __init__ (line 93) | def __init__(self, method forward (line 142) | def forward(self, x): method do_patching (line 165) | def do_patching(self, x): class WPMixerCore (line 173) | class WPMixerCore(nn.Module): method __init__ (line 174) | def __init__(self, method forward (line 240) | def forward(self, xL): class Model (line 272) | class Model(nn.Module): method __init__ (line 273) | def __init__(self, args, tfactor=5, dfactor=5, wavelet='db2', level=1,... method forecast (line 294) | def forecast(self, x_enc, x_mark_enc, x_dec, batch_y_mark): method forward (line 309) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: models/iTransformer.py class Model (line 10) | class Model(nn.Module): method __init__ (line 15) | def __init__(self, configs): method forecast (line 50) | def forecast(self, x_enc, x_mark_enc, x_dec, x_mark_dec): method imputation (line 69) | def imputation(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask): method anomaly_detection (line 88) | def anomaly_detection(self, x_enc): method classification (line 107) | def classification(self, x_enc, x_mark_enc): method forward (line 119) | def forward(self, x_enc, x_mark_enc, x_dec, x_mark_dec, mask=None): FILE: utils/ADFtest.py function calculate_ADF (line 7) | def calculate_ADF(root_path,data_path): function calculate_target_ADF (line 20) | def calculate_target_ADF(root_path,data_path,target='OT'): function archADF (line 33) | def archADF(root_path, data_path): FILE: utils/augmentation.py function jitter (line 4) | def jitter(x, sigma=0.03): function scaling (line 9) | def scaling(x, sigma=0.1): function rotation (line 14) | def rotation(x): function permutation (line 21) | def permutation(x, max_segments=5, seg_mode="equal"): function magnitude_warp (line 46) | def magnitude_warp(x, sigma=0.2, knot=4): function time_warp (line 59) | def time_warp(x, sigma=0.2, knot=4): function window_slice (line 74) | def window_slice(x, reduce_ratio=0.9): function window_warp (line 88) | def window_warp(x, window_ratio=0.1, scales=[0.5, 2.]): function spawner (line 107) | def spawner(x, labels, sigma=0.05, verbose=0): function wdba (line 145) | def wdba(x, labels, batch_size=6, slope_constraint="symmetric", use_wind... function random_guided_warp (line 207) | def random_guided_warp(x, labels, slope_constraint="symmetric", use_wind... function random_guided_warp_shape (line 247) | def random_guided_warp_shape(x, labels, slope_constraint="symmetric", us... function discriminative_guided_warp (line 250) | def discriminative_guided_warp(x, labels, batch_size=6, slope_constraint... function discriminative_guided_warp_shape (line 328) | def discriminative_guided_warp_shape(x, labels, batch_size=6, slope_cons... function run_augmentation (line 332) | def run_augmentation(x, y, args): function run_augmentation_single (line 350) | def run_augmentation_single(x, y, args): function augment (line 386) | def augment(x, y, args): FILE: utils/dtw.py function _traceback (line 12) | def _traceback(DTW, slope_constraint): function dtw (line 50) | def dtw(prototype, sample, return_flag = RETURN_VALUE, slope_constraint=... function _cummulative_matrix (line 79) | def _cummulative_matrix(cost, slope_constraint, window): function shape_dtw (line 103) | def shape_dtw(prototype, sample, return_flag = RETURN_VALUE, slope_const... function draw_graph2d (line 149) | def draw_graph2d(cost, DTW, path, prototype, sample): function draw_graph1d (line 186) | def draw_graph1d(cost, DTW, path, prototype, sample): FILE: utils/dtw_metric.py function dtw (line 6) | def dtw(x, y, dist, warp=1, w=inf, s=1.0): function accelerated_dtw (line 58) | def accelerated_dtw(x, y, dist, warp=1): function _traceback (line 100) | def _traceback(D): FILE: utils/losses.py function divide_no_nan (line 25) | def divide_no_nan(a, b): class mape_loss (line 35) | class mape_loss(nn.Module): method __init__ (line 36) | def __init__(self): method forward (line 39) | def forward(self, insample: t.Tensor, freq: int, class smape_loss (line 53) | class smape_loss(nn.Module): method __init__ (line 54) | def __init__(self): method forward (line 57) | def forward(self, insample: t.Tensor, freq: int, class mase_loss (line 71) | class mase_loss(nn.Module): method __init__ (line 72) | def __init__(self): method forward (line 75) | def forward(self, insample: t.Tensor, freq: int, FILE: utils/m4_summary.py function group_values (line 28) | def group_values(values, groups, group_name): function mase (line 32) | def mase(forecast, insample, outsample, frequency): function smape_2 (line 36) | def smape_2(forecast, target): function mape (line 43) | def mape(forecast, target): class M4Summary (line 50) | class M4Summary: method __init__ (line 51) | def __init__(self, file_path, root_path): method evaluate (line 57) | def evaluate(self): method summarize_groups (line 113) | def summarize_groups(self, scores): FILE: utils/masking.py class TriangularCausalMask (line 4) | class TriangularCausalMask(): method __init__ (line 5) | def __init__(self, B, L, device="cpu"): method mask (line 11) | def mask(self): class ProbMask (line 15) | class ProbMask(): method __init__ (line 16) | def __init__(self, B, H, L, index, scores, device="cpu"): method mask (line 25) | def mask(self): FILE: utils/metrics.py function RSE (line 4) | def RSE(pred, true): function CORR (line 8) | def CORR(pred, true): function MAE (line 14) | def MAE(pred, true): function MSE (line 18) | def MSE(pred, true): function RMSE (line 22) | def RMSE(pred, true): function MAPE (line 26) | def MAPE(pred, true): function MSPE (line 30) | def MSPE(pred, true): function metric (line 34) | def metric(pred, true): FILE: utils/print_args.py function print_args (line 1) | def print_args(args): FILE: utils/timefeatures.py class TimeFeature (line 23) | class TimeFeature: method __init__ (line 24) | def __init__(self): method __call__ (line 27) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: method __repr__ (line 30) | def __repr__(self): class SecondOfMinute (line 34) | class SecondOfMinute(TimeFeature): method __call__ (line 37) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: class MinuteOfHour (line 41) | class MinuteOfHour(TimeFeature): method __call__ (line 44) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: class HourOfDay (line 48) | class HourOfDay(TimeFeature): method __call__ (line 51) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: class DayOfWeek (line 55) | class DayOfWeek(TimeFeature): method __call__ (line 58) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: class DayOfMonth (line 62) | class DayOfMonth(TimeFeature): method __call__ (line 65) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: class DayOfYear (line 69) | class DayOfYear(TimeFeature): method __call__ (line 72) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: class MonthOfYear (line 76) | class MonthOfYear(TimeFeature): method __call__ (line 79) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: class WeekOfYear (line 83) | class WeekOfYear(TimeFeature): method __call__ (line 86) | def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: function time_features_from_frequency_str (line 90) | def time_features_from_frequency_str(freq_str: str) -> List[TimeFeature]: function time_features (line 147) | def time_features(dates, freq='h'): FILE: utils/tools.py function adjust_learning_rate (line 12) | def adjust_learning_rate(optimizer, epoch, args): class EarlyStopping (line 32) | class EarlyStopping: method __init__ (line 33) | def __init__(self, patience=7, verbose=False, delta=0): method __call__ (line 42) | def __call__(self, val_loss, model, path): method save_checkpoint (line 57) | def save_checkpoint(self, val_loss, model, path): class dotdict (line 64) | class dotdict(dict): class StandardScaler (line 71) | class StandardScaler(): method __init__ (line 72) | def __init__(self, mean, std): method transform (line 76) | def transform(self, data): method inverse_transform (line 79) | def inverse_transform(self, data): function visual (line 83) | def visual(true, preds=None, name='./pic/test.pdf'): function adjustment (line 95) | def adjustment(gt, pred): function cal_accuracy (line 119) | def cal_accuracy(y_pred, y_true):