Skip to content

Instantly share code, notes, and snippets.

View tharunpeddisetty's full-sized avatar

Tharun Peddisetty tharunpeddisetty

View GitHub Profile
@tharunpeddisetty
tharunpeddisetty / Model-SVR.py
Created August 22, 2020 02:06
Implementing Support Vector Regression
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('/Users/tharunpeddisetty/Position_Salaries.csv')
X = dataset.iloc[:,1:-1].values
y = dataset.iloc[:, -1].values
@tharunpeddisetty
tharunpeddisetty / Model-RandomForestRegression.py
Last active August 22, 2020 02:08
Implementing Radom forest regression in Python
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('/Users/tharunpeddisetty/Desktop/Python/Position_Salaries.csv')
X = dataset.iloc[:,1:-1].values
y = dataset.iloc[:, -1].values
@tharunpeddisetty
tharunpeddisetty / DecisionTree.py
Last active July 21, 2020 05:21
Implementing Decision tree regression.
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('/Users/tharunpeddisetty/Desktop/Position_Salaries.csv') #copy you file path
X = dataset.iloc[:,1:-1].values
y = dataset.iloc[:, -1].values
@tharunpeddisetty
tharunpeddisetty / PolynomialLinearRegression.py
Last active May 26, 2021 07:16
Implementing Polynomial Regression for predicting the salaries of the employees based on their seniority level
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('/Users/tharunpeddisetty/Desktop/Position_Salaries.csv') #Add your file path
X = dataset.iloc[:,1:-1].values
y = dataset.iloc[:, -1].values
@tharunpeddisetty
tharunpeddisetty / MultipleLinearRegression.py
Last active July 4, 2020 02:44
Predicting Player Goals using Multiple Linear Regression Using Python
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_csv('/Users/tharunpeddisetty/Desktop/PlayerStatsBasketball.csv') #Please provided your file path
X = dataset.iloc[:,:-1].values
@tharunpeddisetty
tharunpeddisetty / LinearRegression.py
Last active June 27, 2020 17:25
Baby Steps Towards Data Science: Linear Regression
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import statsmodels.api as sm
#Do not forget to change your file path. I haven't changed mine for your reference
dataset = pd.read_csv('/Users/tharunpeddisetty/Desktop/Machine Learning/Python/Salary_Data.csv')
@tharunpeddisetty
tharunpeddisetty / food_court.csv
Last active November 15, 2019 07:07
Upload Food Court CSV Data using D3
Item_Id Category Menu_Item Store_Name Price Sales_Qty Gross_Sales Item_Disc Net_Sales
10004 cold beverages Dr. Pepper Grab n go 1.85 242 447.7 0 447.7
10006 cold beverages Snapple 16 oz Grab n go 1.75 316 553 0 553
10009 cold beverages Deja Blue Grab n go 1.75 2 3.5 0 3.5
10011 cold beverages Pepsi Grab n go 1.85 104 192.4 0 192.4
10013 cold beverages Muscle Milk Grab n go 4.09 12 49.08 0 49.08
10014 cold beverages Powerade Grab n go 2.15 172 369.8 0 369.8
10016 cold beverages Coca Cola Grab n go 1.85 567 1048.95 0 1048.95
10018 cold beverages Gold Peak Tea Food Court 2.15 881 1894.15 0 1894.15
10018 cold beverages Gold Peak Tea Grab n go 2.15 246 528.9 0 528.9