Learn R Programming

intRinsic v1.1.2

A package with functions to estimate the intrinsic dimension of a dataset via likelihood-based approaches. Specifically, the package implements the TWO-NN and Gride estimators and the Hidalgo Bayesian mixture model.

To install the package from CRAN, run

install.packages("intRinsic")

To install the package from this GitHub repository, run

# install.packages("remotes")

#Turn off warning-error-conversion regarding package versions
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")

#install from github
remotes::install_github("Fradenti/intRinsic")

Simple example on Swissroll dataset

library(intRinsic)
X <- Swissroll(2000)
twonn(X)

The vignette for this package has been published in the Journal of Statistical Software. The article can be found at this link.

Please help me improve this package by reporting suggestions, typos, and issues at this link.

Please note that the previous versions of the package (from v0.1.0 to v1.1.1) are still available as GitHub Releases at this page.

Copy Link

Version

Install

install.packages('intRinsic')

Monthly Downloads

11,995

Version

1.1.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Francesco Denti

Last Published

December 17th, 2025

Functions in intRinsic (1.1.2)

compute_mus

Compute the ratio statistics needed for the intrinsic dimension estimation
id_by_class

Stratification of the id by an external categorical variable
clustering

Posterior similarity matrix and partition estimation
twonn_decimated

Estimate the decimated TWO-NN evolution with halving steps or vector of proportions
intRinsic-package

intRinsic: Likelihood-Based Intrinsic Dimension Estimators
generalized_ratios_distribution

The Generalized Ratio distribution
gride

Gride: the Generalized Ratios ID Estimator
gride_evolution

Gride evolution based on Maximum Likelihood Estimation
twonn

TWO-NN estimator
reexports

Objects exported from other packages
twonn_decimation

Estimate the decimated TWO-NN evolution with halving steps or vector of proportions
autoplot.Hidalgo

Plot the output of the Hidalgo function
autoplot.gride_mle

Plot the simulated bootstrap sample for the MLE Gride
autoplot.gride_bayes

Plot the simulated MCMC chains for the Bayesian Gride
Swissroll

Generates a noise-free Swiss roll dataset
auxHidalgo

Auxiliary functions for the Hidalgo model
autoplot.twonn_mle

Plot the output of the TWO-NN model estimated via the Maximum Likelihood approach
autoplot.gride_evolution

Plot the evolution of Gride estimates
Hidalgo

Fit the Hidalgo model
autoplot.twonn_linfit

Plot the output of the TWO-NN model estimated via least squares
autoplot.twonn_bayes

Plot the output of the TWO-NN model estimated via the Bayesian approach