Posts

Showing posts with the label time-series

New to ML trying to use SVM and SVR for 1st time some syntax/transposition errors

Image
Clash Royale CLAN TAG #URR8PPP New to ML trying to use SVM and SVR for 1st time some syntax/transposition errors I am trying to run A SVR on some data I got from yahoo finance. I want to use closing prices of Ethereum to predict next 10-15 days path using a supervised learning method. I have already done autoregressive model (ARIMA) but now I want to try ML techniques like pattern recognition so I start with SVR I am simply running into a problem that I dont know how to convert my data column into a row so that the SVR works...I thought it would be simple but I am new to coding overall...appreciate your help; see below: ''' building a simple model for using machine learning to do pattern recog on stock prices''' import pandas as pd import matplotlib.pyplot as plt import matplotlib.pylab as ply import numpy as np from pandas import DataFrame as df from sklearn.svm import SVR df = pd.read_csv("C:LearningETH.csv", index_col='Date', parse_dates=Tru...

I have excel dates entered as 1/9/18, and I'd like to change them to 1/1/09

Image
Clash Royale CLAN TAG #URR8PPP I have excel dates entered as 1/9/18, and I'd like to change them to 1/1/09 In the format 1/9/18 the date is wrong. But the true date is made up of the wrong dates' month as month and day as year. So I'd like to convert 1/9/18 to 1/1/09 meaning January 1, 2009. What is the rule that says 1/9/18 should be converted to 1/1/09 ? – мυѕτавєւмo 6 mins ago 1/9/18 1/1/09 1 Answer 1 If your computer's regional system uses a DMY 'short date' then put this in an unused column to the right. =date(2000+month(a2), day(a1), 1) But if your computer's regional system uses a MDY 'short date' then put this in an unused column to the right. =date(2000+day(...

Extracting statiscal values from a list with multiple lists of results of statistical test

Image
Clash Royale CLAN TAG #URR8PPP Extracting statiscal values from a list with multiple lists of results of statistical test I did a Ljung-Box Test for independence in r with 36 lags and stored the results in a list. for (lag in c(1:36)){ box.test.list[[lag]] <- (Box.test(btcr, type = "Ljung", lag)) } I want to extract the p-values as well as the test statistic (X-squared) and print them out to look something like: X-squared = 100, p-value = 0.0001 I also want to pull it out p-value indivually but rather than just spit out numbers, I want something like: [1] p-value = 0.001 [2] p-value = 0.0001 and so on. Can this be done? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.