def test_predict_2():
 tpot_obj = TPOTClassifier()
 tpot_obj._optimized_pipeline = creator.Individual.from_string('DecisionTreeClassifier(input_matrix)', tpot_obj._pset)
 tpot_obj._fitted_pipeline = tpot_obj._toolbox.compile(expr=tpot_obj._optimized_pipeline)
 tpot_obj._fitted_pipeline.fit(training_features, training_classes)
 result = tpot_obj.predict(testing_features)
 assert (result.shape == (testing_features.shape[0],))

def test_predict_2 ( ) : tpot_obj = TPOTClassifier ( ) tpot_obj . _optimized_pipeline = creator . Individual . from_string ( 'DecisionTreeClassifier(input_matrix)' , tpot_obj . _pset ) tpot_obj . _fitted_pipeline = tpot_obj . _toolbox . compile ( expr = tpot_obj . _optimized_pipeline ) tpot_obj . _fitted_pipeline . fit ( training_features , training_classes ) result = tpot_obj . predict ( testing_features ) assert ( result . shape == ( testing_features . shape [ 0 ] , ) )
assert that the tpot predict function returns a numpy matrix of shape .