Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RohitR_190121042_Week 8 #355

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
759 changes: 759 additions & 0 deletions AnomalyDetectionAndRecommenderSystems.ipynb

Large diffs are not rendered by default.

666 changes: 666 additions & 0 deletions IntroToNeuralNetworks.ipynb

Large diffs are not rendered by default.

484 changes: 484 additions & 0 deletions LogisticRegression.ipynb

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions edit_assignment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import pandas as pd

from matplotlib import pyplot as plt

df=pd.read_csv('data.txt',delimiter='\t')

plt.rcParams['figure.figsize']=(20,10)

fig,ax=plt.subplots(nrows=5,ncols=9)

r=c=0

list=[[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[1,0],[1,1],[1,2],[1,3],[1,4],[1,5],[1,6],[1,7],[1,8],[2,0],[2,1],[2,2],[2,3],[2,4],[2,5],[2,6],[2,7],[2,8],[3,0],[3,1],[3,2],[3,3],[3,4],[3,5],[3,6],[3,7],[3,8],[4,0],[4,1],[4,2],[4,3],[4,4],[4,5],[4,6],[4,7],[4,8]]

flag=-1

for i in range(1,10):
for j in range(i+1,11):
flag=flag+1
r=list[flag][0]
c=list[flag][1]
for k in range(999):
if df['Label'][k]==1:
ax[r][c].scatter(df[str(i)][k],df[str(j)][k],color='r')
elif df['Label'][k]==2:
ax[r][c].scatter(df[str(i)][k],df[str(j)][k],color='b')

ax[r][c].set_xlabel('feature '+str(i))
ax[r][c].set_ylabel('feature '+str(j))
ax[0][4].set_title('My Plot')

# print(plt.rcParams['figure.figsize'])
plt.show()
456 changes: 456 additions & 0 deletions gradientdescentMulti.ipynb

Large diffs are not rendered by default.

388 changes: 388 additions & 0 deletions gradientdescentSingle.ipynb

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions introduction_to_matrix.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# used for manipulating directory paths\n",
"import os\n",
"\n",
"# Scientific and vector computation for python\n",
"import numpy as np\n",
"\n",
"# Plotting library\n",
"from matplotlib import pyplot\n",
"from mpl_toolkits.mplot3d import Axes3D # needed to plot 3-D surfaces\n",
"\n",
"# library written for this exercise providing additional functions for assignment submission, and others\n",
"import utils \n",
"\n",
"# define the submission/grader object for this exercise\n",
"grader = utils.Grader()\n",
"\n",
"# tells matplotlib to embed plots within the notebook\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"def warmUpExercise():\n",
" \"\"\"\n",
" Example function in Python which computes the identity matrix.\n",
" \n",
" Returns\n",
" -------\n",
" A : array_like\n",
" The 5x5 identity matrix.\n",
" \n",
" Instructions\n",
" ------------\n",
" Return the 5x5 identity matrix.\n",
" \"\"\" \n",
" # ======== YOUR CODE HERE ======\n",
" A = [] # modify this line\n",
" A=np.eye(5)\n",
" \n",
" # ==============================\n",
" return A"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[1., 0., 0., 0., 0.],\n",
" [0., 1., 0., 0., 0.],\n",
" [0., 0., 1., 0., 0.],\n",
" [0., 0., 0., 1., 0.],\n",
" [0., 0., 0., 0., 1.]])"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"warmUpExercise()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
136 changes: 136 additions & 0 deletions plotData.ipynb

Large diffs are not rendered by default.

440 changes: 440 additions & 0 deletions regularisedLogisticRegression.ipynb

Large diffs are not rendered by default.