def fit_sklearn_model(ts, model, test_size, val_size):
    """
    Parameters: 
    ts (pandas.DataFrame): time series values created by 
                           src.time_series_functions.create_windowing
    model (Sklearn Model): base model to predict ts
    test_size (int): size of test set
    val_size (int): size of validation set (if you do not use validation set, 
                     val_size can be set as 0)

    Returns: 
    Sklearn Model: trained model
    """

    train_size = len(ts) - test_size - val_size
    y_train = ts['actual'][0:train_size]
    x_train = ts.drop(columns=['actual'], axis=1)[0:train_size]

    return model.fit(x_train, y_train)