You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
My model is predicting same value for all the features.
I am trying to predict the color of images.
I have a dataframe or I created a dataframe with 12,000 thousand images. schema of the dataframe is.
Clear the dataset in the case you ran this cell before.
Allocate a MinMaxTransformer using Distributed Keras.
o_min -> original_minimum
n_min -> new_minimum
Transform the dataset.
Assing the training and test set.
Cache them.
trainer = DOWNPOUR(keras_model=mlp, worker_optimizer=optimizer_mlp, loss=loss_mlp, num_workers=1,
batch_size=32, communication_window=32, num_epoch=5,
features_col="features_normalized_dense", label_col="label_encoded")
trained_model = trainer.train(training_set)
Training time: 235.8617208
print("Accuracy: " + str(evaluate_accuracy(trained_model, test_set)))
Accuracy: 0.248927038627
evaluator = AccuracyEvaluator(prediction_col="prediction_index", label_col="label")
predictor = ModelPredictor(keras_model=trained_model, features_col="features_normalized_dense")
transformer = LabelIndexTransformer(output_dim=nb_classes)
test_set = test_set.select("features_normalized_dense", "label")
test_set = predictor.predict(test_set)
+-----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|label|prediction |
+-----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|8 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|0 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|7 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|4 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|0 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|6 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|10 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|1 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|0 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|3 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|2 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|10 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|7 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|3 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|0 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|0 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|2 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|0 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|1 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
|0 |[0.14784927666187286,0.19311276078224182,0.08476026356220245,0.1478438526391983,0.05868959426879883,0.06460657715797424,0.04356149211525917,0.06898588687181473,0.0791180431842804,0.04349109157919884,0.06798115372657776]|
+-----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
The text was updated successfully, but these errors were encountered: