[PYTHON] I considered the machine learning method and its implementation language from the tag information of Qiita

at first

First post.

When I was in college, I made a program to determine the positive and negative of travel site reviews using SVM (Support Vector Machine). At that time, I was using Python, but are there many languages that are different from other machine learning methods? Is anything other than Python popular now? I thought, so I considered it by collecting Qiita tag information.

First, extract 100 articles tagged with machine learning methods (SVM, Logistic regression, etc.) using the API, and check the other tags of the articles to see which language they are written in. (It's a nori to tag the language together.)

It's a practice of QiitaAPI, so it doesn't matter if it's correct or not. By the way, the search name is ↓.

Method Search name
Linear regression Linearregression
Logistic regression Logisticregression
Support vector machine SVM
Decision tree decisiontree
Random forest randomforest
neural network NeuralNetwork
Naive bayes NaiveBayes
k-means k-means
Principal component analysis PCA
Deep learning DeepLearning

code

QiitaAPItest.js


//Load the axios module
const axios = require('axios');

//MLName:Machine learning method
//MLSearchName:Name to search
//Get tags from 100 articles tagged with MLSearchName[Tag name: number]Returns in the list of.
async function taglist(MLName, MLSearchName) {
  var rtList={};
  let response = await axios.get('https://qiita.com/api/v2/items?per_page=100&page=1&query=tag:'+MLSearchName);
  for (let i = 0; i < response.data.length; i++) {
    for (let j = 0; j < response.data[i].tags.length; j++) {
      if(rtList[response.data[i].tags[j].name]){
        rtList[response.data[i].tags[j].name] +=1;
      }
      else{
        rtList[response.data[i].tags[j].name] =1;
      }
    }
  }

  //Sort in descending order
  var keys=[];
  for(var key in rtList)keys.push(key);
  function Compare(a,b){
    return rtList[b]-rtList[a];    
  }
  keys.sort(Compare);

  console.log('\n' + MLName);

  //Top 5 items displayed
  for(let i = 0; i < 6; i++){   
    console.log(keys[i] + ':' + rtList[keys[i]]);
  }
}

taglist('Linear regression','Linearregression');
taglist('Logistic regression','Logisticregression');
taglist('Support vector machine','svm');
taglist('Decision tree','decisiontree');
taglist('Random forest','randomforest');
taglist('neural network','NeuralNetwork');
taglist('Naive bayes','NaiveBayes');
taglist('k-means','k-means');
taglist('Principal component analysis','PCA');
taglist('Deep learning','DeepLearning');

Results / Discussion

Extracted tags, 5 in descending order of number

Method Tag 1 Tag 2 Tag 3 Tag 4 Tag 5
Linear regression MachineLearning Python Machine learning memo coursera
Logistic regression Python MachineLearning scikit-learn classification Marketing
Support vector machine Machine learning Python scikit-learn MachineLearning Machine learning入門
Decision tree Python MachineLearning Machine learning Decision tree randomForest
Random forest Python Machine learning MachineLearning scikit-learn Kaggle
neural network DeepLearning Python Machine learning AI MachineLearning
Naive bayes Python MachineLearning Machine learning scikit-learn svm
k-means Python Machine learning Clustering scikit-learn MachineLearning
Principal component analysis Python Machine learning Principal component analysis Python3 K-means:6
Deep learning Python Machine learning PyTorch TensorFlow Keras

** All Python! ** ** I was wondering if R would come out, but Python seems to be popular. Python is easy, isn't it? After learning C and Java, using Python was too easy and trembled. I also googled why Python is so popular.

Discussion on the advantages and disadvantages of Python

I was wondering if I could put a link other than Qiita, so I didn't put it. If you google for "Reason for Python popularity", you will find many.

Summary ** ・ Easy to write code ・ Many platforms are available ・ Abundant library ** Seems to be the reason.

Is it the reason why many libraries are chosen especially in machine learning? However, machine learning inevitably becomes a large process in the learning process. In that respect, Python is an interpreted type, so it's a groaning machine power. Is it the same with the compiled type?

After spending a day learning, I often get errors with shit-like code mistakes. The interpreter type is not bad. I'm bad.

Afterword

There are still issues with how to search for API articles. ・ Cannot search including spaces (eg Deep Learning) ・ Cannot search in Japanese Qiita API https://qiita.com/api/v2/items?per_page=100&page=1&query=tag: It is necessary to study the following description method a little more.

Recommended Posts

I considered the machine learning method and its implementation language from the tag information of Qiita
[Deep Learning from scratch] Implementation of Momentum method and AdaGrad method
I tried calling the prediction API of the machine learning model from WordPress
Basic machine learning procedure: ③ Compare and examine the selection method of features
[Python] Get user information and article information with Qiita API
I considered the machine learning method and its implementation language from the tag information of Qiita
Get the number of views of Qiita
Get and visualize google search trends
Get the number of articles accessed and likes with Qiita API + Python
Get delay information on Twitter and tweet
[Python] Visualize the information acquired by Wireshark
Get the top nth values in Pandas
Get the address from latitude and longitude
Deep Learning from scratch The theory and implementation of deep learning learned with Python Chapter 3
[Python] I thoroughly explained the theory and implementation of support vector machine (SVM)
About testing in the implementation of machine learning models
Othello ~ From the tic-tac-toe of "Implementation Deep Learning" (4) [End]
[CodeIQ] I wrote the probability distribution of dice (from CodeIQ math course for machine learning [probability distribution])
A concrete method of predicting horse racing by machine learning and simulating the recovery rate
I tried to verify the yin and yang classification of Hololive members by machine learning
[Machine learning] I tried to summarize the theory of Adaboost
[Qiita API] [Statistics • Machine learning] I tried to summarize and analyze the articles posted so far.
I want to extract the tag information (title and artist) of a music file (flac, wav).
I tried to make Othello AI with tensorflow without understanding the theory of machine learning ~ Implementation ~
[Python] I thoroughly explained the theory and implementation of logistic regression
[Python] I thoroughly explained the theory and implementation of decision trees
I tried to summarize the frequently used implementation method of pytest-mock
Significance of machine learning and mini-batch learning
Note that I understand the algorithm of the machine learning naive Bayes classifier. And I wrote it in Python.
Ford-Fulkerson Method and Its Applications-Supplement to Chapter 8 of the Algorithm Quick Reference-
Notify the chat of new articles of Qiita Organization and improve the learning efficiency of the organization!
Implementation and experiment of convex clustering method
[Machine learning] OOB (Out-Of-Bag) and its ratio
(Machine learning) I learned principal component analysis, which is a useful method for reducing a large amount of features, and considered expanding it to the manufacturing industry (especially machine equipment maintenance).
Othello-From the tic-tac-toe of "Implementation Deep Learning" (3)
Learning notes from the beginning of Python 1
Machine learning algorithm (implementation of multi-class classification)
Machine learning algorithm classification and implementation summary
I read the implementation of golang channel
Learning notes from the beginning of Python 2
Othello-From the tic-tac-toe of "Implementation Deep Learning" (2)
Evaluation method of machine learning regression problem (mean square error and coefficient of determination)
I compared the speed of go language web framework echo and python web framework flask
Build a python environment to learn the theory and implementation of deep learning
I tried to predict the presence or absence of snow by machine learning.
I tried to process and transform the image and expand the data for machine learning
Implementation of a model that predicts the exchange rate (dollar-yen rate) by machine learning
I tried hitting the Qiita API from go
I read the implementation of range (Objects / rangeobject.c)
[Learning memo] Deep Learning from scratch ~ Implementation of Dropout ~
Overview of machine learning techniques learned from scikit-learn
About the development contents of machine learning (Example)
I read and implemented the Variants of UKR
Learning roadmap and recommended books taught by alumni of the Department of Information Systems ~ No.2 ~
Predicting offensive and defensive attributes from the Yu-Gi-Oh! Card name --Yu-Gi-Oh! Data Science 3. Machine Learning
[Machine learning] "Abnormality detection and change detection" Let's draw the figure of Chapter 1 in Python.
I compared the speed of the reference of the python in list and the reference of the dictionary comprehension made from the in list.
Introduction to machine learning ~ Let's show the table of K-nearest neighbor method ~ (+ error handling)
The story of porting code from C to Go and getting hooked (and to the language spec)