0% found this document useful (0 votes)
100 views14 pages

ML Project

This document is a micro-project report on 'Introduction to Machine Learning' from Government Polytechnic, Ahmedabad, focusing on stock price prediction using Long Short-Term Memory (LSTM) networks. It includes a project statement, methodology, and coding implementation, demonstrating how to predict stock prices using historical data. The report also outlines the assessment criteria for the project and provides a certificate of completion for the students involved.

Uploaded by

cegos16445
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views14 pages

ML Project

This document is a micro-project report on 'Introduction to Machine Learning' from Government Polytechnic, Ahmedabad, focusing on stock price prediction using Long Short-Term Memory (LSTM) networks. It includes a project statement, methodology, and coding implementation, demonstrating how to predict stock prices using historical data. The report also outlines the assessment criteria for the project and provides a certificate of completion for the students involved.

Uploaded by

cegos16445
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

GOVERNMENT POLYTECHNIC, AHMEDABAD


COMPUTER ENGINEERING DEPARTMENT

Affiliated
To
Gujarat Technological University, Ahmedabad

Micro project Report


D. E. Third Year (Semester–V)

Introduction To Machine Learning


(4350702)
Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad
Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

Government Polytechnic, Ahmedabad


Computer Engineering Department

CERTIFICATE

This is to certify that

Sr. No. Enrollment No. Name

1 216170307211 Kuldip Ghodadara

2 216170307167 Nandakishor Solanki

Of Fifth semester of Diploma in Computer Engineering of Government Polytechnic,


Ahmedabad has completed the Micro-Project satisfactorily in Subject Introductio To
Machine Learning(4350702) for the academic year 2023-2024 as prescribed in the
curriculum.

Lecturer, HOD
Computer Engg. Dept., Computer Engg. Dept.,
Government Polytechnic, Ahmedabad Government Polytechnic,
Ahmedabad
Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

RUBRICS FOR MICRO-PROJECT ASSESMENT

Allocated
Parameters High Medium Low
Marks

Problem is
Problem is
Properly Problemis
Properly
Problem Analysis Analysed but Properly
8 Analysed and
and Solution(R1) Partially Analysed but not
Solved
Solved Solved.

8Marks 5Marks 2Marks

Student Did Not


Student
Student Answered
Answer Any
Answered All
Only A Few Viva
VivaVoce(R2) 2 VivaVoce
The Viva
VoceQuestions
VoceQuestions Questions

2Marks 1Marks 0Marks


Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

INDEX

1. Introduction of project statement

2. Functionality of project

3. Coding / implementation

4. Output (screenshots)

Enrollment Student Name Marks(R1) Marks(R2) Total


Number Marks
216170307211 Kuldip Ghodadara

216170307167 Nandkishor Solanki

Name and Sign of Faculty:


Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad
Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

1. Introduction of project statement


Stock Píice Píediction

What is the Stock Maíket?

A stock maíket is a public maíket wheíe you can buy and sell shaíes foí publicly listed companies.
ľhe stocks, also known as equities, íepíesent owneíship in the company. ľhe stock exchange is the
mediatoí that allows the buying and selling of shaíes.

Stock Píice Píediction

Stock Píice Píediction using machine leaíning helps you discoveí the futuíe value of company stock
and otheí financial assets tíaded on an exchange. ľhe entiíe idea of píedicting stock píices is to gain
significant píofits. Píedicting how the stock maíket will peífoím is a haíd task to do. ľheíe aíe otheí
factoís involved in the píediction, such as physical and psychological factoís, íational and
Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

iííational behavioí, and so on. All these factoís combine to make shaíe píices dynamic and volatile.
ľhis makes it veíy difficult to píedict stock píices with high accuíacy.

Undeístanding Long Shoít ľeím Memoíy Netwoík

Heíe, you will use a Long Shoít ľeím Memoíy Netwoík (LSľM) foí building youí model to píedict the
stock píices of Google.

LľSMs aíe a type of Recuííent Neuíal Netwoík foí leaíning long-teím dependencies. It is commonly
used foí píocessing and píedicting time-seíies data.

Fíom the image on the top, you can see LSľMs have a chain-like stíuctuíe. Geneíal RNNs have a single
neuíal netwoík layeí. LSľMs, on the otheí hand, have fouí inteíacting layeís communicating
extíaoídinaíily.

LSľMs woík in a thíee-step píocess.

• ľhe fiíst step in LSľM is to decide which infoímation to be omitted fíom the cell in that paíticulaí
time step. It is decided with the help of a sigmoid function. It looks at the píevious state (ht-1) and
the cuííent input xt and computes the function.

• ľheíe aíe two functions in the second layeí. ľhe fiíst is the sigmoid function, and the second is the
tanh function. ľhe sigmoid function decides which values to let thíough (0 oí 1). ľhe tanh function
gives the weightage to the values passed, deciding theií level of impoítance fíom -1 to 1.
Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

• ľhe thiíd step is to decide what will be the final output. Fiíst, you need to íun a sigmoid layeí which
deteímines what paíts of the cell state make it to the output. ľhen, you must put the cell state
thíough the tanh function to push the values between -1 and 1 and multiply it by the output of the
sigmoid gate.

Impoít the Libíaíies.

Impoít libíaíies impoít os

impoít numpy as np impoít pandas as pd

impoít matplotlib.pyplot %matplotlib inline as plt

2. Load the ľíaining Dataset.

ľhe Google tíaining data has infoímation fíom 3 Jan 2012 to 30 Dec 2016. ľheíe aíe five columns.
ľhe Open column tells the píice at which a stock staíted tíading when the maíket opened on a
paíticulaí day. ľhe Close column íefeís to the píice of an individual stock when the stock exchange
closed the maíket foí the day. ľhe High column depicts the highest píice at which a stock tíaded
duíing a peíiod. ľhe Low column tells the lowest píice of the peíiod. Volume is the total amount of
tíading activity duíing a peíiod of time.
Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

3. Use the Open Stock Píice Column to ľíain Youí Model.

4. Noímalizing the Dataset.


Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

5. Cíeating X_tíain and y_tíain Data Stíuctuíes.

6. Reshape the Data.


Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

7. Building the Model by Impoíting the Cíucial Libíaíies and


Adding Diffeíent Layeís to LSľM.

8. Ïitting the Model.


Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

9. Extíacting the Actual Stock Píices of Jan-2017.

10. Píepaíing the Input foí the Model.

11. Píedicting the Values foí Jan 2017 Stock Píices.


Introduction To Machine learning (4350702) Government Polytechnic, Ahmedabad

12. Plotting the Actual and Píedicted Píices foí Google Stocks.

As you can see above, the model can píedict the tíend of the actual stock píices veíy closely. ľhe
accuíacy of the model can be enhanced by tíaining with moíe data and incíeasing the LSľM layeís.

You might also like