0% found this document useful (0 votes)
53 views8 pages

EXAM PREPERATION - Ipynb - Colaboratory-1

The document loads the iris dataset and performs data preprocessing including feature extraction, splitting into training and test sets, normalization, and dimensionality reduction using PCA. It then fits a linear regression model to the training data and makes predictions on the test set.

Uploaded by

Vking
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)
53 views8 pages

EXAM PREPERATION - Ipynb - Colaboratory-1

The document loads the iris dataset and performs data preprocessing including feature extraction, splitting into training and test sets, normalization, and dimensionality reduction using PCA. It then fits a linear regression model to the training data and makes predictions on the test set.

Uploaded by

Vking
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/ 8

2/11/23, 6:35 PM EXAM PREPERATION.

ipynb - Colaboratory

import pandas as pd
from sklearn.datasets import load_iris

iris = load_iris()

df = pd.DataFrame(data= iris["data"], columns = iris["feature_names"])

df

sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)

0 5.1 3.5 1.4 0.2

1 4.9 3.0 1.4 0.2

2 4.7 3.2 1.3 0.2

3 4.6 3.1 1.5 0.2

4 5.0 3.6 1.4 0.2

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

145 6.7 3.0 5.2 2.3

146 6.3 2.5 5.0 1.9

147 6.5 3.0 5.2 2.0

148 6.2 3.4 5.4 2.3

149 5.9 3.0 5.1 1.8

150 rows × 4 columns

df["target"] = iris['target']
X = df.drop("target",axis = 1)
Y = df["target"]

from sklearn.model_selection import train_test_split
xtrain, xtest, ytrain, ytest = train_test_split(X,Y, test_size = 0.2)

df.head(10) #first 10 rows

sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)

0 5.1 3.5 1.4 0.2

1 4.9 3.0 1.4 0.2

2 4.7 3.2 1.3 0.2

3 4.6 3.1 1.5 0.2

4 5.0 3.6 1.4 0.2

5 5.4 3.9 1.7 0.4

6 4.6 3.4 1.4 0.3

7 5.0 3.4 1.5 0.2

8 4.4 2.9 1.4 0.2

9 4.9 3.1 1.5 0.1

df.tail(10) #last 10 rows

https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 1/8
2/11/23, 6:35 PM EXAM PREPERATION.ipynb - Colaboratory

sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)

140 6.7 3.1 5.6 2.4


df.shape
141 6.9 3.1 5.1 2.3
(150, 4)
142 5.8 2.7 5.1 1.9

143 6.8
df.iloc[2:10] # 2nd to 10th row 3.2 5.9 2.3

144 6.7 3.3 5.7 2.5


sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)
145 6.7 3.0 5.2 2.3
2 4.7 3.2 1.3 0.2
146 6.3 2.5 5.0 1.9
3 4.6 3.1 1.5 0.2
147 6.5 3.0 5.2 2.0
4 5.0 3.6 1.4 0.2
148 6.2 3.4 5.4 2.3
5 5.4 3.9 1.7 0.4
149 5.9 3.0 5.1 1.8
6 4.6 3.4 1.4 0.3

7 5.0 3.4 1.5 0.2

8 4.4 2.9 1.4 0.2

9 4.9 3.1 1.5 0.1

df

sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)

0 5.1 3.5 1.4 0.2

1 4.9 3.0 1.4 0.2

2 4.7 3.2 1.3 0.2

3 4.6 3.1 1.5 0.2

4 5.0 3.6 1.4 0.2

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

145 6.7 3.0 5.2 2.3

146 6.3 2.5 5.0 1.9

147 6.5 3.0 5.2 2.0

148 6.2 3.4 5.4 2.3

149 5.9 3.0 5.1 1.8

150 rows × 4 columns

df.dropna(axis=1) # dropping null columns

sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)

0 5.1 3.5 1.4 0.2

1 4.9 3.0 1.4 0.2

2 4.7 3.2 1.3 0.2

3 4.6 3.1 1.5 0.2

4 5.0 3.6 1.4 0.2

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

145 6.7 3.0 5.2 2.3

146 6.3 2.5 5.0 1.9

147 6.5 3.0 5.2 2.0

148 6.2 3.4 5.4 2.3

149 5.9 3.0 5.1 1.8

150 rows × 4 columns

df_new = (df-df.mean())/df.std()
df_new

https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 2/8
2/11/23, 6:35 PM EXAM PREPERATION.ipynb - Colaboratory

sepal length (cm) sepal width (cm) petal length (cm) petal width (cm)

0 -0.897674 1.015602 -1.335752 -1.311052

1 -1.139200 -0.131539 -1.335752 -1.311052

2 -1.380727 0.327318 -1.392399 -1.311052

3 -1.501490 0.097889 -1.279104 -1.311052

4 -1.018437 1.245030 -1.335752 -1.311052

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

145 1.034539 -0.131539 0.816859 1.443994

146 0.551486 -1.278680 0.703564 0.919223

147 0.793012 -0.131539 0.816859 1.050416

148 0.430722 0.786174 0.930154 1.443994

149 0.068433 -0.131539 0.760211 0.788031

PCA
150 rows × 4 columns

x = df.drop("target", axis=1)

from sklearn.decomposition import PCA
clf = PCA(n_components = 2)
xpca = clf.fit_transform(x)

import matplotlib.pyplot as plt
plt.scatter(xpca[:,0], xpca[:,1])

<matplotlib.collections.PathCollection at 0x7fae3a482970>

Linear Regression

from sklearn.linear_model import LinearRegression

clf = LinearRegression()
clf.fit(xtrain,ytrain)

LinearRegression()

y_pred = clf.predict(xtest)
y_pred

array([ 1.17125553e+00, 1.96280120e+00, -1.34426285e-01, 1.64594772e+00,


1.29727330e+00, 1.85384157e+00, 1.47702914e+00, 1.31997199e+00,
6.75834658e-04, -1.12057071e-01, -4.81124335e-02, 1.06341791e+00,
1.07555431e+00, 2.64415670e-02, 1.05898292e-01, -1.23180472e-01,
-3.04388821e-02, -1.06013316e-01, -2.25839636e-02, 5.92714875e-02,
2.09836104e+00, 3.91042847e-03, 1.23001873e+00, 1.28872180e+00,
2.18141947e+00, -5.21510251e-02, 1.30438456e+00, 1.90548226e+00,
1.84494158e+00, 1.69600043e-01])

Polynomial Regression

from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures

clf = LinearRegression()

https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 3/8
2/11/23, 6:35 PM EXAM PREPERATION.ipynb - Colaboratory

pclf = PolynomialFeatures(degree = 2)
x_poly = pclf.fit_transform(x)

clf.fit(x_poly,Y)

LinearRegression()

y_pred = clf.predict(x_poly)
y_pred

array([-1.42342824e-02, -7.58926545e-03, -1.98050989e-02, 4.20298294e-03,


-3.75105758e-02, 3.34935246e-02, -5.96591736e-02, -4.49974300e-03,
2.60239261e-02, -1.78523090e-02, 1.72480466e-02, -2.21664479e-02,
-3.03629998e-02, -5.98244152e-02, 2.58542797e-02, 2.76341872e-02,
2.25362928e-02, 7.32058400e-03, 6.92285263e-02, -4.10452220e-02,
2.33480768e-02, -7.94779288e-04, -1.41763356e-01, 1.23616694e-01,
1.49277224e-02, 9.26391723e-03, 5.38662118e-02, 2.80530050e-03,
-1.44648602e-02, 4.49900828e-03, 2.58605131e-02, 4.28512088e-02,
-5.08615999e-02, 1.20774306e-02, 8.55535704e-03, -3.29714804e-02,
-4.68911424e-02, -6.31977660e-02, -3.67208300e-03, 4.22766079e-04,
-6.22316092e-03, 1.17384398e-01, -6.63643160e-02, 1.09870732e-01,
-1.97881841e-02, 5.12565852e-02, -3.37630312e-02, -2.53348681e-02,
8.85381981e-03, -1.08431890e-02, 9.79743113e-01, 1.12562999e+00,
1.16053702e+00, 1.24387026e+00, 1.16918185e+00, 1.23708860e+00,
1.22495479e+00, 9.19708435e-01, 1.02104106e+00, 1.19149374e+00,
1.05780354e+00, 1.15709922e+00, 7.11413922e-01, 1.28290211e+00,
9.39735796e-01, 9.44306995e-01, 1.23070168e+00, 9.43324164e-01,
1.25638958e+00, 9.82854539e-01, 1.38882891e+00, 9.49472754e-01,
1.41758274e+00, 1.22733771e+00, 9.56775032e-01, 9.78477581e-01,
1.05293486e+00, 1.39766677e+00, 1.27354997e+00, 7.19774582e-01,
9.90945051e-01, 8.82014508e-01, 9.58301275e-01, 1.64527246e+00,
1.19386870e+00, 1.09127049e+00, 1.13849116e+00, 9.65787146e-01,
1.01810275e+00, 1.19334806e+00, 1.24368187e+00, 1.21397200e+00,
1.00718760e+00, 9.32248982e-01, 1.17376516e+00, 1.00891643e+00,
1.09011904e+00, 1.03216405e+00, 8.79916280e-01, 1.09226133e+00,
2.16649713e+00, 1.88949013e+00, 1.96174871e+00, 1.85939568e+00,
2.13500562e+00, 2.17456914e+00, 1.67775504e+00, 1.98851717e+00,
1.93971885e+00, 2.07543058e+00, 1.63574251e+00, 1.84699215e+00,
1.87981927e+00, 2.11209211e+00, 2.37719967e+00, 1.95748882e+00,
1.74488435e+00, 2.13490605e+00, 2.41784861e+00, 1.64337986e+00,
2.02548898e+00, 1.85791749e+00, 2.11842508e+00, 1.63231872e+00,
1.84343360e+00, 1.82082266e+00, 1.59699755e+00, 1.55448299e+00,
2.10189476e+00, 1.62184207e+00, 1.80176912e+00, 1.90197250e+00,
2.19649751e+00, 1.49724261e+00, 1.85214247e+00, 1.91149190e+00,
1.90858335e+00, 1.71379594e+00, 1.52979080e+00, 1.77946729e+00,
2.17961303e+00, 1.88944932e+00, 1.88949013e+00, 2.10846492e+00,
2.17106840e+00, 2.01762547e+00, 1.82038383e+00, 1.75862474e+00,
1.76574733e+00, 1.60933958e+00])

SVM

from sklearn.svm import SVC

clf = SVC(kernel = 'rbf')

clf.fit(xtrain,ytrain)

SVC()

y_pred = clf.predict(xtest)
y_pred

array([0, 2, 2, 2, 2, 1, 1, 2, 1, 0, 2, 0, 0, 2, 0, 0, 2, 1, 1, 0, 0, 2,
0, 1, 1, 1, 2, 2, 1, 1])

from sklearn.metrics import accuracy_score
print(accuracy_score(y_pred,ytest))

from sklearn.metrics import mean_squared_error
print(mean_squared_error(y_pred,ytest))

from sklearn.metrics import confusion_matrix
print(confusion_matrix(y_pred,ytest))

from sklearn.metrics import precision_score
print(precision_score(y_pred,ytest, average=None))

1.0
0.0
[[ 9 0 0]

https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 4/8
2/11/23, 6:35 PM EXAM PREPERATION.ipynb - Colaboratory
[ 0 10 0]
[ 0 0 11]]
[1. 1. 1.]

clf.support_vectors_

array([[4.5, 2.3, 1.3, 0.3],


[5. , 3. , 1.6, 0.2],
[5.7, 3.8, 1.7, 0.3],
[5.1, 3.3, 1.7, 0.5],
[4.8, 3.4, 1.9, 0.2],
[6.7, 3.1, 4.4, 1.4],
[6.8, 2.8, 4.8, 1.4],
[5.7, 2.6, 3.5, 1. ],
[6.3, 3.3, 4.7, 1.6],
[6.3, 2.5, 4.9, 1.5],
[6.4, 2.9, 4.3, 1.3],
[6. , 3.4, 4.5, 1.6],
[5.6, 2.9, 3.6, 1.3],
[5.9, 3.2, 4.8, 1.8],
[6.7, 3. , 5. , 1.7],
[5.6, 3. , 4.5, 1.5],
[5. , 2.3, 3.3, 1. ],
[5.5, 2.6, 4.4, 1.2],
[6. , 2.7, 5.1, 1.6],
[5.7, 2.8, 4.5, 1.3],
[6.1, 2.8, 4.7, 1.2],
[6.1, 3. , 4.6, 1.4],
[5.1, 2.5, 3. , 1.1],
[6.5, 2.8, 4.6, 1.5],
[4.9, 2.4, 3.3, 1. ],
[6.3, 2.3, 4.4, 1.3],
[5.4, 3. , 4.5, 1.5],
[6.4, 3.2, 4.5, 1.5],
[6.2, 2.9, 4.3, 1.3],
[6.9, 3.1, 5.1, 2.3],
[7.9, 3.8, 6.4, 2. ],
[6.1, 2.6, 5.6, 1.4],
[5.9, 3. , 5.1, 1.8],
[6.4, 2.7, 5.3, 1.9],
[6.3, 2.8, 5.1, 1.5],
[6.5, 3. , 5.2, 2. ],
[6.3, 2.7, 4.9, 1.8],
[6. , 3. , 4.8, 1.8],
[5.6, 2.8, 4.9, 2. ],
[6.4, 3.1, 5.5, 1.8],
[6.1, 3. , 4.9, 1.8],
[5.7, 2.5, 5. , 2. ],
[6.7, 3. , 5.2, 2.3],
[6.2, 2.8, 4.8, 1.8],
[6. , 2.2, 5. , 1.5],
[6.3, 2.5, 5. , 1.9],
[7.2, 3. , 5.8, 1.6],
[6.2, 3.4, 5.4, 2.3],
[4.9, 2.5, 4.5, 1.7]])

