### KalmanFilterTransformerFP Initialization and Basic Usage (Python) Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.transformations.series.kalman_filter.KalmanFilterTransformerFP Demonstrates how to initialize the KalmanFilterTransformerFP with a specified state dimension and then fit and transform a sample time series dataset. This is a fundamental example for getting started with the transformer. ```python import numpy as np import sktime.transformations.series.kalman_filter as kf time_steps, state_dim, measurement_dim = 10, 2, 3 X = np.random.rand(time_steps, measurement_dim) * 10 transformer = kf.KalmanFilterTransformerFP(state_dim=state_dim) Xt = transformer.fit_transform(X=X) ``` -------------------------------- ### Basic Deployment Workflow with NaiveForecaster (sp=12) Source: https://www.sktime.net/en/latest/examples/01_forecasting A concise example showing the entire basic deployment workflow: loading data, specifying forecasting horizon, initializing NaiveForecaster with seasonal period (sp=12), fitting, and predicting. It demonstrates a common use case for seasonal naive forecasting. ```python from sktime.datasets import load_airline from sktime.forecasting.base import ForecastingHorizon from sktime.forecasting.naive import NaiveForecaster import numpy as np # step 1: data specification y = load_airline() # step 2: specifying forecasting horizon fh = np.arange(1, 37) # step 3: specifying the forecasting algorithm forecaster = NaiveForecaster(strategy="last", sp=12) # step 4: fitting the forecaster forecaster.fit(y) # step 5: querying predictions y_pred = forecaster.predict(fh) ``` -------------------------------- ### ARCH Forecaster Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.arch.ARCH Demonstrates how to load airline data, instantiate the ARCH forecaster, fit it to the data, and make a one-step-ahead forecast. ```python >>> from sktime.datasets import load_airline >>> from sktime.forecasting.arch import ARCH >>> y = load_airline() >>> forecaster = ARCH() >>> forecaster.fit(y) ARCH(...) >>> y_pred = forecaster.predict(fh=1) ``` -------------------------------- ### Time Series Clustering with sktime Source: https://www.sktime.net/en/latest/get_started Shows time series clustering using TimeSeriesKMeans from sktime. This example loads data, splits it, initializes and fits the k-means model with specified parameters, and visualizes the cluster partitions. ```python from sklearn.model_selection import train_test_split from sktime.clustering.k_means import TimeSeriesKMeans from sktime.clustering.utils.plotting._plot_partitions import plot_cluster_algorithm from sktime.datasets import load_arrow_head X, y = load_arrow_head() X_train, X_test, y_train, y_test = train_test_split(X, y) k_means = TimeSeriesKMeans(n_clusters=5, init_algorithm="forgy", metric="dtw") k_means.fit(X_train) plot_cluster_algorithm(k_means, X_test, k_means.n_clusters) ``` -------------------------------- ### Initialize FhPlexForecaster with Different Parameters per Horizon Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.compose.FhPlexForecaster Illustrates initializing FhPlexForecaster with a NaiveForecaster and providing a list of parameter dictionaries for each forecasting horizon element. This allows for distinct forecasting strategies for each horizon. ```python from sktime.datasets import load_airline from sktime.forecasting.naive import NaiveForecaster from sktime.forecasting.compose import FhPlexForecaster y = load_airline() fh_params = [{}, {"strategy": "last"}, {"strategy": "mean"}] f = FhPlexForecaster(NaiveForecaster(), fh_params=fh_params) f.fit(y, fh=[1, 2, 3]) # get individual fitted forecasters f.forecasters_ # doctest: +SKIP y_pred = f.predict() ``` -------------------------------- ### Time Series Regression with sktime Source: https://www.sktime.net/en/latest/get_started Illustrates time series regression using KNeighborsTimeSeriesRegressor from sktime. The example loads COVID-19 3-month data, prepares it for regression, trains the regressor, and calculates the mean squared error. ```python from sktime.datasets import load_covid_3month from sktime.regression.distance_based import KNeighborsTimeSeriesRegressor from sklearn.metrics import mean_squared_error X_train, y_train = load_covid_3month(split="train") y_train = y_train.astype("float") X_test, y_test = load_covid_3month(split="test") y_test = y_test.astype("float") regressor = KNeighborsTimeSeriesRegressor() regressor.fit(X_train, y_train) y_pred = regressor.predict(X_test) mean_squared_error(y_test, y_pred) ``` -------------------------------- ### Get sktime Series Examples Source: https://www.sktime.net/en/latest/examples/03_transformers Retrieves example univariate Series and Panel data for use with sktime transformers. These examples are crucial for testing and demonstrating the functionality of series-based transformers. ```python from sktime.datatypes import get_examples # unviariate series used in the examples X_series = get_examples("pd.Series", "Series")[0] X2_series = get_examples("pd.Series", "Series")[1] # panel used in the examples X_panel = get_examples("pd-multiindex", "Panel")[0] ``` -------------------------------- ### Initialize and Fit ForecastX with VAR and ARIMA Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.compose.ForecastX This example demonstrates how to initialize and fit the ForecastX composite forecaster using VAR for exogeneous data and ARIMA for endogeneous data. It shows fitting the forecaster with provided y, X, and a ForecastingHorizon, and then making predictions. ```python from sktime.datasets import load_longley from sktime.forecasting.arima import ARIMA from sktime.forecasting.base import ForecastingHorizon from sktime.forecasting.compose import ForecastX from sktime.forecasting.var import VAR y, X = load_longley() fh = ForecastingHorizon([1, 2, 3]) pipe = ForecastX( forecaster_X=VAR(), forecaster_y=ARIMA(), ) pipe = pipe.fit(y, X=X, fh=fh) # this now works without X from the future of y! y_pred = pipe.predict(fh=fh) ``` -------------------------------- ### Load Example Series and Panel Data (Python) Source: https://www.sktime.net/en/latest/examples/03_transformers Loads example univariate series and panel data for use in transformer examples. This setup is crucial for demonstrating how transformers operate on different data structures. ```python from sktime.datatypes import get_examples # univariate series used in the examples X_series = get_examples("pd.Series", "Series")[3] # panel used in the examples X_panel = get_examples("pd-multiindex", "Panel")[2] ``` -------------------------------- ### ForecastByLevel Initialization and Fitting Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.compose.ForecastByLevel Demonstrates how to initialize ForecastByLevel with a NaiveForecaster and fit it to hierarchical data. It shows accessing fitted forecasters. ```python from sktime.forecasting.naive import NaiveForecaster from sktime.forecasting.compose import ForecastByLevel from sktime.utils._testing.hierarchical import _make_hierarchical y = _make_hierarchical() f = ForecastByLevel(NaiveForecaster(), groupby="local") f.fit(y) fitted_forecasters = f.forecasters_ fitted_forecasters_alt = f.get_fitted_params()["forecasters"] ``` -------------------------------- ### Initialize and Fit ForecastX with VAR and ARIMA Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.compose.ForecastX This example demonstrates how to initialize and fit the ForecastX forecaster using VAR for exogeneous data and ARIMA for endogeneous data. It shows how to load data, define a forecasting horizon, and then fit the composed forecaster. The key benefit highlighted is the ability to predict without requiring future values of X. ```python from sktime.datasets import load_longley from sktime.forecasting.arima import ARIMA from sktime.forecasting.base import ForecastingHorizon from sktime.forecasting.compose import ForecastX from sktime.forecasting.var import VAR y, X = load_longley() fh = ForecastingHorizon([1, 2, 3]) pipe = ForecastX( forecaster_X=VAR(), forecaster_y=ARIMA(), ) pipe = pipe.fit(y, X=X, fh=fh) # this now works without X from the future of y! y_pred = pipe.predict(fh=fh) ``` -------------------------------- ### Get Hierarchical Time Series Example (Python) Source: https://www.sktime.net/en/latest/examples/AA_datatypes_and_datasets Retrieves an example of a hierarchical time series formatted as a pandas DataFrame with a MultiIndex. This is useful for understanding the expected structure for the 'pd_multiindex_hier' mtype. ```python from sktime.utils.examples import get_examples get_examples(mtype="pd_multiindex_hier", as_scitype="Hierarchical")[0] ``` -------------------------------- ### CINNForecaster Initialization and Usage Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.conditional_invertible_neural_network.CINNForecaster Demonstrates how to initialize the CINNForecaster, load time series data, fit the model to the data, and make predictions for a specified forecasting horizon. This example uses the 'load_airline' dataset from sktime. ```python from sktime.forecasting.conditional_invertible_neural_network import ( CINNForecaster, ) from sktime.datasets import load_airline y = load_airline() model = CINNForecaster(window_size=100) model.fit(y) y_pred = model.predict(fh=[1,2,3]) ``` -------------------------------- ### Example Univariate Series in pd.DataFrame (Python) Source: https://www.sktime.net/en/latest/examples/AA_datatypes_and_datasets Demonstrates how to get an example of a univariate time series represented as a pandas DataFrame. This format is suitable for multivariate series and can handle unequally spaced data. ```python get_examples(mtype="pd.DataFrame", as_scitype="Series")[0] ``` -------------------------------- ### DoubleMLForecaster Initialization and Usage Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.causal.DoubleMLForecaster Demonstrates how to initialize and use the DoubleMLForecaster with sample data. It requires loading data, instantiating the forecaster with base forecasters, and fitting it to the data. The example uses NaiveForecaster as a placeholder for outcome and treatment forecasters. ```python from sktime.datasets import load_longley from sktime.forecasting.causal import DoubleMLForecaster from sktime.forecasting.naive import NaiveForecaster y, X = load_longley() # Initialize base forecasters (e.g., NaiveForecaster) outcome_fcst = NaiveForecaster(strategy="last") treatment_fcst = NaiveForecaster(strategy="last") # Initialize DoubleMLForecaster dml_forecaster = DoubleMLForecaster( outcome_fcst=outcome_fcst, treatment_fcst=treatment_fcst, exposure_vars=["x1", "x2"] ) # Fit the forecaster dml_forecaster.fit(y, X) # Predict (example) # y_pred = dml_forecaster.predict(X_pred) ``` -------------------------------- ### Get sktime Tabular Examples Source: https://www.sktime.net/en/latest/examples/03_transformers Retrieves example pandas DataFrame data for use with sktime's tabular transformers. These DataFrames represent tabular datasets suitable for pairwise comparisons. ```python from sktime.datatypes import get_examples # we retrieve some DataFrame examples X_tabular = get_examples("pd.DataFrame", "Series")[1] X2_tabular = get_examples("pd.DataFrame", "Series")[1][0:3] ``` -------------------------------- ### ESRNNForecaster Initialization and Usage Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.es_rnn.ESRNNForecaster Demonstrates how to initialize the ESRNNForecaster, load data, apply a LogTransformer, fit the forecaster, make predictions, and inverse transform the results. This example showcases a typical workflow for using the ESRNNForecaster with time series data. ```python from sktime.forecasting.es_rnn import ESRNNForecaster from sktime.datasets import load_airline from sktime.transformations.series.boxcox import LogTransformer y = load_airline() scaler=LogTransformer() forecaster=ESRNNForecaster(15,6,12,6,'double',20,1,32,100,'MSE') y_new=scaler.fit_transform(y) forecaster.fit(y_new, fh=[1,2,3]) y_pred = forecaster.predict() y_pred=scaler.inverse_transform(y_pred) ``` -------------------------------- ### Example: Get Test Parameters Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.darts.DartsXGBModel Demonstrates how to retrieve testing parameter settings for the forecaster. ```APIDOC ## GET /_get_test_params ### Description Retrieves testing parameter settings for the estimator. ### Method GET ### Endpoint `/_get_test_params` ### Query Parameters - **parameter_set** (str, optional) - 'default' - Name of the set of test parameters to return. ### Response #### Success Response (200) - **params** (dict or list of dict) - Parameters to create testing instances of the class. ### Response Example ```json { "params": {} } ``` ``` -------------------------------- ### EnbPIForecaster Initialization and Usage with sktime and tsbootstrap Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.enbpi.EnbPIForecaster Demonstrates how to initialize and use the EnbPIForecaster with a NaiveForecaster and MovingBlockBootstrap transformer. It shows fitting the forecaster to airline data and generating predictions and prediction intervals. ```python import numpy as np from tsbootstrap import MovingBlockBootstrap from sktime.forecasting.enbpi import EnbPIForecaster from sktime.forecasting.naive import NaiveForecaster from sktime.datasets import load_airline from sktime.transformations.series.difference import Differencer from sktime.transformations.series.detrend import Deseasonalizer from sktime.forecasting.base import ForecastingHorizon y = load_airline() forecaster = Differencer(lags=[1]) * Deseasonalizer(sp=12) * EnbPIForecaster( forecaster=NaiveForecaster(sp=12), bootstrap_transformer=MovingBlockBootstrap(n_bootstraps=10)) fh = ForecastingHorizon(np.arange(1, 13)) forecaster.fit(y, fh=fh) res = forecaster.predict() res_int = forecaster.predict_interval(coverage=[0.5]) ``` -------------------------------- ### Get Example Hierarchical Data in sktime Source: https://www.sktime.net/en/latest/examples/01c_forecasting_hierarchical_global Retrieves an example of hierarchical data formatted for sktime using the `get_examples` utility. This data is typically a pandas DataFrame with a MultiIndex representing the hierarchy. ```python from sktime.datatypes import get_examples y_hier = get_examples("pd_multiindex_hier")[1] y_hier ``` -------------------------------- ### Get sktime Time Series Examples (Python) Source: https://www.sktime.net/en/latest/examples/AA_datatypes_and_datasets Imports the 'get_examples' function from sktime.datatypes to retrieve example time series data. This function is used to generate sample data for different data types and structures within sktime. ```python from sktime.datatypes import get_examples ``` -------------------------------- ### Initialize and Use PytorchForecastingNBeats Model Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.pytorchforecasting.PytorchForecastingNBeats Demonstrates how to initialize the PytorchForecastingNBeats model with custom trainer parameters, fit it to training data, and generate predictions for a given forecast horizon. It also shows how to prepare hierarchical data for forecasting. ```python from sktime.forecasting.base import ForecastingHorizon from sktime.forecasting.pytorchforecasting import PytorchForecastingNBeats from sktime.utils._testing.hierarchical import _make_hierarchical from sklearn.model_selection import train_test_split # generate random data data = _make_hierarchical( hierarchy_levels=(5, 200), max_timepoints=50, min_timepoints=50, n_columns=3 ) # define forecast horizon max_prediction_length = 5 fh = ForecastingHorizon(range(1, max_prediction_length + 1), is_relative=True) # split y data for train and test y_train, y_test = train_test_split( data["c2"].to_frame(), test_size=0.2, train_size=0.8, shuffle=False ) len_levels = len(y_test.index.names) y_test = y_test.groupby(level=list(range(len_levels - 1))).apply( lambda x: x.droplevel(list(range(len_levels - 1))).iloc[:-max_prediction_length] ) # define the model model = PytorchForecastingNBeats( trainer_params={ "max_epochs": 5, # for quick test "limit_train_batches": 10, # for quick test }, ) # fit and predict model.fit(y=y_train, fh=fh) # doctest skip y_pred = model.predict(fh, y=y_test) print(y_test) print(y_pred) ``` -------------------------------- ### FreshPRINCE Classifier Initialization and Usage (Python) Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.classification.feature_based.FreshPRINCE Demonstrates how to initialize and use the FreshPRINCE classifier. It includes loading test data, fitting the classifier with specified parameters, and making predictions. Dependencies include sktime.classification.feature_based and sktime.datasets. ```python from sktime.classification.feature_based import FreshPRINCE from sktime.datasets import load_unit_test X_train, y_train = load_unit_test(split="train", return_X_y=True) X_test, y_test = load_unit_test(split="test", return_X_y=True) clf = FreshPRINCE( default_fc_parameters="comprehensive", n_estimators=200, save_transformed_data=False, verbose=0, n_jobs=1, ) clf.fit(X_train, y_train) y_pred = clf.predict(X_test) ``` -------------------------------- ### RotationForest - get_metadata_routing Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.classification.sklearn.RotationForest Get metadata routing of this object. Please check User Guide on how the routing mechanism works. ```APIDOC ## GET /get_metadata_routing ### Description Get metadata routing of this object. Please check User Guide on how the routing mechanism works. ### Method GET ### Endpoint /get_metadata_routing ### Response #### Success Response (200) - **routing** (MetadataRequest) - A `MetadataRequest` encapsulating routing information. #### Response Example ```json { "routing": "[MetadataRequest]" } ``` ``` -------------------------------- ### Instantiate and Fit FallbackForecaster with Multiple Models (Python) Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.compose.FallbackForecaster This example demonstrates how to instantiate and fit the FallbackForecaster using a list of forecasters. It shows how to define fallback strategies, such as using a PolynomialTrendForecaster and falling back to a NaiveForecaster if the first one fails. The forecaster is then fitted to the airline dataset and used for prediction. ```python from sktime.forecasting.naive import NaiveForecaster from sktime.forecasting.compose import FallbackForecaster from sktime.forecasting.compose import EnsembleForecaster from sktime.forecasting.trend import PolynomialTrendForecaster from sktime.datasets import load_airline y = load_airline() # first fit polynomial trend, if fails make naive forecast forecasters = [ ("poly", PolynomialTrendForecaster()), ("naive", NaiveForecaster()) ] forecaster = FallbackForecaster(forecasters=forecasters) forecaster.fit(y=y, fh=[1, 2, 3]) y_pred = forecaster.predict() ``` -------------------------------- ### Get Bivariate Example in pd.DataFrame Source: https://www.sktime.net/en/latest/examples/01c_forecasting_hierarchical_global Retrieves a bivariate time series example in pandas DataFrame format. This demonstrates how multiple variables are represented in columns, observed at the same time points defined by the index. ```python from sktime.datatypes import get_examples # Get a bivariate example in pd.DataFrame format bivariate_df = get_examples(mtype="pd.DataFrame")[1] print(bivariate_df) ``` -------------------------------- ### Start Live-Reloading Documentation Build Source: https://www.sktime.net/en/latest/developer_guide/documentation Starts the live-reloading documentation build process using sphinx-autobuild. After installation, navigate to 'docs/source' and run this command to have the documentation automatically rebuild and refresh in the browser upon file changes. ```bash make autobuild ``` -------------------------------- ### StationarityADF Initialization and Fitting Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.param_est.stationarity.StationarityADF Demonstrates how to initialize the StationarityADF estimator, fit it to time series data, and retrieve the fitted stationarity status. This example uses the load_airline dataset from sktime.datasets. ```python from sktime.datasets import load_airline from sktime.param_est.stationarity import StationarityADF X = load_airline() sty_est = StationarityADF() sty_est.fit(X) sty_est.get_fitted_params()["stationary"] ``` -------------------------------- ### UnobservedComponents Initialization and Fitting Example (Python) Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.structural.UnobservedComponents Demonstrates how to initialize and fit the UnobservedComponents model using sample data. It imports necessary functions from sktime and loads the airline dataset. ```python from sktime.datasets import load_airline from sktime.forecasting.structural import UnobservedComponents y = load_airline() ``` -------------------------------- ### Get Univariate Example in pd.DataFrame Source: https://www.sktime.net/en/latest/examples/01c_forecasting_hierarchical_global Retrieves a univariate time series example represented as a pandas DataFrame. This format uses columns for variables and the index for time points. It can represent multivariate and unequally spaced series. ```python from sktime.datatypes import get_examples # Get a univariate example in pd.DataFrame format univariate_df = get_examples(mtype="pd.DataFrame")[0] print(univariate_df) ``` -------------------------------- ### SCINetForecaster Initialization and Usage Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.scinet.SCINetForecaster Demonstrates how to initialize the SCINetForecaster, load airline passenger data, fit the model to the data, and generate predictions. It requires the sktime library and its datasets module. ```python from sktime.forecasting.scinet import SCINetForecaster from sktime.datasets import load_airline model = SCINetForecaster(seq_len=8) y = load_airline() model.fit(y, fh=[1, 2, 3]) y_pred = model.predict() print(y_pred) ``` -------------------------------- ### VmdTransformer in a Forecasting Pipeline Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.transformations.series.vmd.VmdTransformer This example illustrates how VmdTransformer can be integrated into a forecasting pipeline. It shows the composition of VmdTransformer with a TrendForecaster, allowing for decomposition, individual component forecasting, and subsequent recomposition. Note that this example is marked with '# doctest: +SKIP' and requires additional setup for TrendForecaster. ```python from sktime.transformations.series.vmd import VmdTransformer from sktime.forecasting.trend import TrendForecaster # doctest: +SKIP pipe = VmdTransformer() * TrendForecaster() y_train = load_solar() # Assuming y_train is loaded pipe.fit(y_train, fh=[1, 2, 3]) y_pred = pipe.predict() ``` -------------------------------- ### Get Hierarchical Example in pd_multiindex_hier Source: https://www.sktime.net/en/latest/examples/01c_forecasting_hierarchical_global Retrieves an example of hierarchical time series data in the 'pd_multiindex_hier' mtype. This format uses a multi-level index to represent hierarchical structures, with the last level typically denoting time points. ```python from sktime.datatypes import get_examples # Get a hierarchical series example in pd_multiindex_hier format X = get_examples(mtype="pd_multiindex_hier")[0] print(X) ``` -------------------------------- ### Initialize and Use PytorchForecastingNHiTS Model Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.pytorchforecasting.PytorchForecastingNHiTS Demonstrates how to initialize the PytorchForecastingNHiTS model, fit it to training data, and make predictions on test data. It requires sktime, pytorch-forecasting, and sklearn packages. The example includes data generation, splitting, and model fitting with custom trainer parameters. ```python from sktime.forecasting.base import ForecastingHorizon from sktime.forecasting.pytorchforecasting import PytorchForecastingNHiTS from sktime.utils._testing.hierarchical import _make_hierarchical from sklearn.model_selection import train_test_split # generate random data data = _make_hierarchical( hierarchy_levels=(5, 200), max_timepoints=50, min_timepoints=50, n_columns=3 ) # define forecast horizon max_prediction_length = 5 fh = ForecastingHorizon(range(1, max_prediction_length + 1), is_relative=True) # split X, y data for train and test x = data["c0", "c1"] y = data["c2"].to_frame() X_train, X_test, y_train, y_test = train_test_split( x, y, test_size=0.2, train_size=0.8, shuffle=False ) len_levels = len(y_test.index.names) y_test = y_test.groupby(level=list(range(len_levels - 1))).apply( lambda x: x.droplevel(list(range(len_levels - 1))).iloc[:-max_prediction_length] ) # define the model model = PytorchForecastingNHiTS( trainer_params={ "max_epochs": 5, # for quick test "limit_train_batches": 10, # for quick test }, ) # fit and predict model.fit(y=y_train, X=X_train, fh=fh) # doctest skip y_pred = model.predict(fh, X=X_test, y=y_test) ``` -------------------------------- ### MomentFMForecaster Initialization and Usage Example Source: https://www.sktime.net/en/latest/api_reference/auto_generated/sktime.forecasting.hf_momentfm_forecaster.MomentFMForecaster Demonstrates how to initialize the MomentFMForecaster, fit it to time series data, and make predictions. This example uses the 'load_airline' dataset and sets a custom sequence length. ```python from sktime.forecasting.hf_momentfm_forecaster import MomentFMForecaster from sktime.datasets import load_airline y = load_airline() forecaster = MomentFMForecaster(seq_len = 2) forecaster.fit(y, fh=[1, 2, 3]) y_pred = forecaster.predict(y = y) ```