Creates a histogram of the density ratio estimates. Useful to understand the distribution of estimated density ratios in each sample, or compare it among samples. It is the default plotting method for density ratio objects.
dr.histogram(
x,
samples = "both",
logscale = TRUE,
binwidth = NULL,
bins = NULL,
tol = 0.01,
...
)# S3 method for ulsif
plot(
x,
samples = "both",
logscale = TRUE,
binwidth = NULL,
bins = NULL,
tol = 0.01,
...
)
# S3 method for kliep
plot(
x,
samples = "both",
logscale = TRUE,
binwidth = NULL,
bins = NULL,
tol = 0.01,
...
)
# S3 method for kmm
plot(
x,
samples = "both",
logscale = TRUE,
binwidth = NULL,
bins = NULL,
tol = 0.01,
...
)
# S3 method for spectral
plot(
x,
samples = "both",
logscale = TRUE,
binwidth = NULL,
bins = NULL,
tol = 0.01,
...
)
# S3 method for lhss
plot(
x,
samples = "both",
logscale = TRUE,
binwidth = NULL,
bins = NULL,
tol = 0.01,
...
)
# S3 method for naivedensityratio
plot(
x,
samples = "both",
logscale = TRUE,
binwidth = NULL,
bins = NULL,
tol = 0.01,
...
)
A histogram of density ratio estimates.
A histogram of density ratio estimates.
A histogram of density ratio estimates.
A histogram of density ratio estimates.
A histogram of density ratio estimates.
A histogram of density ratio estimates.
A histogram of density ratio estimates.
Density ratio object created with e.g., kliep()
, ulsif()
,
or naive()
Character string indicating whether to plot the 'numerator', 'denominator', or 'both' samples. Default is 'both'.
Logical indicating whether to plot the density ratio estimates on a log scale. Default is TRUE.
Numeric indicating the width of the bins, passed on to
ggplot2
.
Numeric indicating the number of bins. Overriden by binwidth, and
passed on to ggplot2
.
Numeric indicating the tolerance: values below this value will be set to the tolerance value, for legibility of the plots
Additional arguments passed on to predict()
.
ulsif
for example usage
kliep
for example usage
kmm
for example usage
spectral
for example usage
lhss
for example usage
naive
for example usage