2017-01-14 03:42:00 +04:00
|
|
|
#!/usr/bin/python
|
|
|
|
# -*- coding: utf8 -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
import numpy as np
|
|
|
|
import pandas as pd
|
|
|
|
import matplotlib as plt
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
from mpl_toolkits.mplot3d import Axes3D
|
|
|
|
|
|
|
|
import pandas as pd
|
|
|
|
from pyFTS.partitioners import Grid
|
|
|
|
from pyFTS.common import FLR,FuzzySet,Membership
|
2017-01-24 16:40:48 +04:00
|
|
|
from pyFTS import fts,hofts,ifts,pfts,tree, chen
|
2017-01-14 03:42:00 +04:00
|
|
|
from pyFTS.benchmarks import benchmarks as bchmk
|
|
|
|
|
|
|
|
|
|
|
|
os.chdir("/home/petronio/dados/Dropbox/Doutorado/Disciplinas/AdvancedFuzzyTimeSeriesModels/")
|
|
|
|
|
2017-01-24 16:40:48 +04:00
|
|
|
#enrollments = pd.read_csv("DataSets/Enrollments.csv", sep=";")
|
|
|
|
#enrollments = np.array(enrollments["Enrollments"])
|
2017-01-14 03:42:00 +04:00
|
|
|
|
2017-01-24 16:40:48 +04:00
|
|
|
#enrollments_fs1 = Grid.GridPartitionerTrimf(enrollments,6)
|
|
|
|
|
|
|
|
#tmp = chen.ConventionalFTS("")
|
2017-01-14 03:42:00 +04:00
|
|
|
|
|
|
|
pfts1_enrollments = pfts.ProbabilisticFTS("1")
|
2017-01-24 16:40:48 +04:00
|
|
|
#pfts1_enrollments.train(enrollments,enrollments_fs1,1)
|
|
|
|
#pfts1_enrollments.shortname = "1st Order"
|
|
|
|
#pfts2_enrollments = pfts.ProbabilisticFTS("2")
|
|
|
|
#pfts2_enrollments.dump = False
|
|
|
|
#pfts2_enrollments.shortname = "2nd Order"
|
|
|
|
#pfts2_enrollments.train(enrollments,enrollments_fs1,2)
|
2017-01-14 03:42:00 +04:00
|
|
|
|
|
|
|
|
2017-01-24 16:40:48 +04:00
|
|
|
#pfts1_enrollments.forecastAheadDistribution2(enrollments[:15],5,100)
|