Monday, June 20, 2022

Programming languages for AI: a meta-analysis of popularity

Introduction

There are many articles about which programming languages an AI engineer should be familiar with. While there are frequent similarities between these lists, comparing them is difficult. In this post, I'll briefly report on a quick metanalysis of these articles, with an eye to producing a ranked list of programming languages that balances popularity and rating.

Methodology

The data I used in this analysis came from 24 different articles. To ensure that the data was mostly current, I restricted the articles to those that had been either published or updated since the beginning of 2020. I also checked that each article was from a different author, to prevent duplication. Where several languages were ranked the same on the list, I recorded them as separate entries with the same rank.

Results

The lists were of varying lengths, the minimum was five and the maximum was 12. The most frequent list length was ten, with a mean of 8 and median of 9.

I analysed the lists in three ways:

  1. The frequency at which a language appeared in the lists, regardless of position on the list;
  2. The median rank assigned to each language across all lists in which it appears, and;
  3. A weighted median rank, where the median rank of the language was weighted according to the frequency at which it appeared in lists. This corrects for outliers that were highly ranked on only a small number of lists.
Below are the top ten ranked languages, for each analysis method.

In order of frequency, the top ten languages for AI are:

  1. Python
  2. Java
  3. R
  4. C++
  5. Lisp
  6. Julia
  7. Prolog
  8. Haskell
  9. JavaScript
  10. Scala

In order of median rank:

  1. Python
  2. Java
  3. C
  4. C#
  5. R
  6. C++
  7. Lisp
  8. JavaScript
  9. Prolog
  10. Julia
Note that this is only the median ranks of languages, regardless of how frequently they are listed. This has the effect of pushing some languages, such as C, higher up the list than they would otherwise be. This is corrected by the weighted median rank.

The top ten languages for AI, as ordered by weighted median rank, are:
  1. Python
  2. Java
  3. R
  4. C++
  5. Lisp
  6. Prolog
  7. Julia
  8. Haskell
  9. JavaScript
  10. Scala

As this listing accounts for both rankings of languages, and the frequency at which the language appears in the articles, I consider this to be the most informative.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.