Code Monkey home page Code Monkey logo

comorbid-graphs's People

Contributors

pomodoren avatar

Watchers

 avatar  avatar

comorbid-graphs's Issues

Merge: Multiple subgraphs should be mergeable.

cg_res1 = cg.simple_search('pain', ComorbidGraphNode)
cg_res2 = cg.advanced_search(
     'ache inc_ancestor:nervous system symptom exc_ancestor:pain',
     node_type=ComorbidGraphNode
)
subgraph_list = [cg_res1, cg_res2]
resulting_merged_subgraph = cg.merge(subgraph_list=subgraph_list)
resulting_merged_subgraph.explore()

Wiki: Extract categories

Recursive extraction of wikipedia categories together with lists.
Store the info as:

name: page_name
url: wikipedia.org/page_name

Multiparent: Hashtag parent

Introduction of multiparents should allow the graph properties.
Closed dependencies should allow for checks in this tree or not when loading from tree.

# closed-dependencies: checks whether all parents are in the hierarchy
# if not throws error
ComorbidGraph.load_yaml('graph.yaml', closed_dependencies=True)

To be able to do this kind of change, I should allow multiparent actions for each main functionality.

  • load
    • from_tree
    • from_ontology
  • export
  • search
    • select
    • simple search
    • advanced search

Multiparent: Parent Sorting

Allow different lambda's for updating order of parents for each node.

# sample.yaml
name: parent
children:
- name: node-1
  parents:
  - name: parent-1
  - name: parent-2
- name: node-2
  parents: 
  - name: parent-2 
  - name: parent-3 
name: parent-1 
name: parent-2
name: parent-3

Allow sorting by score.

ComorbidGraph
.load_yaml('sample.yaml')
.sort_parents(by_score=['score'])
.to_yaml('sample_ordered.yaml')
# sample.yaml
name: parent
children:
- name: node-1
  score: 1
  parents:
  - name: parent-1
    score: 0.5
  - name: parent-2
    score: 0.2
- name: node-2
  score: 0.8
  parents: 
  - name: parent-2 
    score: 0.3
  - name: parent-3 
    score: 0.1
name: parent-1 
name: parent-2
name: parent-3
ComorbidGraph
.load_yaml('sample.yaml')
.sort_parents(by_name=['parent-1', 'parent-3'])
.to_yaml('sample_ordered.yaml')
# sample_ordered.yaml
name: parent
name: parent-1 
children: 
- name: node-1
  parents:
  - name: parent
  - name: parent-2
name: parent-2
name: parent-3
children: 
  name: node-2
  parents:
  - name: parent
  - name: parent-2 

Multiparent: Closed dependencies for merged

Closed dependencies when merging many graphs.

# closed_dependencies: check for at parent match in the hierarchy
# if not, release 
ComorbidGraph.merge_trees(
  list_of_graphs,
  closed_dependencies=True
)

Wiki: Extract pages

Advanced extraction together with extraction of sections for pages that are not Category or List or some other special word.

DeepCopy: Copying Annotation List

Because of the problem of pointers of objects, we are using deep copy for now.
Still the problem increases in scale if we want to use the results of the search in an analysis sense.
In this case the problem will become more problematic once increase in scale.

Compare: Add side to side comparison

Assume that you have two graphs with shared children-names.
How do you compare these?

  • check where they share names of children - if not compare on bodies
  • if they share names, combine names, create a matrix of comparison

Searching: Define, code, test

  • Define
anxiety, panic attack

inc_parent:DSM-V
inc_title:Disorder
inc_text_longer:300

exc_ancestor:Neurodevelopmental Disorders
  • Code
  • Test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.