MLP

from sklearn.neural_network import MLPClassifier

clf = MLPClassifier(hidden_layer_sizes = (3,5), activation = "tanh", alpha = 0.2, solver = "adam", max_iter = 350)
clf.fit(xtrain,ytrain)
clf.predict(xtest)

/usr/local/lib/python3.8/dist-packages/sklearn/neural_network/_multilayer_perceptron.py:692: ConvergenceWarning: Stochastic Optimiz


warnings.warn(
array([0, 2, 2, 2, 2, 1, 1, 2, 2, 0, 2, 0, 0, 2, 0, 0, 2, 1, 2, 0, 0, 2,
0, 2, 1, 1, 2, 2, 1, 2])

clf.coefs_

[array([[ 0.57804251, 0.36355105, -0.23764739],


[ 0.77068372, 0.27932595, -0.33643901],
[-0.68492914, -0.07206882, 0.73437234],
[ 0.5274417 , -0.22170834, 0.0084717 ]]),
array([[ 0.62675341, -0.44929193, 0.58452399, -0.44751084, 0.56299975],
[-0.72597545, 0.64223031, -0.1636017 , 0.86675523, -0.17313968],
[-0.7320272 , -0.40554543, -0.38910261, 1.20232077, 0.72709332]]),
array([[ 0.11271487, 0.09051555, -0.96664843],
[ 0.81822532, 0.27262803, 0.60755223],
[ 0.0918632 , -0.09751246, 0.48887883],
[-0.39470316, 0.14747626, 1.00920895],
[-0.80209886, -0.3906084 , 0.91543481]])]

https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 5/8
2/11/23, 6:35 PM EXAM PREPERATION.ipynb - Colaboratory

KMeans

from sklearn.cluster import KMeans
clf = KMeans(n_clusters = 3, init='random', n_init=10, max_iter=350, tol=1e-04)
clf.fit(X)

KMeans(init='random', max_iter=350, n_clusters=3)

ypred = clf.predict(X)
ypred

array([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1], dtype=int32)

ID3

from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier(criterion = "gini", max_depth = 2)

clf.fit(X,Y)

DecisionTreeClassifier(max_depth=2)

y_pred =clf.predict(X)
y_pred

array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2,
2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])

from sklearn import tree 
plt.figure(figsize = (30,10), facecolor = "w")
tree.plot_tree(clf)

https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 6/8
2/11/23, 6:35 PM EXAM PREPERATION.ipynb - Colaboratory

[Text(0.4, 0.8333333333333334, 'X[2] <= 2.45\ngini = 0.667\nsamples = 150\nvalue = [50, 50, 50]'),
Text(0.2, 0.5, 'gini = 0.0\nsamples = 50\nvalue = [50, 0, 0]'),
Text(0.6, 0.5, 'X[3] <= 1.75\ngini = 0.5\nsamples = 100\nvalue = [0, 50, 50]'),
Text(0.4, 0.16666666666666666, 'gini = 0.168\nsamples = 54\nvalue = [0, 49, 5]'),
Text(0.8, 0.16666666666666666, 'gini = 0.043\nsamples = 46\nvalue = [0, 1, 45]')]
gini = DecisionTreeClassifier(criterion = "gini", max_depth = 2)
gini.fit(X,Y)
print(gini)

DecisionTreeClassifier(max_depth=2)

NAIVE NAYES

from sklearn.naive_bayes import GaussianNB
clf = GaussianNB()
clf.fit(X,Y)

y_pred = clf.predict(X)
y_pred

array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])

clf.predict_proba(X)

