{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Machine Learning","type":"markdown"},"seo":{"title":"Network Analysis","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"network-analysis","__idx":0},"children":["Network Analysis"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This notebook runs network analysis of the table specified by the  ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["input_table"]}]}," parameter."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"assumed-input","__idx":1},"children":["Assumed Input"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["input_table"]}," , this notebook assumes a transition matrix that consists of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source, target, and weight/count"]}," columns.",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[" A sample table:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"source"},"children":["source"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"target"},"children":["target"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"weight/count"},"children":["weight/count"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["google.com"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/learn"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["10"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["google.com"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["7.354033"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NULL"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5.698033"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/about"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/about"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4.249822"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["NULL"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/press_release_jp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4.034131"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"expected-outputs","__idx":2},"children":["Expected Outputs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This notebook outputs visualization of transitions. Supported network visualization methods:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Directed Graph Visualization using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://networkx.org/"},"children":["networkx"]},". Graph nodes are weighted and connected based on ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/PageRank"},"children":["PageRank"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sankey Diagram Visualization using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://plotly.com/python/sankey-diagram/"},"children":["Plotly"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some sample network analysis visualizations are as follows:",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-2-28_11-52-41.c112eacfe6a8ab6e2d36f438c0f55f1891312ca55bfcf43917793f54844d33dc.3cb60505.png","alt":""},"children":[]}," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-2-28_11-53-33.7be074b8b23c83fee9726bcfde0300f6e480090ea2ab700524003b3e2647e0ff.3cb60505.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"workflow-example","__idx":3},"children":["Workflow Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Find a sample workflow here in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/blob/automl/machine-learning-box/automl/network_analysis.dig"},"children":["Treasure Boxes"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+network_analysis:\n  ipynb>:\n    notebook: network_analysis\n    input_table: ml_datasets.transition_matrix\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":4},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter Name"},"children":["Parameter Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter on Console"},"children":["Parameter on Console"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["docker.task_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Docker Task Mem"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Task memory size. Available values are 64g, 128g (default), 256g, 384g, or 512g depending on your contracted tiers."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["128g"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["input_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Input Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specify a TD table used for analysis as ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["dbname.table_name."]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["limit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Limit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum number of edges to search."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1000"]}]}]}]}]}]},"headings":[{"value":"Network Analysis","id":"network-analysis","depth":1},{"value":"Assumed Input","id":"assumed-input","depth":3},{"value":"Expected Outputs","id":"expected-outputs","depth":3},{"value":"Workflow Example","id":"workflow-example","depth":3},{"value":"Parameters","id":"parameters","depth":3}],"frontmatter":{"seo":{"title":"Network Analysis"}},"lastModified":"2025-11-22T02:43:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/machine-learning/automl/notebook-solutions/network-analysis","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}