コード例 #1
0
def getDensityPlot():
    X = validate.getdatafile()
    X.astype('float32')
    pyplot.figure(1)
    pyplot.subplot(211)
    X.hist()
    pyplot.subplot(212)
    X.plot(kind='kde')
    pyplot.show()
コード例 #2
0
def getBoxWhiskerPlot():
    X = validate.getdatafile()
    X.astype('float32')
    groepen = X['1964':'1970'].groupby(TimeGrouper('A'))
    jaren = DataFrame()
    for name, groep in groepen:
       jaren[name.year] = groep.values
    jaren.boxplot()
    pyplot.show()
コード例 #3
0
def predictFuture():
    series = validate.getdatafile()
    months_in_year = 12
    model_fit = ARIMAResults.load(variables.model)
    bias = numpy.load(variables.bias)
    yhat = float(model_fit.forecast()[0])
    yhat = bias + inverse_difference(series.values, yhat, months_in_year)
    print('Predicted: %.3f' % yhat)
    pyplot.plot(series)
    pyplot.title('Lijn diagram tot aan voorspelling')
    pyplot.show()

    prediction = pd.DataFrame(yhat)
    prediction.to_csv(variables.predictionSave,
                      mode='a',
                      sep=',',
                      header=False)
    prediction.to_csv(variables.datafileloc, mode='a', header=False)
コード例 #4
0
def getSummary():
    from Data import validate

    file = validate.getdatafile()
    summary = file.describe()
    print(summary)
コード例 #5
0
def getLineplot():
    
    X = validate.getdatafile()
    X.plot()
    pyplot.title('Lijn diagram')
    pyplot.show()