Type: | Package |
Title: | A Collection of Smooth Tensor Estimation Methods |
Version: | 0.1.1 |
Imports: | methods, Matrix, rTensor |
Description: | A list of methods for estimating a smooth tensor with an unknown permutation. It also contains several multi-variate functions for generating permuted signal tensors and corresponding observed tensors. For a detailed introduction for the model and estimation techniques, see the paper by Chanwoo Lee and Miaoyan Wang (2021) "Smooth tensor estimation with unknown permutations" <doi:10.48550/arXiv.2111.04681>. |
URL: | https://arxiv.org/abs/2111.04681 |
License: | GPL-3 |
Depends: | R (≥ 3.5.0) |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2021-11-14 21:19:12 UTC; chanwoolee |
Author: | Chanwoo Lee [aut, cre], Miaoyan Wang [aut] |
Maintainer: | Chanwoo Lee <chanwoo.lee@wisc.edu> |
Repository: | CRAN |
Date/Publication: | 2021-11-16 07:50:17 UTC |
Borda count algorithm for nonparametric tensor estimation with unknown permutation.
Description
Estimate a signal tensor and permutation from a noisy and incomplete data tensor using Borda count estimation method.
Usage
Borda_count(A, l, kvec, sym = FALSE)
Arguments
A |
A given (possibly noisy and incomplete) data tensor. Missing value should be encoded as |
l |
Degree of polynomial approximation. |
kvec |
A vector of the number of groups for each mode. |
sym |
Boolean variables representing symmetricity of the signal tensor. Non-symmetric tensor ( |
Value
The returned object is a list of components.
Theta
- An estimated signal tensor based on Borda count estimation.
permutation
- An estimated permutation based on Borda count estimation.
References
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
Examples
# Generate the noisy observation from smooth tensor and permutation
d = 20
sim1 = simulation(d,mode = 1)
signal_T = sim1$signal
observe_T = sim1$observe
permutation = sim1$permutation
# Estimate signal tensor and permutation
kvec = c(3,3,3)
result = Borda_count(observe_T,2,kvec,sym = TRUE)
# Calculate MSE
hatTheta = result$Theta
mean((hatTheta-signal_T)^2)
The least squares estimation for nonparametric tensor estimation with unknown permutation.
Description
Estimate a permuted signal tensor from a noisy data tensor based on the least squares estimation with constant block approximation.
Usage
LSE(A, kvec, sym = FALSE, mode = 3)
Arguments
A |
A given noisy data tensor. |
kvec |
A vector of the number of groups for each mode. |
sym |
Boolean variables representing symmetricity of the signal tensor. Non-symmetric tensor ( |
mode |
An integer from 1 to 3 representing a type of methods for estimating the clustering functions. Higher-order spectral clustering method is default. |
Value
An estimated permuted signal tensor based on the least squares estimation.
References
C. Gao, Y. Lu, and H. H. Zhou. Rate-optimal graphon estimation. The Annals of Statistics, 2015.
K. Balasubramanian. Nonparametric modeling of higher-order interactions via hypergraphons. Journal of Machine Learning Research, 2021.
R. Han, Y. Luo, M. Wang, and A. R. Zhang. Exact clustering in tensor block model: Statistical optimality and computational limit. arXiv:2012.09996, 2020.
Examples
# Generate the noisy observation from smooth tensor and permutation
d = 20
sim1 = simulation(d, mode = 1)
signal_T = sim1$signal
observe_T = sim1$observe
permutation = sim1$permutation
psignal_T = signal_T[permutation,permutation,permutation]
# Estimate permuted signal tensor
kvec = c(10,10,10)
hatpTheta = LSE(observe_T,kvec,sym = TRUE)
# Calculate MSE
mean((hatpTheta-psignal_T)^2)
Spectral method for nonparametric tensor estimation with unknown permutation.
Description
Estimate a permuted signal tensor from a noisy data tensor using spectral method, which performs universal singualr value thresholding on the unfolded tensor.
Usage
Spectral(A, row_idx, col_idx, threshold = NULL)
Arguments
A |
A given noisy data tensor. |
row_idx |
The indices of the modes that map onto the row space |
col_idx |
The indices of the modes that map onto the column space |
threshold |
A threshold to disregard singular values. Default value is the square root of unfolded matrix dimension. |
Value
An estimated permuted signal tensor based on Spectral method.
References
J. Xu. Rates of convergence of spectral methods for graphon estimation. International Conference on Machine Learning, 2018.
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
Examples
# Generate the noisy observation from smooth tensor and permutation
d = 20
sim1 = simulation(d,mode = 1)
signal_T = sim1$signal
observe_T = sim1$observe
permutation = sim1$permutation
psignal_T = signal_T[permutation,permutation,permutation]
# Estimate permuted signal tensor
hatpTheta = Spectral(observe_T,1,c(2,3))
# Calculate MSE
mean((hatpTheta-psignal_T)^2)
Chicago crime tensor dataset
Description
Chicago crime dataset consists of crime counts reported in the city of Chicago, ranging from January 1st, 2001 to December 11th, 2017.
Usage
ltns
Format
An order-3 tensor with entries representing the log counts of crimes from 24 hours, 77 community areas, and 32 crime types.
Source
http://frostt.io/tensors/chicago-crime/
A list of mode information of the Chicago crime tensor dataset
Description
A list of mode information of order-3 tensor dataset ltns
.
Usage
mode_info
Format
A list consisting of crime areas, crime hours, and crime types:
hour_map
24 hours of crimes
area_map
77 areas of crimes
crimetype_map
32 types of crimes
Source
http://frostt.io/tensors/chicago-crime/
Generate a symmetric tensor observation from the smooth signal tensor, Gaussian noise tensor, and permutation.
Description
Generate a symmetric tensor observation from the smooth signal tensor, Gaussian noise tensor, and permutation. Users can select one of 5 different smooth signal tensors generated from functions specified in Table 4 of the reference given below.
Usage
simulation(d, mode = 1, sigma = 0.5, signal_level=5)
Arguments
d |
Dimension of a tensor to be generated. |
mode |
An integer from 1 to 5 corresponding to models specified. Default model is 1. |
sigma |
Standard deviation of the Gaussian noise tensor. Default value is 0.5. |
signal_level |
A scale of the magnitude of the signal tensor to be generated. |
Value
The returned object is a list of components.
signal
- A true signal tensor generated from a function specified.
observe
- A noisy observation generated from the smooth signal tensor, Gaussian noise tensor, and permutation.
permutation
- A true permutation.
References
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
Examples
d = 20
# Generate 20 by 20 by 20 observed tesnor generated from model 1
sim1 = simulation(d,mode = 1)
observed_tensor = sim1$observe
signal_tensor = sim1$signal
permutation = sim1$permutation
Generate a non-symmetric tensor observation from the smooth signal tensor, Gaussian noise tensor, and permutation.
Description
Generate a non-symmetric tensor observation from the smooth signal tensor, Gaussian noise tensor, and permutation. Users can select one of 5 different smooth signal tensors generated from functions specified in Table 5 of the reference given below.
Usage
simulation_asym(d, mode = 1, sigma = 0.5, signal_level=5)
Arguments
d |
A vector of dimensions of a tensor to be generated. |
mode |
An integer from 1 to 5 corresponding to models specified. Default model is 1. |
sigma |
Standard deviation of the Gaussian noise tensor. Default value is 0.5. |
signal_level |
A scale of the magnitude of the signal tensor to be generated. |
Value
The returned object is a list of components.
signal
- A true non-symmetric signal tensor generated from a function specified.
observe
- A noisy observation generated from the smooth signal tensor, Gaussian noise tensor, and permutation.
permutation
- A list of true permutation for each mode.
References
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
Examples
d = c(10,20,30)
# Generate 10 by 20 by 30 observed tesnor generated from model 1
sim1 = simulation_asym(d,mode = 1)
observed_tensor = sim1$observe
signal_tensor = sim1$signal
permutation = sim1$permutation
Generate a symmetric binary tensor from the probability tensor and permutation.
Description
Generate a symmetric binary tensor from the probability tensor and permutation. Users can select one of 5 different smooth probability tensor generated from functions specified in Table 4 of the reference given below.
Usage
simulation_bin(d, mode = 1)
Arguments
d |
Dimension of a tensor to be generated. |
mode |
An integer from 1 to 5 corresponding to models specified. Default model is 1. |
Value
The returned object is a list of components.
signal
- A true probability tensor generated from a function specified.
observe
- A binary tensor generated by Bernoulli trials given the probability tensor and permutation.
permutation
- A true permutation.
References
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
Examples
d = 20
# Generate 20 by 20 by 20 binary-valued tensor generated from model 1
sim1 = simulation_bin(d, mode = 1)
observed_tensor = sim1$observe
signal_tensor = sim1$signal
permutation = sim1$permutation