bacpipe.embedding_evaluation.probing.probe

Functions

embeds_array_without_noise(embeds, ...)

eval_probe(probe, embeds, df, label2index[, ...])

Perform inference using probe.

generate_annotations_for_probing_task(...[, ...])

prepare_probe_inference(model[, probe_path])

probing_pipeline(model_name, ground_truth, ...)

Probing pipeline consisting of building the classifier, evaluating it and saving metrics and plots of performance.

run_probe_inference(model, linear_probe, ...)

train_probe(embeds, df, label2index[, ...])

Classification pipeline.

Classes

LinearProbe(in_dim, out_dim[, device])

Path(*args, **kwargs)

PurePath subclass that can make system calls.

bacpipe.embedding_evaluation.probing.probe.embeds_array_without_noise(embeds, ground_truth, label_column, **kwargs)[source]
bacpipe.embedding_evaluation.probing.probe.prepare_probe_inference(model, probe_path='')[source]
bacpipe.embedding_evaluation.probing.probe.probing_pipeline(model_name, ground_truth, embeds, paths=None, name='linear', overwrite=True, label_column='species', **kwargs)[source]

Probing pipeline consisting of building the classifier, evaluating it and saving metrics and plots of performance.

Parameters:
  • paths (SimpleNamespace object) – dict with attributes corresponding to paths for loading and saving

  • embeds (np.array) – embeddings

  • name (string) – Type of Probing

  • dataset_csv_path (string) – name of Probing dataframe as specified in settings.yaml

  • overwrite (bool) – overwrite existing Probing?, defaults to False

bacpipe.embedding_evaluation.probing.probe.run_probe_inference(model, linear_probe, threshold, embeds=None, return_binary_presence=True, callbacks=None)[source]