# pyFTS.models.seasonal package

## Submodules

## pyFTS.models.seasonal.SeasonalIndexer module

class pyFTS.models.seasonal.SeasonalIndexer.DataFrameSeasonalIndexer(index_fields, index_seasons, data_field, **kwargs)

  Bases: `pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer`

  Use the Pandas.DataFrame index position to index the seasonality

  get_data(data)
  get_data_by_season(data, indexes)
  get_index_by_season(indexes)
  get_season_by_index(index)
  get_season_of_data(data)
  set_data(data, value)

class pyFTS.models.seasonal.SeasonalIndexer.DateTimeSeasonalIndexer(date_field, index_fields, index_seasons, data_field, **kwargs)

  Bases: `pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer`

  Use a Pandas.DataFrame date field to index the seasonality

  get_data(data)
  get_data_by_season(data, indexes)
  get_index(data)
  get_index_by_season(indexes)
  get_season_by_index(index)
  get_season_of_data(data)
  set_data(data, value)

class pyFTS.models.seasonal.SeasonalIndexer.LinearSeasonalIndexer(seasons, units, ignore=None, **kwargs)

  Bases: `pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer`

  Use the data array/list position to index the seasonality

  get_data(data)
  get_index_by_season(indexes)
  get_season_by_index(index)
  get_season_of_data(data)

class pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer(num_seasons, **kwargs)

  Bases: `object`

  Seasonal Indexer. Responsible to find the seasonal index of a data point inside its data set

  get_data(data)
  get_data_by_season(data, indexes)
  get_index(data)
  get_index_by_season(indexes)
  get_season_by_index(inde)
  get_season_of_data(data)

## pyFTS.models.seasonal.cmsfts module

## pyFTS.models.seasonal.common module

class pyFTS.models.seasonal.common.DateTime(value)

  Bases: `enum.Enum`

  Data and Time granularity for time granularity and seasonality identification

  day_of_month = 30
  day_of_week = 7
  day_of_year = 364
  half = 2
  hour = 24
  hour_of_day = 24
  hour_of_month = 744
  hour_of_week = 168
  hour_of_year = 8736
  minute = 60
  minute_of_day = 1440
  minute_of_hour = 60
  minute_of_month = 44640
  minute_of_week = 10080
  minute_of_year = 524160
  month = 12
  quarter = 4
  second = 60
  second_of_day = 86400
  second_of_hour = 3600
  second_of_minute = 60.00001
  sixth = 6
  third = 3
  year = 1

class pyFTS.models.seasonal.common.FuzzySet(datepart, name, mf, parameters, centroid, alpha=1.0, **kwargs)

  Bases: `pyFTS.common.FuzzySet.FuzzySet`

  Temporal/Seasonal Fuzzy Set

  transform(x)

    Preprocess the data point for non native types

    Parameters

      x –

    Returns

      return a native type value for the structured type

pyFTS.models.seasonal.common.strip_datepart(date, date_part, mask='')

## pyFTS.models.seasonal.msfts module

## pyFTS.models.seasonal.partitioner module

class pyFTS.models.seasonal.partitioner.TimeGridPartitioner(**kwargs)

  Bases: `pyFTS.partitioners.partitioner.Partitioner`

  Even Length DateTime Grid Partitioner

  build(data)

    Perform the partitioning of the Universe of Discourse

    Parameters

      data – training data

    Returns

  build_index()
  extractor(x)

    Extract a single primitive type from an structured instance

  mask

    A string with datetime formating mask

  plot(ax)

    Plot the :param ax: :return:

  search(data, **kwargs)

    Perform a search for the nearest fuzzy sets of the point ‘data’. This function were designed to work with several overlapped fuzzy sets.

    Parameters

      - data – the value to search for the nearest fuzzy sets

      - type – the return type: ‘index’ for the fuzzy set indexes or ‘name’ for fuzzy set names.

      - results – the number of nearest fuzzy sets to return

    Returns

      a list with the nearest fuzzy sets

  season

    Seasonality, a pyFTS.models.seasonal.common.DateTime object

## pyFTS.models.seasonal.sfts module

## Module contents