{"id":32209193,"url":"https://github.com/pridiltal/stray","last_synced_at":"2026-02-21T18:05:10.260Z","repository":{"id":56936213,"uuid":"116096810","full_name":"pridiltal/stray","owner":"pridiltal","description":"stray {Search and TRace AnomalY}.  Full paper is available from  https://arxiv.org/pdf/1908.04000.pdf  :dog::dog::dog::dog::cat: :dog: :dog::dog::dog::dog:","archived":false,"fork":false,"pushed_at":"2023-11-19T23:14:35.000Z","size":993,"stargazers_count":59,"open_issues_count":2,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-02T00:41:17.212Z","etag":null,"topics":["stray"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pridiltal.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-03T05:47:36.000Z","updated_at":"2025-09-02T14:38:48.000Z","dependencies_parsed_at":"2022-08-21T07:20:42.203Z","dependency_job_id":null,"html_url":"https://github.com/pridiltal/stray","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pridiltal/stray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pridiltal%2Fstray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pridiltal%2Fstray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pridiltal%2Fstray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pridiltal%2Fstray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pridiltal","download_url":"https://codeload.github.com/pridiltal/stray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pridiltal%2Fstray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29689644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["stray"],"created_at":"2025-10-22T06:01:41.200Z","updated_at":"2026-02-21T18:05:10.255Z","avatar_url":"https://github.com/pridiltal.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n\u003c!-- rmarkdown v1 --\u003e\n\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n\n# stray {STReam AnomalY} \u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"150\" /\u003e\n\n[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n[![Licence](https://img.shields.io/badge/licence-GPL--2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)\n\n[![Build Status](https://travis-ci.org/pridiltal/stray.svg?branch=master)](https://travis-ci.org/pridiltal/stray)\n \n---\n \n[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.4.0-6666ff.svg)](https://cran.r-project.org/)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/stray)](https://cran.r-project.org/package=stray)\n[![packageversion](https://img.shields.io/badge/Package%20version-0.1.0-orange.svg?style=flat-square)](commits/master)\n \n---\n \n[![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-yellowgreen.svg)](/commits/master)\n\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n\n\n\nAnomaly Detection in High Dimensional Data Space\n\nThis package is a modification of [HDoutliers package](https://CRAN.R-project.org/package=HDoutliers). The HDoutliers algorithm is a powerful unsupervised algorithm for detecting anomalies in high-dimensional data, with a strong theoretical foundation. However, it suffers from some\nlimitations that significantly hinder its performance level, under certain circumstances. In this package, we propose an algorithm that addresses these limitations. We define an anomaly as an\nobservation that deviates markedly from the majority with a large distance gap. An approach based on extreme value theory is used for the anomalous threshold calculation. \n\n\nA companion paper to this work is available [here](https://arxiv.org/pdf/1908.04000.pdf). Using various\nsynthetic and real datasets, we demonstrate the wide applicability and usefulness of our algorithm, which we call the stray algorithm. We also demonstrate how this algorithm can\nassist in detecting anomalies present in other data structures using feature engineering. We show the situations where the stray algorithm outperforms the HDoutliers algorithm both in\naccuracy and computational time. \n\n\nThis package is still under development and this repository contains a development version of the R package *stray*.\n\n## Installation\n\nYou can install the released version of stray from [CRAN](https://CRAN.R-project.org) with:\n```{r cran-installation, eval = FALSE}\ninstall.packages('stray', dependencies = TRUE)\n```\n\nYou can install stray from github with:\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"pridiltal/stray\")\n```\n\n## Example\n\n### One dimensional data set with one outlier\n```{r onedim, echo =TRUE, eval = TRUE}\nlibrary(stray)\nrequire(ggplot2)\nset.seed(1234)\ndata \u003c- c(rnorm(1000, mean = -6), 0, rnorm(1000, mean = 6))\noutliers \u003c- find_HDoutliers(data, knnsearchtype = \"brute\")\nnames(outliers)\ndisplay_HDoutliers(data, outliers)\n```\n\n### Two dimensional dataset with 8 outliers\n```{r twodim, echo =TRUE, eval = TRUE}\nset.seed(1234)\nn \u003c- 1000 # number of observations\nnout \u003c- 10 # number of outliers\ntypical_data \u003c- matrix(rnorm(2*n), ncol = 2, byrow = TRUE)\nout \u003c- matrix(5*runif(2*nout,min=-5,max=5), ncol = 2, byrow = TRUE)\ndata \u003c- rbind(out, typical_data )\noutliers \u003c- find_HDoutliers(data, knnsearchtype = \"brute\")\ndisplay_HDoutliers(data, outliers)\n\n```\n\n### Three dimensional dataset with 2 outliers\n\nFor data with more than two dimensions, two dimensional scatterplot is produced using the first two pricipal components.\n\n```{r datad3, echo= TRUE, eval= TRUE}\ndata \u003c- rbind(matrix(rnorm(144), ncol = 3), c(10,12,10),c(3,7,10))\noutput \u003c- find_HDoutliers(data, knnsearchtype = \"brute\")\ndisplay_HDoutliers(data, out = output)\n```\ngitn\n\nMore examples are available from our paper [Anomaly Detection in High Dimensional Data](https://www.monash.edu/business/ebs/research/publications/ebs/wp20-2019.pdf) \n\n```{r dataa, echo =TRUE, eval = TRUE}\noutliers\u003c-find_HDoutliers(data_c[,1:2], knnsearchtype= \"brute\")\np \u003c- display_HDoutliers(data_c[,1:2], outliers)+\n      ggplot2::ggtitle(\"data_c\")\n\nprint(p)\n```\n\n```{r datad, echo =TRUE, eval = TRUE}\noutliers\u003c-find_HDoutliers(data_d[,1:2], knnsearchtype= \"brute\")\np \u003c- display_HDoutliers(data_d[,1:2], outliers)+\n      ggplot2::ggtitle(\"data_d\")\n\nprint(p)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpridiltal%2Fstray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpridiltal%2Fstray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpridiltal%2Fstray/lists"}