tfclass_predict.prediction_manager
Classes
Prediction manager class. Coordinates the prediction for a single bed file. |
Functions
|
Generates count vectors from prediction results. |
Module Contents
- tfclass_predict.prediction_manager._generate_count_vectors(predictions, sequence_indices, num_classes=NUM_CLASSES)
Generates count vectors from prediction results. :param predictions: Aggregated predictions from Predictor.predict_bed_data() :param sequence_indices: Indices of each sequence in predictions. :param num_classes: Number of classes that were predicted. :return: Count vectors and prediction dictionary.
- class tfclass_predict.prediction_manager.PredictionManager(bed_file, genome_file, res_dir, bert_model, tfclass_model)
Prediction manager class. Coordinates the prediction for a single bed file.
- iointerface
- tokenizer
- bed_data
- predictor
- _init_BERT(bert_model)
Initalizes the BERT tokenizer.
- _init_GPU()
Initializes GPU usage and enables memory growth.
- predict(subseq_length=15, batch_size=2000)
Start the prediction. :param subseq_length: Length in which a read should be split into subsequences. :param batch_size: Number of intervals that should be processed in one batch. :return: Count vectors and prediction dictionary.
- save_results()
Saves the prediction results to disk.