Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
e7ea9213
Commit
e7ea9213
authored
Apr 20, 2015
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TEST] cooc > 2 and xs - ys
parent
ec23bcc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
functions.py
analysis/functions.py
+4
-4
No files found.
analysis/functions.py
View file @
e7ea9213
...
@@ -66,7 +66,7 @@ def create_whitelist(user, corpus_id, size=size):
...
@@ -66,7 +66,7 @@ def create_whitelist(user, corpus_id, size=size):
GROUP BY
GROUP BY
ngX.id
ngX.id
Having
Having
COUNT(*) >=
1
COUNT(*) >=
3
ORDER BY
ORDER BY
occurrences DESC
occurrences DESC
LIMIT
LIMIT
...
@@ -128,8 +128,6 @@ def create_cooc(user=None, corpus_id=None, whitelist=None, size=size, year_start
...
@@ -128,8 +128,6 @@ def create_cooc(user=None, corpus_id=None, whitelist=None, size=size, year_start
whitelistY.node_id =
%
s
whitelistY.node_id =
%
s
AND
AND
nngX.ngram_id < nngY.ngram_id -- so we only get distinct pairs of ngrams
nngX.ngram_id < nngY.ngram_id -- so we only get distinct pairs of ngrams
AND
score > 2
GROUP BY
GROUP BY
ngX.id,
ngX.id,
...
@@ -208,8 +206,10 @@ def get_cooc(request=None, corpus_id=None, cooc_id=None, type='node_link', size=
...
@@ -208,8 +206,10 @@ def get_cooc(request=None, corpus_id=None, cooc_id=None, type='node_link', size=
# top inclus
# top inclus
#n = ( xs + ys) / (2 * (x.shape[0] -1))
#n = ( xs + ys) / (2 * (x.shape[0] -1))
# top specific
# top specific
?
m
=
(
xs
-
ys
)
/
(
2
*
(
x
.
shape
[
0
]
-
1
))
m
=
(
xs
-
ys
)
/
(
2
*
(
x
.
shape
[
0
]
-
1
))
# top generic ?
#m = ( ys - ss) / (2 * (x.shape[0] -1))
#m = pd.DataFrame.abs(m)
#m = pd.DataFrame.abs(m)
n
=
n
.
sort
(
inplace
=
False
)
n
=
n
.
sort
(
inplace
=
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment