{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "8362389e-64ca-4520-b06c-94b084afcd4f", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 3, "id": "0089aa17-ae94-498f-8673-6d4f7af64421", "metadata": {}, "outputs": [], "source": [ "df = pd.read_excel(\"yahoo_data.xlsx\")" ] }, { "cell_type": "markdown", "id": "d867065e-5022-433d-b3ca-373e154a90bb", "metadata": {}, "source": [ "# Pre-Processing of the data" ] }, { "cell_type": "code", "execution_count": 4, "id": "292e4241-e114-435b-a841-9244e2addf86", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Date | \n", "Open | \n", "High | \n", "Low | \n", "Close* | \n", "Adj Close** | \n", "Volume | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "Apr 28, 2023 | \n", "33797.43 | \n", "34104.56 | \n", "33728.40 | \n", "34098.16 | \n", "34098.16 | \n", "354310000 | \n", "
1 | \n", "Apr 27, 2023 | \n", "33381.66 | \n", "33859.75 | \n", "33374.65 | \n", "33826.16 | \n", "33826.16 | \n", "343240000 | \n", "
2 | \n", "Apr 26, 2023 | \n", "33596.34 | \n", "33645.83 | \n", "33235.85 | \n", "33301.87 | \n", "33301.87 | \n", "321170000 | \n", "
3 | \n", "Apr 25, 2023 | \n", "33828.34 | \n", "33875.49 | \n", "33525.39 | \n", "33530.83 | \n", "33530.83 | \n", "297880000 | \n", "
4 | \n", "Apr 24, 2023 | \n", "33805.04 | \n", "33891.15 | \n", "33726.09 | \n", "33875.40 | \n", "33875.40 | \n", "252020000 | \n", "
LinearRegression()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
LinearRegression()
DecisionTreeRegressor()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
DecisionTreeRegressor()
RandomForestRegressor(random_state=42)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
RandomForestRegressor(random_state=42)
KNeighborsRegressor()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
KNeighborsRegressor()
SVR()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
SVR()