Terms by Cluster FrameΒΆ

Example

>>> from techminer2.experimental.emergence import TermsByClusterDataFrame
>>> from techminer2.thesaurus.descriptors import ApplyThesaurus, InitializeThesaurus
>>> # Restore the column values to initial values
>>> InitializeThesaurus(root_directory="examples/fintech/", quiet=True).run()
>>> ApplyThesaurus(root_directory="examples/fintech/", quiet=True).run()
>>> # Generate terms by cluster data frame
>>> df = (
...     TermsByClusterDataFrame()
...     #
...     # EMERGENCE:
...     .using_baseline_periods(3)
...     .using_recent_periods(3)
...     .using_novelty_threshold(0.15)
...     .using_total_records_threshold(7)
...     .using_periods_with_at_least_one_record(3)
...     .using_ratio_threshold(0.5)
...     .using_minimum_terms_in_cluster(5)
...     #
...     # NETWORK:
...     .using_clustering_algorithm_or_dict("louvain")
...     .using_association_index("association")
...     #
...     # DATABASE:
...     .where_root_directory_is("examples/fintech/")
...     .where_database_is("main")
...     .where_record_years_range_is(None, None)
...     .where_record_citations_range_is(None, None)
...     .where_records_match(None)
...     #
...     .run()
... )
>>> # Display the resulting data frame
>>> print(df.to_string()) 
                  0
0       DATA 7:1086
1  CONSUMERS 7:0925