Skip to content

Commit

Permalink
Merge pull request #1 from urbanmatthias/feature/example_fix
Browse files Browse the repository at this point in the history
fixed README
  • Loading branch information
mlindauer authored Jan 11, 2019
2 parents 9e25a3b + be800e0 commit 5672e9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ X_train, X_test, y_train, y_test = \
sklearn.model_selection.train_test_split(X, y, random_state=1)

# running Auto-PyTorch
autoPyTorch = AutoNetClassification(log_level='info')
autoPyTorch.fit(X_train, y_train)
autoPyTorch = AutoNetClassification(log_level='info', max_runtime=300, min_budget=30, max_budget=90)
autoPyTorch.fit(X_train, y_train, validation_split=0.3)
y_pred = autoPyTorch.predict(X_test)

print("Accuracy score", sklearn.metrics.accuracy_score(y_test, y_pred))
Expand Down
2 changes: 1 addition & 1 deletion autoPyTorch/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def predict(self, X, return_probabilities=False):

# reverse one hot encoding
OHE = self.pipeline[OneHotEncoding.get_name()]
result = OHE.reverse_transform_y(Y_pred, OHE.fit_output['y_one_hot_encoder']).reshape(1, -1)
result = OHE.reverse_transform_y(Y_pred, OHE.fit_output['y_one_hot_encoder'])
return result if not return_probabilities else (result, Y_pred)

def score(self, X_test, Y_test):
Expand Down

0 comments on commit 5672e9a

Please sign in to comment.