Skip to content
Open
Changes from all commits
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
14 changes: 7 additions & 7 deletions website/docs/Use-Cases/Task-Oriented-AutoML.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ The optimization metric is specified via the `metric` argument. It can be either

```python
def custom_metric(
X_val,
y_val,
X_test,
y_test,
estimator,
labels,
X_train,
Expand All @@ -93,8 +93,8 @@ For example,

```python
def custom_metric(
X_val,
y_val,
X_test,
y_test,
estimator,
labels,
X_train,
Expand All @@ -107,9 +107,9 @@ def custom_metric(
import time

start = time.time()
y_pred = estimator.predict_proba(X_val)
pred_time = (time.time() - start) / len(X_val)
val_loss = log_loss(y_val, y_pred, labels=labels, sample_weight=weight_val)
y_pred = estimator.predict_proba(X_test)
pred_time = (time.time() - start) / len(X_test)
val_loss = log_loss(y_test, y_pred, labels=labels, sample_weight=weight_val)
y_pred = estimator.predict_proba(X_train)
train_loss = log_loss(y_train, y_pred, labels=labels, sample_weight=weight_train)
alpha = 0.5
Expand Down