class_docstr: An implementation of `"FEATHER-G" <https://arxiv.org/abs/2005.07959>`_
  from the CIKM '20 paper "Characteristic Functions on Graphs: Birds of a Feather,
  from Statistical Descriptors to Parametric Models". The procedure
  uses characteristic functions of node features with random walk weights to describe
  node neighborhoods. These node level features are pooled by mean pooling to
  create graph level statistics.
  
  Args:
      order (int): Adjacency matrix powers. Default is 5.
      eval_points (int): Number of evaluation points. Default is 25.
      theta_max (int): Maximal evaluation point value. Default is 2.5.
      seed (int): Random seed value. Default is 42.
      pooling (str): Permutation invariant pooling function, one of:
                     (:obj:`"mean"`, :obj:`"max"`, :obj:`"min"`). Default is "mean."
class_docstr_tok: ["An","implementation","of","`","``","FEATHER-G","''","<","https",":","\/\/arxiv.org\/abs\/2005.07959",">","`","_","from","the","CIKM","'20","paper","``","Characteristic","Functions","on","Graphs",":","Birds","of","a","Feather",",","from","Statistical","Descriptors","to","Parametric","Models","''",".","The","procedure","uses","characteristic","functions","of","node","features","with","random","walk","weights","to","describe","node","neighborhoods",".","These","node","level","features","are","pooled","by","mean","pooling","to","create","graph","level","statistics",".","Args",":","order","(","int",")",":","Adjacency","matrix","powers",".","Default","is","5.","eval_points","(","int",")",":","Number","of","evaluation","points",".","Default","is","25.","theta_max","(","int",")",":","Maximal","evaluation","point","value",".","Default","is","2.5.","seed","(","int",")",":","Random","seed","value",".","Default","is","42.","pooling","(","str",")",":","Permutation","invariant","pooling","function",",","one","of",":","(",":","obj",":","`","``","mean","''","`",",",":","obj",":","`","``","max","''","`",",",":","obj",":","`","``","min","''","`",")",".","Default","is","``","mean",".","''"]
docstr: Calculating the node features.
  
  Arg types:
      * **graph** *(NetworkX graph)* - The graph of interest.
  
  Return types:
      * **X** *(NumPy array)* - The node features.
docstr_tok: ["Calculating","the","node","features",".","Arg","types",":","*","*","*","graph","*","*","*","(","NetworkX","graph",")","*","-","The","graph","of","interest",".","Return","types",":","*","*","*","X","*","*","*","(","NumPy","array",")","*","-","The","node","features","."]
code: def _create_node_feature_matrix(
      self, graph: nx.classes.graph.Graph
  ) -> np.ndarray:
      """
      Calculating the node features.
  
      Arg types:
          * **graph** *(NetworkX graph)* - The graph of interest.
  
      Return types:
          * **X** *(NumPy array)* - The node features.
      """
      log_degree = np.array(
          [
              math.log(self.degree_fn(node) + 1)
              for node in range(self.n_nodes)
          ]
      )
      log_degree = log_degree.reshape(-1, 1)
  
      clustering_coefficient = np.array(
          [nx.clustering(graph, node) for node in range(self.n_nodes)]
      )
      clustering_coefficient = clustering_coefficient.reshape(-1, 1)
  
      X = np.concatenate([log_degree, clustering_coefficient], axis=1)
      return X
  
file_path: karateclub/karateclub/graph_embedding/feathergraph.py
imports: import math
  from functools import partial
  from typing import List, Callable
  import numpy
  import networkx
  import scipy.sparse
  from karateclub.estimator import Estimator
label_desc: Use image node_id 4 for calling the FeatherGraph obj's underlying member method code with example usage: obj._create_node_feature_matrix(graph) and returns: X