Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 1cd38d9f3ccee69bb49615c02f610f1c676597bb authored by Elias Kuthe on 04 July 2017, 12:30:05 UTC, committed by Elias Kuthe on 04 July 2017, 12:30:05 UTC
corrected markdown header syntax (see https://daringfireball.net/projects/markdown/syntax#header)
1 parent 309eaaf
  • Files
  • Changes
  • 16c81df
  • /
  • R
  • /
  • skeleton.R
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:1cd38d9f3ccee69bb49615c02f610f1c676597bb
directory badge Iframe embedding
swh:1:dir:601afeb022bee3e7471f0b8dcff84a62082afdb4
content badge Iframe embedding
swh:1:cnt:677d7bc26c2177a0825b2b607d3fab60d2670224
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
skeleton.R
fdrsmooth_cholcache = function(z, lambda, fl0 = NULL) {
	
	
}

lambda = .38
rel_tol = 1e-6
travel = 1
prior_prob = ilogit(beta_hat)
old_objective = sum(-log(prior_prob*f1 + (1-prior_prob)*f0)) + lambda * sum(abs(fl0$r))
converged = FALSE
while(!converged) {
	# E step
	m1 = prior_prob*f1
	m0 = (1-prior_prob)*f0
	post_prob = m1/(m1+m0)
	
	# Partial M step: one ADMM iteration, analogous to a single Newton iteration
	weights = prior_prob*(1-prior_prob)
	y = beta_hat - (prior_prob - post_prob)/weights
	fl0 = fit_graphfusedlasso_cholcache(y, lambda=lambda, D=D, chol_factor=chol_factor, weights=weights,
		initial_values = fl0, rel_tol = rel_tol, alpha=1.8, adaptive=FALSE)
	beta_hat = fl0$x
	prior_prob = ilogit(beta_hat)
	
	# Check relative convergence
	new_objective = sum(-log(prior_prob*f1 + (1-prior_prob)*f0)) + lambda * sum(abs(fl0$r))
	travel = abs(new_objective - old_objective)
	old_objective = new_objective
	converged = {travel/(old_objective + rel_tol) < rel_tol}
}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API