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

https://github.com/reproducibilitystamp/dataset-processing
01 July 2024, 16:45:36 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • 661f987
  • /
  • compareTeamsToGS.m
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:2999c9f2714091250fb748485f18d8fd5f730c5b
origin badgedirectory badge Iframe embedding
swh:1:dir:661f9878b0dcd81c5b94c9a9e1d83a37e2b0267a
origin badgerevision badge
swh:1:rev:36fbb80f231a8a564a730b8ad7d2787491b2a696
origin badgesnapshot badge
swh:1:snp:b1ad49e515d895ff17c36aae5e5de23ce6f4066d
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.

  • content
  • directory
  • revision
  • snapshot
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 ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 36fbb80f231a8a564a730b8ad7d2787491b2a696 authored by acarlier on 20 May 2016, 09:34:24 UTC
- comments added
Tip revision: 36fbb80
compareTeamsToGS.m
clear all; close all;
addpath('../')

% Load the dataset
load dataset.mat
% Load the gold standard expert annotations
load goldstandard.mat

% Initialize variable to save team scores
for ind_usr = 1:length(team)
    teams_score{ind_usr} = [];
end

% Go through each goldstandard image
for ind_GS = 1246:1249
   % Select all triplets relative to this image
   triplets_sel = triplets(triplets(:,2)==ind_GS,:);
   
   % Read JSON 
   s = readJSON(['JSON/' shape{ind_GS,2}]);
   
   areas_tri = computeTrianglesArea(s);
   
   % Experts annotations for this gold standard shape
   annot_exp = annotationsGS(tripletsGS(tripletsGS(:,2)==ind_GS,3));
   
     
   % Go through each team annotation
   for ind_t=1:size(triplets_sel,1)
      a_aux = annotations{triplets_sel(ind_t,3)};
      ind_team = triplets_sel(ind_t,1);
      
      % The score for this team is the one that has the highest resemblance
      % with one of the expert annotations
      max_score = -Inf;
      for ind_e=1:length(annot_exp)
        if  annotationDistance(a_aux,annot_exp{ind_e},areas_tri)>max_score
            max_score = annotationDistance(a_aux,annot_exp{ind_e},areas_tri);
        end
      end
      
      teams_score{ind_team} = [teams_score{ind_team} max_score];
   end
   
end


% Post process team scores
scores = NaN*ones(1,length(teams_score));

% All the teams that did not annotate any Gold Standard shape get a NaN
% score
for ind_team = 1:length(scores)
   if (length(teams_score{ind_team})>=1) 
       scores(ind_team) = mean(teams_score{ind_team});
   end
end
    
save('QualityScores','scores')

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

back to top