array([[1.00000000e+000, 1.35784265e-018, 7.11283512e-026],


[1.00000000e+000, 1.51480769e-017, 2.34820051e-025],
[1.00000000e+000, 1.07304179e-018, 2.34026774e-026],
[1.00000000e+000, 1.46619543e-017, 2.95492722e-025],
[1.00000000e+000, 4.53291917e-019, 2.88389975e-026],
[1.00000000e+000, 1.49094245e-014, 1.75752068e-021],
[1.00000000e+000, 1.10262691e-017, 2.71144689e-025],
[1.00000000e+000, 6.53644612e-018, 2.77336308e-025],
[1.00000000e+000, 9.42227052e-018, 1.20443161e-025],
[1.00000000e+000, 3.42348334e-018, 1.20750647e-025],
[1.00000000e+000, 4.38090482e-018, 5.06830427e-025],
[1.00000000e+000, 1.65766943e-017, 7.24748728e-025],
[1.00000000e+000, 1.27573119e-018, 3.28718898e-026],
[1.00000000e+000, 7.73742183e-020, 1.86207920e-027],
[1.00000000e+000, 2.43526387e-019, 8.23627924e-026],
[1.00000000e+000, 3.04074398e-017, 1.66211400e-023],
[1.00000000e+000, 5.42610885e-017, 4.60661360e-024],
[1.00000000e+000, 2.33427918e-017, 8.15420956e-025],
[1.00000000e+000, 6.06809097e-015, 1.02748629e-021],
[1.00000000e+000, 8.54558679e-018, 6.78962703e-025],
[1.00000000e+000, 1.13506227e-015, 7.65275253e-023],
[1.00000000e+000, 6.22989337e-016, 2.90267936e-023],
[1.00000000e+000, 1.89645477e-020, 9.48817058e-028],
[1.00000000e+000, 1.99398085e-011, 3.68049199e-019],
[1.00000000e+000, 1.00058879e-014, 6.15534153e-022],
[1.00000000e+000, 3.49841784e-016, 6.62285086e-024],
[1.00000000e+000, 1.75721873e-014, 4.10706738e-022],
[1.00000000e+000, 7.26529230e-018, 4.36708593e-025],
[1.00000000e+000, 4.11331036e-018, 1.80735687e-025],
[1.00000000e+000, 4.67240237e-017, 1.27884939e-024],
[1.00000000e+000, 1.07710163e-016, 2.38609460e-024],
[1.00000000e+000, 2.17820325e-014, 6.12672716e-022],
[1.00000000e+000, 6.58781348e-021, 3.14606961e-027],
[1.00000000e+000, 3.04886902e-020, 1.36260578e-026],
[1.00000000e+000, 3.04840351e-017, 6.32348452e-025],
[1.00000000e+000, 1.29727473e-018, 2.87999446e-026],
[1.00000000e+000, 3.59748108e-018, 2.45102343e-025],
[1.00000000e+000, 3.65380825e-020, 3.81384200e-027],
[1.00000000e+000, 2.11976920e-018, 3.13900962e-026],
[1.00000000e+000, 9.51488554e-018, 4.23900719e-025],
[1.00000000e+000, 6.10454787e-018, 1.90690879e-025],
[1.00000000e+000, 8.16634024e-016, 2.02011747e-024],
[1.00000000e+000, 6.71335191e-019, 1.53850038e-026],
[1.00000000e+000, 6.99329490e-011, 1.72796105e-018],
[1.00000000e+000, 8.06641165e-013, 7.44897611e-020],
[1.00000000e+000, 1.95284044e-016, 1.97347120e-024],
[1.00000000e+000, 2.34216163e-018, 3.04846703e-025],
[1.00000000e+000, 2.30742580e-018, 5.37811977e-026],
[1.00000000e+000, 2.63876217e-018, 2.79566024e-025],
[1.00000000e+000, 3.58192707e-018, 1.11709612e-025],
[3.21380935e-109, 8.04037666e-001, 1.95962334e-001],
[7.27347795e-102, 9.45169639e-001, 5.48303606e-002],
[1.87142859e-123, 4.56151317e-001, 5.43848683e-001],
[4.26269818e-071, 9.99968751e-001, 3.12488556e-005],
https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 7/8
2/11/23, 6:35 PM EXAM PREPERATION.ipynb - Colaboratory
[1.03323094e-107, 9.52441811e-001, 4.75581888e-002],
[2.87936711e-091, 9.99119627e-001, 8.80372566e-004],
[2.24730551e-115, 6.58952285e-001, 3.41047715e-001],
[5.06775312e-035, 9.99999767e-001, 2.33206910e-007],

Colab paid products Cancel contracts here


check 0s completed at 6:35 PM

https://colab.research.google.com/drive/1smr2_t_MByiPbkNBxCulik3p9TtsJTk-#scrollTo=0f6R1Zt8lAOV 8/8

You might also like