madlib-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From orhankislal <...@git.apache.org>
Subject [GitHub] madlib pull request #195: Feature: Add grouping support to HITS
Date Mon, 13 Nov 2017 18:49:21 GMT
Github user orhankislal commented on a diff in the pull request:

    https://github.com/apache/madlib/pull/195#discussion_r150629575
  
    --- Diff: src/ports/postgres/modules/graph/graph_utils.py_in ---
    @@ -109,6 +110,85 @@ def validate_graph_coding(vertex_table, vertex_id, edge_table, edge_params,
     
         return None
     
    +def validate_params_for_centrality_measures(schema_madlib, func_name,
    +                                            threshold, max_iter,
    +                                            edge_table=None,
    +                                            grouping_cols_list=None):
    +    _assert(not threshold or (threshold >= 0.0 and threshold <= 1.0),
    +            "{0}: Invalid threshold value ({1}), must be between 0 and 1.".
    +            format(func_name, threshold))
    +    _assert(max_iter > 0,
    +            """{0}: Invalid max_iter value ({1}), must be a positive integer.""".
    +            format(func_name, max_iter))
    +    if grouping_cols_list:
    +        # validate the grouping columns. We currently only support grouping_cols
    +        # to be column names in the edge_table, and not expressions!
    +        _assert(columns_exist_in_table(edge_table, grouping_cols_list, schema_madlib),
    +                "{0} error: One or more grouping columns specified do not exist!".
    +                format(func_name))
    +
    +def update_output_grouping_tables_for_centrality_measures(temp_summary_table,
    --- End diff --
    
    Maybe a shorter name will help us keeping the lines under 80 characters.


---

Mime
View raw message