{"id":18831691,"url":"https://github.com/yuting1214/tensortest2d","last_synced_at":"2026-02-08T21:32:38.417Z","repository":{"id":56934289,"uuid":"439494009","full_name":"yuting1214/TensorTest2D","owner":"yuting1214","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-25T19:14:12.000Z","size":3289,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T23:47:37.334Z","etag":null,"topics":["r","statistical-learning","tensor"],"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/yuting1214.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-18T00:32:34.000Z","updated_at":"2024-07-25T19:14:15.000Z","dependencies_parsed_at":"2024-07-25T22:01:49.606Z","dependency_job_id":null,"html_url":"https://github.com/yuting1214/TensorTest2D","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"d27abc3150790203770f34b05977181c21ccc4aa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuting1214/TensorTest2D","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuting1214%2FTensorTest2D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuting1214%2FTensorTest2D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuting1214%2FTensorTest2D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuting1214%2FTensorTest2D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuting1214","download_url":"https://codeload.github.com/yuting1214/TensorTest2D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuting1214%2FTensorTest2D/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271399688,"owners_count":24752813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["r","statistical-learning","tensor"],"created_at":"2024-11-08T01:55:45.076Z","updated_at":"2026-02-08T21:32:38.390Z","avatar_url":"https://github.com/yuting1214.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/TensorTest2D?color=green)](https://cran.r-project.org/package=TensorTest2D)\n[![](http://cranlogs.r-pkg.org/badges/grand-total/badger?color=green)](https://cran.r-project.org/package=badger)\n[![Downloads](https://cranlogs.r-pkg.org/badges/TensorTest2D)](https://CRAN.R-project.org/package=TensorTest2D)\n[![Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/TensorTest2D?color=orange)](https://CRAN.R-project.org/package=TensorTest2D)\n\n# TensorTest2D\nAn implementation of fitting generalized linear models on second-order tensor type data. The functions within this package mainly focus on parameter estimation, including parameter coefficients and standard deviation.\n\n# Installation\n```\ngit clone https://github.com/yuting1214/TensorTest2D\nR CMD INSTALL TensorTest2D\n```\nor in R console window type the following\n```\ninstall.packages(\"TensorTest2D\")\n```\n\n# Quick start\n```\nlibrary(TensorTest2D)\n\n# Simulate data\nn \u003c- 500 # number of observations\nn_P \u003c- 3; n_G \u003c- 64 # dimension of 3-D tensor variables.\nn_d \u003c- 1 # number of numerical variable, if n_d == 1,  numerical variable equals to intercept.\nbeta_True \u003c- rep(1, n_d)\nB_True \u003c- c(1,1,1)%*%t(rnorm(n_G)) + c(0, .5, .5)%*%t(rnorm(n_G))\nB_True \u003c- B_True / 10\nW \u003c- matrix(rnorm(n*n_d), n, n_d); W[,1] \u003c- 1\nX \u003c- array(rnorm(n*n_P*n_G), dim=c(n_P, n_G, n))\n\n## Regression Data\ny_R\u003c- as.vector(W%*%beta_True + X%hp%B_True + rnorm(n))\nDATA_R \u003c- list(y = y_R, X = X, W = W)\n\n# Execution (Regression)\nresult_R \u003c- tensorReg2D(y = DATA_R$y, X = DATA_R$X, W=NULL, n_R = 1, family = \"gaussian\",\n                        opt = 1, max_ite = 100, tol = 10^(-7) )\n# Visualization\nimage(B_True);image(result_R$B_EST)\nhead(predict(result_R, DATA_R$X))\n```\n\n# Relevant Packages\n* [tensor](https://CRAN.R-project.org/package=tensor): The tensor product of two arrays is notionally an outer product of the arrays collapsed in specific extents by summing along the appropriate diagonals.\n* [rTensor](https://CRAN.R-project.org/package=rTensor): Tools for Tensor Analysis and Decomposition\n* [tensorregress](https://CRAN.R-project.org/package=tensorregress): Implement the alternating algorithm for supervised tensor decomposition with interactive side information.\n\n# Publications\n\n* Ping-Yang Chen/Hsing-Ming Chang/Yu-Ting Chen/Jung-Ying Tzeng/Sheng-Mao Chang* (2022) ,TensorTest2D: Fitting Generalized Linear Models with Matrix Covariates,The R Journal,14,152-163,SSCI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuting1214%2Ftensortest2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuting1214%2Ftensortest2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuting1214%2Ftensortest2d/lists"}