Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Initial changes
  • Loading branch information
Neeratyoy committed Oct 23, 2020
commit 0fb62302c35bf30c5016b5e0ad7d6cc8393fad9b
2 changes: 1 addition & 1 deletion examples/30_extended/create_upload_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
# The attribute that represents the row-id column, if present in the
# dataset.
row_id_attribute=None,
# Attribute or list of attributes that should be excluded in modelling, such as
# Attribute or list of attributes that should be excluded in modelling, such as
# identifiers and indexes. E.g. "feat1" or ["feat1","feat2"]
ignore_attribute=None,
# How to cite the paper.
Expand Down
3 changes: 1 addition & 2 deletions examples/30_extended/study_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import uuid

import numpy as np
import sklearn.tree
from sklearn.pipeline import make_pipeline, Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
Expand Down Expand Up @@ -71,7 +70,7 @@
)
print(evaluations.head())

###########################################################from openml.testing import cat, cont#################
############################################################################
# Uploading studies
# =================
#
Expand Down
5 changes: 3 additions & 2 deletions openml/extensions/sklearn/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -1581,8 +1581,8 @@ def _run_model_on_fold(
-------
pred_y : np.ndarray
Predictions on the training/test set, depending on the task type.
For supervised tasks, predicitons are on the test set.
For unsupervised tasks, predicitons are on the training set.
For supervised tasks, predictions are on the test set.
For unsupervised tasks, predictions are on the training set.
proba_y : pd.DataFrame
Predicted probabilities for the test set.
None, if task is not Classification or Learning Curve prediction.
Expand Down Expand Up @@ -1759,6 +1759,7 @@ def _prediction_to_probabilities(y: np.ndarray, model_classes: List[Any]) -> pd.
# adding missing columns with 0 probability
if col not in model_classes:
proba_y[col] = 0
# We re-order the columns to move possibly added missing columns into place.
proba_y = proba_y[task.class_labels]
else:
raise ValueError("The task has no class labels")
Expand Down