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 required libraries | |
import tensorflow as tf | |
from keras.datasets import mnist | |
#Creating the MNIST Dataset | |
(x_train, y_train), (x_test, y_test) = mnist.load_data() | |
x_train, x_test= x_train/255.0, x_test/255.0 | |
x_train=x_train[...,tf.newaxis].astype('float32') | |
x_test=x_test[...,tf.newaxis].astype('float32') |
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 import datasets | |
from sklearn.semi_supervised import LabelPropagation | |
from sklearn.metrics import confusion_matrix, classification_report | |
import numpy as np | |
rnd = np.random.RandomState(42) | |
# load the cancer dataset | |
cancer = datasets.load_breast_cancer() | |
# Randomly unlabel some records in the dataset |
NewerOlder