随笔分类 -  机械学习

摘要:TensorFlow报错:AttributeError: module 'tensorflow._api.v1.train' has no attribute 'SummaryWriter'等 TensorFlow报错:AttributeError: module ‘tensorflow._api. 阅读全文
posted @ 2021-01-19 09:20 划得戳 阅读(506) 评论(0) 推荐(0)
摘要: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() ... 阅读全文
posted @ 2019-06-21 15:55 划得戳 阅读(256) 评论(0) 推荐(0)
摘要:分类器: 阅读全文
posted @ 2019-06-21 14:57 划得戳 阅读(478) 评论(0) 推荐(0)
摘要:平稳性 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 阅读全文
posted @ 2019-06-21 13:54 划得戳 阅读(480) 评论(0) 推荐(0)
摘要:单位根检验 import statsmodels.tsa.stattools as ts from datetime import datetime import pandas_datareader.date as web amzn = web.DataReader('AMZN','quandl', 阅读全文
posted @ 2019-06-21 09:37 划得戳 阅读(600) 评论(0) 推荐(0)
摘要:from sklearn import preprocessing #导入sklearn的处理函数用于处理一些大值数据 x_train, x_test, y_train, y_test = train_test_split(x, y, random_state=1) print(x_train) # 阅读全文
posted @ 2018-08-21 13:07 划得戳 阅读(542) 评论(0) 推荐(0)