Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RedditGraph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
RedditGraph
Commits
f36d5d39
Commit
f36d5d39
authored
May 14, 2020
by
Mark Winter
Browse files
Options
Downloads
Patches
Plain Diff
Only seed with a single popular topic to keep graph more connected
parent
9e056fde
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#313
failed
May 14, 2020
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
reddit_graph.m
+4
-3
4 additions, 3 deletions
reddit_graph.m
with
4 additions
and
3 deletions
reddit_graph.m
+
4
−
3
View file @
f36d5d39
...
...
@@ -6,11 +6,12 @@ function [G,S,links,link_map] = reddit_graph(tokenObj)
end
% A few constants
graph_params
=
struct
(
'max_depth'
,{
3
},
'link_limit'
,{
1
0
},
'comment_limit'
,{
1
0
},
'ignore_users'
,{{
'[deleted]'
;
'AutoModerator'
}});
graph_params
=
struct
(
'max_depth'
,{
5
},
'link_limit'
,{
2
0
},
'comment_limit'
,{
2
0
},
'ignore_users'
,{{
'[deleted]'
;
'AutoModerator'
}});
%% Load first link_limit /r/<subreddit>/hot entries and start building user graph
%% Load first /r/<subreddit>/hot entries and start building user graph
% NOTE: Seed with a single entry so we always have a connected graph
subreddit
=
'math'
;
req
=
sprintf
(
'r/%s/hot?limit=%d'
,
subreddit
,
graph_params
.
link_limit
);
req
=
sprintf
(
'r/%s/hot?limit=%d'
,
subreddit
,
1
);
r
=
reddit_query
(
req
,
tokenObj
);
%% Major structures for checkpointing and graph-linkup
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment