Skip to content

Commit

Permalink
version 1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes authored and cran-robot committed Sep 7, 2024
1 parent a522e13 commit 26d0843
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
14 changes: 9 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
Package: outliertree
Type: Package
Title: Explainable Outlier Detection Through Decision Tree Conditioning
Version: 1.9.0
Author: David Cortes
Version: 1.10.0
Authors@R: person(given = "David",
family = "Cortes",
role = c("aut", "cre"),
email = "[email protected]")
Maintainer: David Cortes <[email protected]>
URL: https://github.com/david-cortes/outliertree
BugReports: https://github.com/david-cortes/outliertree/issues
Description: Outlier detection method that flags suspicious values within observations,
constrasting them against the normal values in a user-readable format, potentially
describing conditions within the data that make a given outlier more rare.
Full procedure is described in Cortes (2020) <arXiv:2001.00636>.
Full procedure is described in Cortes (2020) <doi:10.48550/arXiv.2001.00636>.
Loosely based on the 'GritBot' <https://www.rulequest.com/gritbot-info.html> software.
License: GPL (>= 3)
Imports: Rcpp (>= 1.0.1), methods
Expand All @@ -20,6 +23,7 @@ LazyData: true
VignetteBuilder: knitr
RoxygenNote: 7.3.1
NeedsCompilation: yes
Packaged: 2024-02-09 20:49:40 UTC; david
Packaged: 2024-09-05 19:09:03 UTC; david
Author: David Cortes [aut, cre]
Repository: CRAN
Date/Publication: 2024-02-09 21:40:02 UTC
Date/Publication: 2024-09-06 14:40:06 UTC
6 changes: 3 additions & 3 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aa6cf23e6ec818509a82dbc5047c6b07 *DESCRIPTION
961a2ffdec98e38fdc13698c10d2e8d9 *DESCRIPTION
ac626251b96bf4543467830d8613f677 *NAMESPACE
146ce017ca8e585317f46365f599d82c *R/RcppExports.R
8f9d710b5dc39d73a8055c336f9f6d95 *R/helpers.R
Expand All @@ -17,7 +17,7 @@ cf5ae8500528392a73f9c329806776ea *inst/doc/Explainable_Outlier_Detection_in_Tita
6f1202eec1dd71943944b016461bfb84 *inst/doc/Explainable_Outlier_Detection_in_Titanic_dataset.html
c7d31c586d00d153e28c3ffc0e42e9ca *inst/doc/Introducing_OutlierTree.R
520ac4aa8c838850aaf36d4e11426308 *inst/doc/Introducing_OutlierTree.Rmd
28baf63ae45447c6c82b911a6d1490f5 *inst/doc/Introducing_OutlierTree.html
ec0d190b7877107e8d8640b11a9a3ade *inst/doc/Introducing_OutlierTree.html
9e980d45ebf1314f6a7ab4d0735c34f9 *man/as.list.outlieroutputs.Rd
c1db44adae56d90f7e038ce359f3a1d2 *man/check.outlierness.bounds.Rd
289001788632a6cb1e1fa4faaa5f6502 *man/extract.training.outliers.Rd
Expand All @@ -36,7 +36,7 @@ c751a87f5827956018d5ce3aa35194c0 *src/Makevars.in
0b663d0a726e67eac4918a72c1edd747 *src/RcppExports.cpp
a52f73c46b570268b0af8aa1981a4459 *src/Rwrapper.cpp
c7a837ecba6b9af232973a449a1e3a93 *src/cat_outlier.cpp
dc65eddf69087c17e3aca977b733f894 *src/clusters.cpp
708616f2fee8e66edcd59b081b62c813 *src/clusters.cpp
96065d67dda8fa29fa3be3d57c67942f *src/fit_model.cpp
06347e747355f1f9f95b8e2a0f748224 *src/misc.cpp
540574b7c6aebc963b6dc19f06b4c636 *src/outlier_tree.h
Expand Down
4 changes: 2 additions & 2 deletions inst/doc/Introducing_OutlierTree.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<meta name="author" content="David Cortes" />

