GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PIPredictor/PIPAddFeaturesUpToYearN_npub.m at master · ofanoyi/PIPredictor

Expand file tree

/

PIPAddFeaturesUpToYearN_npub.m

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
52 lines (44 loc) · 2.02 KB
/

PIPAddFeaturesUpToYearN_npub.m

Copy path

File metadata and controls

52 lines (44 loc) · 2.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function s = PIPAddFeaturesUpToYearN_npub(s, N)
% s = PIPAddFeaturesUpToYearN_npub(s, N)
% add number of publication (count and rate) statistics to struct s through year N
for I=1:length(s)
% disp([num2str(I/length(s)*100,3) '%']);
% assume sorted
% sort by date
%[~,ind] = sort(s(I).DateNums);
%s(I).DateNums = s(I).DateNums(ind);
%s(I).PMIDs = s(I).PMIDs(ind);
%s(I).AuthorPositions = s(I).AuthorPositions(ind);
%s(I).is_PI = s(I).is_PI(ind);
%s(I).NumAuthors = s(I).NumAuthors(ind);
% time from start
years_since_first_pub = (s(I).DateNums-min(s(I).DateNums))./365.2425;
for J=N
Jstr = num2str(J);
s(I).AuthorPositions = reshape( s(I).AuthorPositions , size(s(I).NumAuthors) );
ind_time = years_since_first_pub' <= J & ~s(I).is_PI & (s(I).AuthorPositions ~= s(I).NumAuthors)';
%ind_time = years_since_first_pub' <= J & ~s(I).is_PI; % time until J or until PI, whichever comes first
active_science_time = max(years_since_first_pub(ind_time));
if isempty(active_science_time)
active_science_time = nan;
end
AP = s(I).AuthorPositions(ind_time);
NA = s(I).NumAuthors(ind_time);
PMID = s(I).PMIDs(ind_time);
% PMID
PMID_all = PMID;
PMID_as_first = PMID(AP==1 & NA>1);
PMID_as_second = PMID(AP==2 & NA>2);
PMID_as_middle = PMID(AP>=3 & AP<NA);
% npubs
s(I).(genvarname(['np_ty_' Jstr])) = length(PMID_all);
s(I).(genvarname(['np_as_first_ty_' Jstr])) = length(PMID_as_first);
s(I).(genvarname(['np_as_second_ty_' Jstr])) = length(PMID_as_second);
s(I).(genvarname(['np_as_middle_ty_' Jstr])) = length(PMID_as_middle);
% norm by active time fix empty!!!!!!!!!!!!!!!!!!!!
s(I).(genvarname(['np_ty_' Jstr '_py'])) = length(PMID_all) ./ active_science_time;
s(I).(genvarname(['np_as_first_ty_' Jstr '_py'])) = length(PMID_as_first) ./ active_science_time;
s(I).(genvarname(['np_as_second_ty_' Jstr '_py'])) = length(PMID_as_second) ./ active_science_time;
s(I).(genvarname(['np_as_middle_ty_' Jstr '_py'])) = length(PMID_as_middle) ./ active_science_time;
end
end
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.