随笔分类 - 机械学习
摘要:TensorFlow报错:AttributeError: module 'tensorflow._api.v1.train' has no attribute 'SummaryWriter'等 TensorFlow报错:AttributeError: module ‘tensorflow._api.
阅读全文
摘要:def annualised_sharpe(returns, N=252): return np.sqrt(N) * returns.mean()/returns.std()def equity_sharpe(ticker,start, end): pdf = web.DataReader(ticker, 'quandl', start, end).sort_index() ...
阅读全文
摘要:平稳性 from numpy import cumsum , log, polyfit, sqrt, std, subtract from numpy.random import randn def hurst(ts): lags = range(2, 100) tau = [sqrt(std(su
阅读全文
摘要:单位根检验 import statsmodels.tsa.stattools as ts from datetime import datetime import pandas_datareader.date as web amzn = web.DataReader('AMZN','quandl',
阅读全文
摘要:from sklearn import preprocessing #导入sklearn的处理函数用于处理一些大值数据 x_train, x_test, y_train, y_test = train_test_split(x, y, random_state=1) print(x_train) #
阅读全文

浙公网安备 33010602011771号