- Non Stationary Fuzzy Sets
This commit is contained in:
parent
9fb79ea080
commit
cda8ba80d4
@ -3,7 +3,7 @@ from pyFTS import *
|
||||
from pyFTS.common import Membership
|
||||
|
||||
|
||||
class FuzzySet:
|
||||
class FuzzySet(object):
|
||||
"""
|
||||
Fuzzy Set
|
||||
"""
|
||||
|
@ -1,3 +1,7 @@
|
||||
"""
|
||||
Membership functions for Fuzzy Sets
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
import math
|
||||
from pyFTS import *
|
||||
|
38
pyFTS/common/NonStationary.py
Normal file
38
pyFTS/common/NonStationary.py
Normal file
@ -0,0 +1,38 @@
|
||||
import numpy as np
|
||||
from pyFTS import *
|
||||
from pyFTS.common import FuzzySet, Membership
|
||||
|
||||
|
||||
class NonStationaryFuzzySet(FuzzySet.FuzzySet):
|
||||
"""
|
||||
Non Stationary Fuzzy Sets
|
||||
|
||||
GARIBALDI, Jonathan M.; JAROSZEWSKI, Marcin; MUSIKASUWAN, Salang. Nonstationary fuzzy sets.
|
||||
IEEE Transactions on Fuzzy Systems, v. 16, n. 4, p. 1072-1086, 2008.
|
||||
"""
|
||||
|
||||
def __init__(self, name, mf, parameters):
|
||||
"""
|
||||
Constructor
|
||||
:param name: Fuzzy Set name
|
||||
:param mf: Membership Function
|
||||
:param pf: Pertubation Function
|
||||
:param parameters: initial parameters of the membership function
|
||||
:param pf_parameters: parameters of the membership pertubation function
|
||||
"""
|
||||
super(FuzzySet, self).__init__(order=1, name=name, **kwargs)
|
||||
self.name = name
|
||||
self.mf = mf
|
||||
self.parameters = parameters
|
||||
self.pf = []
|
||||
self.pf_parameters = []
|
||||
|
||||
def appendPertubation(self, pf, pf_parameters):
|
||||
"""
|
||||
Append a pertubation function to the non-stationary fuzzy set
|
||||
:param pf:
|
||||
:param pf_parameters:
|
||||
:return:
|
||||
"""
|
||||
self.pf.append(pf)
|
||||
self.pf_parameters.append(pf_parameters)
|
27
pyFTS/common/Pertubation.py
Normal file
27
pyFTS/common/Pertubation.py
Normal file
@ -0,0 +1,27 @@
|
||||
"""
|
||||
Pertubation functions for Non Stationary Fuzzy Sets
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
from pyFTS import *
|
||||
from pyFTS.common import FuzzySet, Membership
|
||||
|
||||
|
||||
def linear(x, parameters):
|
||||
return parameters[0]*x + parameters[1]
|
||||
|
||||
|
||||
def polynomial(x, parameters):
|
||||
n = len(parameters)
|
||||
tmp = 0.0
|
||||
for k in np.arange(0,n):
|
||||
tmp += parameters[k] * x**k
|
||||
return tmp
|
||||
|
||||
|
||||
def exponential(x, parameters):
|
||||
return np.exp(x*parameters[0])
|
||||
|
||||
|
||||
def periodic(x, parameters):
|
||||
return np.sin(x * parameters[0] + parameters[1])
|
@ -7,7 +7,12 @@ from pyFTS import hofts, fts, tree
|
||||
|
||||
|
||||
class IntervalFTS(hofts.HighOrderFTS):
|
||||
"""High Order Interval Fuzzy Time Series"""
|
||||
"""
|
||||
High Order Interval Fuzzy Time Series
|
||||
|
||||
SILVA, Petrônio CL; SADAEI, Hossein Javedani; GUIMARÃES, Frederico Gadelha. Interval Forecasting with Fuzzy Time Series.
|
||||
In: Computational Intelligence (SSCI), 2016 IEEE Symposium Series on. IEEE, 2016. p. 1-8.
|
||||
"""
|
||||
def __init__(self, name, **kwargs):
|
||||
super(IntervalFTS, self).__init__(name="IFTS " + name, **kwargs)
|
||||
self.shortname = "IFTS " + name
|
||||
|
Loading…
Reference in New Issue
Block a user