kartik-joshi / stock-predection Goto Github PK
View Code? Open in Web Editor NEWStock Prediction using machine learning
Stock Prediction using machine learning
Traceback (most recent call last):
File "C:/Users/Broadway/PycharmProjects/pp1.py/SVM.py", line 48, in
testdataset =Read_file('APPL.csv')
File "C:/Users/Broadway/PycharmProjects/pp1.py/SVM.py", line 9, in Read_file
with open(file_name, 'r', newline='',encoding='utf-8') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'APPL.csv'
Process finished with exit code 1
**how to solve this Error
before applying all the algorithm you have done preprocessing by read file then converted string column into float then converted string into integer .
so my question is
is they can do it directly by using pandas function because i am getting error in that.
For your output, shouldn't the class be 1 if the stock price is higher the next day vs. today not if it is higher today vs. yesterday? If you are comparing today vs. yesterday, that is not a prediction.
Also, your prediction results are using the training sets as part of the prediction results, which are inflating the results; I've only reviewed the SVM code, but I assume the logic is the same in the other procedures.
For instance,
for i in range(0, len(testdataset)):
total += 1
temp = clf.predict([testdataset[i]])
if temp == test_target[i]:
count += 1
accuracy = count * 100 / total
print('Accuracy: %s' % accuracy)
runs[j] = accuracy
Should be,
for i in range(r + 10000, len(testdataset)):
total += 1
temp = clf.predict([testdataset[i]])
if temp == test_target[i]:
count += 1
accuracy = count * 100 / total
print('Accuracy: %s' % accuracy)
runs[j] = accuracy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.