collected = transformed_df.collect()
for row in collected:
predictions = row[output_col]
self.assertEqual(len(predictions), self.appModel.numOutputFeatures())
// TODO: actually check the value of the output to see if they are reasonable
// e.g. -- compare to just running with keras.
def test_featurizer_in_pipeline(self):
After Change
// Note: keras features may be multi-dimensional np arrays, but transformer features
// will be 1-d vectors. Regardless, the dimensions should add up to the same.
self.assertEqual(np.prod(self.kerasFeatures.shape), np.prod(features.shape))
kerasReshaped = self.kerasFeatures.reshape(self.kerasFeatures.shape[0], -1)
np.testing.assert_array_almost_equal(kerasReshaped, features, decimal=6)
def test_featurizer_in_pipeline(self):