<meta name="date" content="2024-02-09" />
<meta name="date" content="2024-09-05" />

<title>Introducing OutlierTree</title>

Expand Down Expand Up @@ -341,7 +341,7 @@

<h1 class="title toc-ignore">Introducing OutlierTree</h1>
<h4 class="author">David Cortes</h4>
<h4 class="date">2024-02-09</h4>
<h4 class="date">2024-09-05</h4>



Expand Down
19 changes: 9 additions & 10 deletions src/clusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ bool define_numerical_cluster(double *restrict x, size_t *restrict ix_arr, size_
if ((!isinf(left_tail) || !isinf(right_tail)) && !is_log_transf && !is_exp_transf) {
sd *= 0.5;
}
while (std::numeric_limits<double>::epsilon() > sd*std::fmin(min_gap, z_norm))
sd = std::nextafter(sd, std::numeric_limits<double>::infinity());
sd = std::fmax(sd, std::numeric_limits<double>::epsilon() / std::fmin(min_gap, z_norm));
cluster.cluster_mean = mean;
cluster.cluster_sd = sd;
cnt = end - st + 1;
Expand Down Expand Up @@ -218,8 +217,8 @@ bool define_numerical_cluster(double *restrict x, size_t *restrict ix_arr, size_
cluster.display_lim_low = orig_x[ix_arr[row + 1]];
cluster.perc_above = (long double)(end - st_normals + 1) / (long double)(end - st + 1);

while (cluster.display_lim_low <= cluster.lower_lim) {
cluster.lower_lim = std::nextafter(cluster.lower_lim, -std::numeric_limits<double>::infinity());
if (cluster.display_lim_low <= cluster.lower_lim) {
cluster.lower_lim = std::nextafter(cluster.display_lim_low, -std::numeric_limits<double>::infinity());
}
break;
}
Expand Down Expand Up @@ -292,8 +291,8 @@ bool define_numerical_cluster(double *restrict x, size_t *restrict ix_arr, size_
}

if (cluster.lower_lim > -HUGE_VAL) {
while (cluster.lower_lim >= orig_x[ix_arr[st]]) {
cluster.lower_lim = std::nextafter(cluster.lower_lim, -std::numeric_limits<double>::infinity());
if (cluster.lower_lim >= orig_x[ix_arr[st]]) {
cluster.lower_lim = std::nextafter(orig_x[ix_arr[st]], -std::numeric_limits<double>::infinity());
}
}

Expand Down Expand Up @@ -343,8 +342,8 @@ bool define_numerical_cluster(double *restrict x, size_t *restrict ix_arr, size_
cluster.display_lim_high = orig_x[ix_arr[row - 1]];
cluster.perc_below = (long double)(end_normals - st + 1) / (long double)(end - st + 1);

while (cluster.display_lim_high >= cluster.upper_lim) {
cluster.upper_lim = std::nextafter(cluster.upper_lim, std::numeric_limits<double>::infinity());
if (cluster.display_lim_high >= cluster.upper_lim) {
cluster.upper_lim = std::nextafter(cluster.display_lim_high, -std::numeric_limits<double>::infinity());
}
break;
}
Expand Down Expand Up @@ -401,8 +400,8 @@ bool define_numerical_cluster(double *restrict x, size_t *restrict ix_arr, size_
}

if (cluster.upper_lim < HUGE_VAL) {
while (cluster.upper_lim <= orig_x[ix_arr[end]]) {
cluster.upper_lim = std::nextafter(cluster.upper_lim, std::numeric_limits<double>::infinity());
if (cluster.upper_lim <= orig_x[ix_arr[end]]) {
cluster.upper_lim = std::nextafter(orig_x[ix_arr[end]], std::numeric_limits<double>::infinity());
}
}

Expand Down

0 comments on commit 26d0843

Please sign in to comment.