supervised-learning

Batch 512 in TFRecordDataset does not work on Unsupervised model

Batch 512 in TFRecordDataset does not work on Unsupervised model Question: I’m using Mnist dataset for testing the Unsupervised model. The dataset and output: test_dataset = tf.data.TFRecordDataset([test_filenames]) test_dataset = test_dataset.map(map_func) test_dataset = test_dataset.batch(512) print("test_dataset.map.element_spec: {}".format(test_dataset.element_spec)) test_dataset.map.element_spec: (TensorSpec(shape=(None, 28, 28), dtype=tf.float32, name=None), TensorSpec(shape=(None, 1), dtype=tf.uint8, name=None)) The first non-unsupervised model is copied from here: https://www.tensorflow.org/tutorials/keras/classification model …

Total answers: 1

What is the difference between X_test, X_train, y_test, y_train in sklearn?

What is the difference between X_test, X_train, y_test, y_train in sklearn? Question: I’m learning sklearn and I didn’t understand very good the difference and why use 4 outputs with the function train_test_split(). In the Documentation, I found some examples but it wasn’t sufficient to end my doubts. Does the code use the X_train to predict …

Total answers: 4

How to compute precision,recall and f1 score of an imbalanced dataset for K fold cross validation?

How to compute precision,recall and f1 score of an imbalanced dataset for K fold cross validation? Question: I have an imbalanced dataset containing a binary classification problem. I have built Random Forest Classifier and used k-fold cross-validation with 10 folds. kfold = model_selection.KFold(n_splits=10, random_state=42) model=RandomForestClassifier(n_estimators=50) I got the results of the 10 folds results = …

Total answers: 2