You are on page 1of 17

Output 1

runcell(0, 'C:/Users/vivek/OneDrive/Desktop/Informatics/ASSIGNMENT 1/ASS1 CODE.py')

enter number of rows:2

enter number of cols:3

enter elements of mat4

enter elements of mat6

enter elements of mat3

enter elements of mat8

enter elements of mat0

enter elements of mat7

[[4, 6, 3], [8, 0, 7]]

[[0, 7, 8], [3, 4, 6]]

OUTPUT 2
runfile('C:/Users/vivek/OneDrive/Desktop/Informatics/ASSIGNMENT 1/ASS1 CODE.py',
wdir='C:/Users/vivek/OneDrive/Desktop/Informatics/ASSIGNMENT 1')
Visualizing data:

X Y

0 20.178011 378.599412

1 8.390660 286.403910

2 73.122699 859.058798

3 71.400661 828.743412

4 88.820066 1078.009259

Error with initialized values = 3238.098

Warning

Figures now render in the Plots pane by default. To make them also appear inline in the Console,
uncheck "Mute Inline Plotting" under the Plots pane options menu.

Minimum error obtained after iteration: 1

Final (c, m) values:

Intercept (c) = 1,

Slope (m) = 1

Error with initialized values = 3238.098

Minimum error obtained after iteration: 1

Final (c, m) values:

Intercept (c) = 1,

Slope (m) = 1
Error with initialized values = 3238.098

Minimum error obtained after iteration: 50

Final (c, m) values:

Intercept (c) = 0.979,

Slope (m) = -0.005

Error with initialized values = 3238.098

Minimum error obtained after iteration: 50

Final (c, m) values:

Intercept (c) = 0.982,

Slope (m) = -0.005

Error with initialized values = 3238.098

Minimum error obtained after iteration: 50

Final (c, m) values:

Intercept (c) = 0.983,

Slope (m) = -0.005

Error with initialized values = 3238.098

Minimum error obtained after iteration: 50


Final (c, m) values:

Intercept (c) = 0.984,

Slope (m) = -0.005

Error with initialized values = 3238.098

Minimum error obtained after iteration: 50

Final (c, m) values:

Intercept (c) = 0.985,

Slope (m) = 0.0

Error with initialized values = 3238.098

Minimum error obtained after iteration: 50

Final (c, m) values:

Intercept (c) = 0.986,

Slope (m) = 0.076

Error with initialized values = 3238.098

Minimum error obtained after iteration: 50

Final (c, m) values:

Intercept (c) = 0.989,

Slope (m) = 0.285

Error with initialized values = 3238.098


Minimum error obtained after iteration: 50

Final (c, m) values:

Intercept (c) = 0.993,

Slope (m) = 0.537

[3238.0983604036483, 3238.0983604036483, 0.24641382793866826, 0.24804458879586083,


0.24886399852758673, 0.24927572013672958, 0.3545040127030101, 21.38091824851172,
270.4066137638818, 942.9058874296464]

Min error is 0.24641382793866826 at learning rate 0.00025


OUTPUT 3
runcell(0, 'C:/Users/vivek/OneDrive/Desktop/Informatics/ASSIGNMENT 1/ASS1 CODE.py')

Visualizing data:

alloy_name phases ... density_avg Tm_avg

0 Al0.10CoCrFeMnNi FCC ... 0.462889 0.420107

1 Al0.158CuMnNi FCC ... 0.480811 0.301953

2 Al0.20CoCrFeMnNi FCC ... 0.453454 0.413187

3 Al0.25CoCrCu0.75FeNiTi0.5 FCC ... 0.444323 0.412190

4 Al0.25CoCrFeNi FCC ... 0.459123 0.433793

.. ... ... ... ... ...

151 NbTaTiVW BCC ... 0.749459 0.837236

152 NbTaTiZr BCC ... 0.565330 0.734436

153 NbTaVW BCC ... 0.901158 0.924729

154 NbTiV0.3Zr BCC ... 0.328565 0.623483

155 NbTiVZr BCC ... 0.320578 0.617405

[156 rows x 6 columns]

alloy_name phases ... density_avg Tm_avg

0 Al0.10CoCrFeMnNi 1 ... 0.462889 0.420107

1 Al0.158CuMnNi 1 ... 0.480811 0.301953

2 Al0.20CoCrFeMnNi 1 ... 0.453454 0.413187

3 Al0.25CoCrCu0.75FeNiTi0.5 1 ... 0.444323 0.412190

4 Al0.25CoCrFeNi 1 ... 0.459123 0.433793

.. ... ... ... ... ...

151 NbTaTiVW 2 ... 0.749459 0.837236

152 NbTaTiZr 2 ... 0.565330 0.734436

153 NbTaVW 2 ... 0.901158 0.924729


154 NbTiV0.3Zr 2 ... 0.328565 0.623483

155 NbTiVZr 2 ... 0.320578 0.617405

[151 rows x 6 columns]

c:\users\vivek\onedrive\desktop\informatics\assignment 1\ass1 code.py:213: SettingWithCopyWarning:

A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation:


https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-
copy

newfile['phases'].replace({'FCC': 1, 'BCC': 2}, inplace=True)

c:\users\vivek\onedrive\desktop\informatics\assignment 1\ass1 code.py:270: FutureWarning: iteritems


is deprecated and will be removed in a future version. Use .items instead.

for idx, val in x.iteritems(): # for each datapoint

c:\users\vivek\onedrive\desktop\informatics\assignment 1\ass1 code.py:251: FutureWarning: iteritems


is deprecated and will be removed in a future version. Use .items instead.

for i, v in X.iteritems():

c:\users\vivek\onedrive\desktop\informatics\assignment 1\ass1 code.py:230: FutureWarning: iteritems


is deprecated and will be removed in a future version. Use .items instead.

for idx, v in y_true.iteritems():

w [0.36414667507339105, 0.36600054183680136, 0.3678461403587109, 0.3696835265195735,


0.37151275579882154, 0.3733338832761908, 0.3751469636331028, 0.37695205115410246,
0.37874919972834886, 0.3805384628511565,……………………………………………….. -0.942046520716574, -
0.9423824958568897, -0.9427181458833194, -0.9430534714083341, -0.9433884730427056, -
0.9437231513955197, -0.9440575070741731, -0.9443915406843858, -0.9447252528302037, -
0.9450586441140071]

No artists with labels found to put in legend. Note that artists whose label start with an underscore are
ignored when legend() is called with no argument.

Optimal value of w 0.9965632338819974

Optimal value of b 2.6361034831928953

You might also like