This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| X_train = X_train.reshape(-1, 28*28) | |
| X_test = X_test.reshape(-1, 28*28) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| X_train = X_train/255.0 | |
| X_test = X_test/255.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (X_train, y_train), (X_test, y_test) = fashion_mnist.load_data() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| from tensorflow.keras.datasets import fashion_mnist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Scaffold{ | |
| appBar: AppBar() | |
| body: Container( | |
| child: Column( | |
| children: [ | |
| Row( | |
| Text(), | |
| Icon(), | |
| ), /row | |
| Text() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.metrics import confusion_matrix | |
| cm = confusion_matrix(y_test, y_pred) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.neighbors import KNeighborsClassifier | |
| classifier = KNeighborsClassifier(n_neighbors = 5, metric = 'minkowski', p = 2) | |
| classifier.fit(X_train, y_train) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dataset = pd.read_csv('Sales.csv') | |
| X = dataset.iloc[:, [2, 3]].values | |
| y = dataset.iloc[:, 4].values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.preprocessing import PolynomialFeatures | |
| poly_reg = PolynomialFeatures(degree = 4) | |
| X_poly = poly_reg.fit_transform(X) | |
| lin_reg_2 = LinearRegression() | |
| lin_reg_2.fit(X_poly, Y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.preprocessing import PolynomialFeatures | |
| poly_reg = PolynomialFeatures(degree = 4) | |
| X_poly = poly_reg.fit_transform(X) |