Skip to content

Commit 06af3d8

Browse files
authored
Update usage.rst
- changed infoNCE to new GoF
1 parent 0008d88 commit 06af3d8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/source/usage.rst

+3-5
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,6 @@ Putting all previous snippet examples together, we obtain the following pipeline
12311231
assert continuous_label.shape == (100, 3)
12321232

12331233
# 3. Split data and labels into train/validation
1234-
12351234
from sklearn.model_selection import train_test_split
12361235

12371236
split_idx = int(0.8 * len(neural_data))
@@ -1267,11 +1266,10 @@ Putting all previous snippet examples together, we obtain the following pipeline
12671266
assert valid_embedding.shape == (30, 8) # TODO(user): change to split ratio & output dim
12681267

12691268
# 7. Evaluate the model performance (you can also check the train_data)
1270-
goodness_of_fit = cebra.sklearn.metrics.infonce_loss(cebra_model,
1271-
valid_data,
1269+
goodness_of_fit = cebra.sklearn.metrics.goodness_of_fit_score(cebra_model,
1270+
valid_data,
12721271
valid_discrete_label,
1273-
valid_continuous_label,
1274-
num_batches=5)
1272+
valid_continuous_label)
12751273

12761274
# 8. Adapt the model to a new session
12771275
cebra_model.fit(new_neural_data, adapt = True)

0 commit comments

Comments
 (0)