From 5eab9cecbd760e14f963742321e05aca2684cd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Hoffimann?= Date: Tue, 26 Nov 2024 14:28:37 -0300 Subject: [PATCH] Improve README --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 63b0127..9eb2e5f 100644 --- a/README.md +++ b/README.md @@ -85,9 +85,21 @@ available_optlib(KLIEP) In the case of `ConvexLib` and `JuMPLib`, specific optimizer packages must be loaded besides the optimization library itself. For example, one must load `Convex` *and* `ECOS` -to use `optlib=ConvexLib` with the `KLIEP` estimator, or `JuMP` *and* `Ipopt` to use -`optlib=JuMPLib` with the `LSIF` estimator. -design. +to use `optlib=ConvexLib` with the `KLIEP` estimator: + +```julia +using DensityRatioEstimation, Convex, ECOS + +r = densratio(x_nu, x_de, KLIEP(), optlib=ConvexLib) +``` + +or `JuMP` *and* `Ipopt` to use `optlib=JuMPLib` with the `LSIF` estimator: + +```julia +using DensityRatioEstimation, JuMP, Ipopt + +r = densratio(x_nu, x_de, LSIF(), optlib=JuMPLib) +``` ### Density ratio function