Giter VIP home page Giter VIP logo

mds-hypothesis-testing's Introduction

mds-hypothesis-testing

Summary

Multidimensional scaling (MDS) is an unsupervised learning technique that preserves pairwise distances between observations and is commonly used for analyzing multivariate biological datasets. Recent advances in MDS have achieved successful classification results, but the configurations heavily depend on the choice of hyperparameters, limiting its broader application. Here, we present a self-supervised MDS approach informed by the dispersions of observations that share a common binary label (F-ratio). Our visualization accurately configures the F-ratio while consistently preserving the global structure with a low data distortion compared to existing dimensionality reduction tools. Using an algal microbiome dataset, we show that this new method better illustrates the community's response to the host, suggesting its potential impact on microbiology and ecology data analysis.

mds-hypothesis-testing's People

Contributors

hyu-kim avatar hyu-kim-piq avatar soob-kim avatar

Stargazers

 avatar  avatar

Watchers

 avatar

mds-hypothesis-testing's Issues

Case with a large lambda

Refer to a reply / comment to PR #13

Issue

Configuration diverges when code runs under ๐€=10 using Site 1, 2

Idea

Our confirmatory term in objective function is not regularized and is proportional to hyperparameter. This may have caused a problem with a large hyperparameter.

I will come back to this after completing with outline document.

y1 vs y1s in mm.R

mm.R ํŒŒ์ผ์—์„œ ๋ฐ์ดํ„ฐ์˜ ๋ ˆ์ด๋ธ”(y)๊ฐ’์„ ์–ด๋–ป๊ฒŒ ๋‘” ๊ฑด์ง€ ๊ถ๊ธˆํ•ด์„œ ์ด์Šˆ๋ฅผ ๋งŒ๋“ค์—ˆ์–ด
๋ฐ์ดํ„ฐ์—์„œ label์€ pt+, pt-๊ฐ’์œผ๋กœ ๋‚˜์˜ค๋Š” ์• ๋“ค์ธ ์ค„ ์•Œ์•˜๋Š”๋ฐ ์•„๋‹Œ๊ฐ€?
๊ทผ๋ฐ ์ฝ”๋“œ์—์„œ label๋กœ ์‚ฌ์šฉํ•œ y1s๋Š” result/labels_site1.txt ์—์„œ ๊ฐ€์ ธ์˜ค๋˜๋ฐ,

  1. ์ด ํ…์ŠคํŠธ ํŒŒ์ผ์˜ ๊ฐ ์—ด์ด ๋ฌด์Šจ ๊ฐ’๋“ค์ธ์ง€,
  2. ํ…์ŠคํŠธ ํŒŒ์ผ์˜ ๊ฐ’๊ณผ ๋ฐ์ดํ„ฐ์—์„œ ๊ฐ€์ ธ์˜จ y1 (ifelse(site1@sam_data$Treatment == "Pt +", 1, 2)) ์˜ ์ฐจ์ด๊ฐ€ ๋ญ”์ง€ ๊ถ๊ธˆํ•ด

derivative for line 115 in gd.R

์ˆ˜๋นˆ์•„ gradient descent ํ•จ์ˆ˜ ๋ฏธ๋ถ„ ๊ผด ํ˜•ํƒœ๋ฅผ ํ™•์ธํ•˜๋Š” ์ค‘์ด์—ˆ๋Š”๋ฐ, F statistic ๋ฏธ๋ถ„ ํ•ญ์— ๋ถ„๋ชจ ์‹์ด ๋น ์ง„ ๊ฒƒ ๊ฐ™์•„์„œ ์ฝ”๋ฉ˜ํŠธ๋ฅผ ๋‚จ๊ฒจ.

115 d_g <- 4 * (N-a)/a * sign(Fz_cur - F0) * (tmp11 * tmp12 - tmp21 * tmp22) (๋งํฌ)

๋‚ด๊ฐ€ ๋งž๊ฒŒ ๋ณธ ๊ฑด์ง€ ํ™•์ธํ•ด์ค„ ์ˆ˜ ์žˆ์„๊นŒ?

Overleaf ๋„ˆ๊ฐ€ ์ž‘์„ฑํ•œ ๋ฌธ์„œ formulation.tex (๋งํฌ) ์—๋„ ๊ฐ™์€ ์ฝ”๋ฉ˜ํŠธ ๋‚จ๊ฒผ์–ด

@soob-kim

Extrapolation with loess needed

mm.R ํŒŒ์ผ์˜ pair_by_rank ํ•จ์ˆ˜์—์„œ, ์šฐ๋ฆฌ๊ฐ€ loess๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ฃผ์–ด์ง„ ๋ฐ์ดํ„ฐ์˜ ๋ฒ”์œ„์—์„œ ๋ฒ—์–ด๋‚˜๋Š” ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ๋กœ predict๋ฅผ ํ•˜๋ ค๊ณ  ํ•˜๋ฉด NA๋ฅผ ์ฃผ๋Š” ์—๋Ÿฌ๊ฐ€ ์žˆ์–ด,
๊ทธ๋ž˜์„œ mm_cmds(nit=15, lambda=0.5, z0=zmds1, D=distmat1, y=y1) ์„ ๋Œ๋ฆฌ๋ฉด NA๋ฅผ ์ค˜

์—ฌ๊ธฐ์—์„œ์ฒ˜๋Ÿผ,

pair_by_rank <- function(D, z, y, fun){
  f0_sorted <- get_p(d=D, trt=y, fun=fun)$ratio_all
  fz_sorted <- get_p(mat=z, trt=y, fun=fun)$ratio_all
  N <- length(f0_sorted)
  mat_pair <- matrix(0, nrow=N, ncol=2)
  mat_pair[,1] <- f0_sorted
  mat_pair[,2] <- fz_sorted
  df_pair <- data.frame(data=mat_pair)
  colnames(df_pair) <- c('F0','Fz')
  loess_f <- loess(Fz ~ F0, data=df_pair, span=0.10,
                   control=loess.control(surface="direct")) ## Add this part
  return(list(pair=mat_pair, model=loess_f))
}

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๊ทธ ๋ฌธ์ œ๋Š” ์ผ๋‹จ ์‚ฌ๋ผ์ ธ. ํ•จ์ˆ˜ ์ˆ˜์ •ํ•  ๋•Œ ์ด ๋ถ€๋ถ„๋„ ์ฐธ๊ณ ํ•ด์ค˜!

MM diagnosis

How come \Phi_z and estimated \Phi (i.e., f_z of \Phi_o) not differ from each other?

Created a branch to diagnose the issue

can't find zmds1

์ˆ˜๋นˆ @soob-kim , ๋„ˆ๊ฐ€ ์ž‘์„ฑํ•œ gradient descent ์ฝ”๋“œ๋ฅผ ์‚ดํŽด๋ณด๋Š” ์ค‘์ธ๋ฐ (data/gd.R) ๋ง‰ํžˆ๋Š” ๋ถ€๋ถ„์ด ์žˆ์–ด์„œ. 130๋ฒˆ์งธ ์ค„์„ ๋ณด๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ๋˜์–ด์žˆ๋Š”๋ฐ (๋งํฌ)

tmp <- gd_mds(nit = 100, D = as.matrix(dist1), z0 = zmds1)

ํ˜น์‹œ zmds1์ด ์–ด๋””์„œ ์˜จ ๊ฑด์ง€ ์„ค๋ช…ํ•ด์ค„ ์ˆ˜ ์žˆ์„๊นŒ?

ํ˜•์„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.