lhss | R Documentation |
Least-squares heterodistributional subspace search
lhss(
df_numerator,
df_denominator,
m = NULL,
intercept = TRUE,
scale = "numerator",
nsigma = 10,
sigma_quantile = NULL,
sigma = NULL,
nlambda = 10,
lambda = NULL,
ncenters = 200,
centers = NULL,
maxit = 200,
progressbar = TRUE
)
df_numerator |
|
df_denominator |
|
m |
Scalar indicating the dimensionality of the reduced subspace |
intercept |
|
scale |
|
nsigma |
Integer indicating the number of sigma values (bandwidth parameter of the Gaussian kernel gram matrix) to use in cross-validation. |
sigma_quantile |
|
sigma |
|
nlambda |
Integer indicating the number of |
lambda |
|
ncenters |
Maximum number of Gaussian centers in the kernel gram matrix. Defaults to all numerator samples. |
centers |
Numeric matrix with the same variables as |
maxit |
Maximum number of iterations in the updating scheme. |
progressbar |
Logical indicating whether or not to display a progressbar. |
lhss
-object, containing all information to calculate the
density ratio using optimal sigma, optimal lambda and optimal weights.
Sugiyama, M., Yamada, M., Von Bünau, P., Suzuki, T., Kanamori, T. & Kawanabe, M. (2011). Direct density-ratio estimation with dimensionality reduction via least-squares hetero-distributional subspace search. Neural Networks, 24, 183-198. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.neunet.2010.10.005")}.
set.seed(123)
# Fit model
dr <- naive(numerator_small, denominator_small)
# Inspect model object
dr
# Obtain summary of model object
summary(dr)
# Plot model object
plot(dr)
# Plot density ratio for each variable individually
plot_univariate(dr)
# Plot density ratio for each pair of variables
plot_bivariate(dr)
# Predict density ratio and inspect first 6 predictions
head(predict(dr))
# Fit model with custom parameters
naive(numerator_small, denominator_small, m=2, kernel="epanechnikov")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.