>>> import pprint
>>> from sklearn.cluster import KMeans
>>> from techminer2.document_clustering import clusters_to_terms_mapping
>>> mapping = clusters_to_terms_mapping(
... #
... # TERMS:
... field='descriptors',
... retain_counters=True,
... #
... # FILTER PARAMS:
... top_n=50,
... occ_range=(None, None),
... gc_range=(None, None),
... custom_terms=None,
... #
... # ESTIMATOR:
... sklearn_estimator=KMeans(
... n_clusters=4,
... init="k-means++",
... n_init=10,
... max_iter=300,
... tol=0.0001,
... algorithm="lloyd",
... random_state=0,
... ),
... #
... # DATABASE PARAMS:
... root_dir="example/",
... database="main",
... year_filter=(None, None),
... cited_by_filter=(None, None),
... sort_by=None,
... )
>>> pprint.pprint(mapping)
{0: ['INNOVATION 08:0990',
'FINANCIAL_SERVICES_INDUSTRY 06:1370',
'BUSINESS_MODELS 04:1441',
'INFORMATION_SYSTEMS 04:0830',
'BLOCKCHAIN 03:0881',
'FINTECH_REVOLUTION 03:0731',
'BANKING 03:0370',
'STUDY_AIMS 03:0283',
'ACADEMIC_RESEARCH 02:0691',
'CURRENT_STATE 02:0691'],
1: ['FINANCIAL_SERVICE 04:1036',
'NEW_TECHNOLOGIES 02:0773',
'COPYRIGHT_TAYLOR 02:0696',
'FINANCIAL_SERVICES_INDUSTRIES 02:0696'],
2: ['DISRUPTIVE_INNOVATION 02:0759'],
3: ['FINTECH 32:5393',
'FINANCIAL_TECHNOLOGY 18:2519',
'FINANCIAL_SERVICES 12:1929',
'FINANCE 11:1950',
'FINANCIAL_INDUSTRY 09:2006',
'FINTECH_STARTUPS 08:1913',
'FINANCIAL_SECTOR 07:1562',
'INFORMATION_TECHNOLOGY 07:1383',
'FRANCIS_GROUP 05:1227',
'FINTECH_COMPANIES 05:1072',
'FINANCIAL_INNOVATION 05:0401',
'FINANCIAL_INSTITUTIONS 04:0722',
'FINANCIAL_SYSTEM 04:0688',
'ARTIFICIAL_INTELLIGENCE 04:0495',
'FINTECH_SERVICES 04:0468',
'BIG_DATA 04:0467',
'SUSTAINABLE_DEVELOPMENT 04:0306',
'COMMERCE 03:0846',
'FINANCIAL_MARKETS 03:0835',
'DIGITAL_TECHNOLOGIES 03:0631',
'FINANCIAL_INCLUSION 03:0590',
'PRACTICAL_IMPLICATIONS 03:0531',
'FINANCIAL_INSTITUTION 03:0488',
'SURVEYS 03:0484',
'ELSEVIER_LTD 03:0474',
'FINANCIAL_REGULATION 03:0461',
'TECHNOLOGY_ACCEPTANCE_MODEL 03:0405',
'MARKET_PARTICIPANTS 03:0350',
'FINANCIAL_STABILITY 03:0342',
'CROWDFUNDING 03:0335',
'MARKETPLACE_LENDING 03:0317',
'ELECTRONIC_MONEY 03:0305',
'FINTECH_MARKET 03:0297',
'MOBILE_PAYMENT 03:0284',
'SUSTAINABILITY 03:0227']}