Likelihood Ratio Outlier Detection with PixelCNN++
Method
Dataset
!pip install seabornimport os
from functools import partial
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score
import tensorflow as tf
from alibi_detect.od import LLR
from alibi_detect.models.tensorflow import PixelCNN
from alibi_detect.utils.fetching import fetch_detector
from alibi_detect.saving import save_detector, load_detector
from alibi_detect.utils.tensorflow import predict_batch
from alibi_detect.utils.visualize import plot_rocUtility Functions
Load data
Define PixelCNN++ model
Load or train the outlier detector
Compare the log likelihoods
Detect outliers
Display results
Analyse feature scores
PreviousLikelihood Ratio Outlier Detection on Genomic SequencesNextMahalanobis outlier detection on KDD Cup ‘99 dataset
Last updated
Was this helpful?

