Title: | A Collection of Smooth Tensor Estimation Methods |
---|---|
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" <arXiv:2111.04681>. |
Authors: | Chanwoo Lee [aut, cre], Miaoyan Wang [aut] |
Maintainer: | Chanwoo Lee <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2025-03-11 06:40:09 UTC |
Source: | CRAN |
Estimate a signal tensor and permutation from a noisy and incomplete data tensor using Borda count estimation method.
Borda_count(A, l, kvec, sym = FALSE)
Borda_count(A, l, kvec, sym = FALSE)
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 ( |
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.
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
# 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)
# 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)
Estimate a permuted signal tensor from a noisy data tensor based on the least squares estimation with constant block approximation.
LSE(A, kvec, sym = FALSE, mode = 3)
LSE(A, kvec, sym = FALSE, mode = 3)
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. |
An estimated permuted signal tensor based on the least squares estimation.
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.
# 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)
# 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)
Chicago crime dataset consists of crime counts reported in the city of Chicago, ranging from January 1st, 2001 to December 11th, 2017.
ltns
ltns
An order-3 tensor with entries representing the log counts of crimes from 24 hours, 77 community areas, and 32 crime types.
http://frostt.io/tensors/chicago-crime/
A list of mode information of order-3 tensor dataset ltns
.
mode_info
mode_info
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
http://frostt.io/tensors/chicago-crime/
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.
simulation(d, mode = 1, sigma = 0.5, signal_level=5)
simulation(d, mode = 1, sigma = 0.5, signal_level=5)
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. |
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.
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
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
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. Users can select one of 5 different smooth signal tensors generated from functions specified in Table 5 of the reference given below.
simulation_asym(d, mode = 1, sigma = 0.5, signal_level=5)
simulation_asym(d, mode = 1, sigma = 0.5, signal_level=5)
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. |
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.
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
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
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. Users can select one of 5 different smooth probability tensor generated from functions specified in Table 4 of the reference given below.
simulation_bin(d, mode = 1)
simulation_bin(d, mode = 1)
d |
Dimension of a tensor to be generated. |
mode |
An integer from 1 to 5 corresponding to models specified. Default model is 1. |
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.
C. Lee and M. Wang. Smooth tensor estimation with unknown permutations. arXiv:2111.04681, 2021.
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
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
Estimate a permuted signal tensor from a noisy data tensor using spectral method, which performs universal singualr value thresholding on the unfolded tensor.
Spectral(A, row_idx, col_idx, threshold = NULL)
Spectral(A, row_idx, col_idx, threshold = NULL)
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. |
An estimated permuted signal tensor based on Spectral method.
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.
# 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)
# 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)