ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Word cloud
    Data/Machine learning 2020. 9. 12. 15:34

    Easy way to generate a word cloud:

    By using a library named "wordcloud": https://github.com/amueller/word_cloud

    Simple example

    from wordcloud import WordCloud    
    
    word_string = 'oh oh oh oh ........ culture black culture black culture'
    
    wordcloud = WordCloud(width=1600, height=800, collocations = False).generate(word_string)
    # 'width', 'height' increases a resolution of the image
    # 'collocations=False' prevents repeating words
    
    plt.figure(figsize=(30, 10))
    plt.imshow(wordcloud)
    plt.axis("off")

    output

     

    'Data > Machine learning' 카테고리의 다른 글

    Weights & Biases (W&B) Tutorial: TF2  (0) 2020.10.08
    Bayesian Optimization  (0) 2020.10.07
    DLD, Daejeon Learning Day  (0) 2020.09.11

    Comments