• Medicine
  • Spirituality
  • Astronomy
  • Sociology
  • Technology
  • History
  • Open Access
  • News

How Are Code Smells Used In Machine Learning?

The code smells catalogue assists data scientists and programmers in the creation and maintenance of high-quality machine learning program code. Machine learning has grown in prominence in recent years. Machine learning techniques have been intensively researched in academia and are utilised in industry to provide economic value. However, requirements for code quality in machine learning applications are lacking. Code smells, in particular, have received little attention in this sector. Although machine learning code is typically implemented as a minor component of a larger system, it plays a vital role in its core functionality. As a result, making sure the code is good is important to avoid problems in the long run.

A group of researchers from Delft University of Technology and AI for Fintech Research in the Netherlands led by Haiyin Zhang, Lus Cruz, and Arie van Deursen proposed and identified a list of 22 machine learning-specific code smells culled from papers, grey literature, GitHub commits, and Stack Overflow posts. They highlighted each odour with a description of its background, potential long-term difficulties, and offered solutions. There was evidence from both academic and non-academic sources that they also linked them to the right pipeline stage.

Code Smells Collection And Description

The researchers used academic literature, grey literature, community-based coding Q&A platforms (like Stack Overflow), and public software repositories to collect machine learning-specific code smells (with GitHub). They mined articles, grey literature, reused existing bug datasets, and conducted Stack Overflow mining as well. They then triangulated their gathered odours with the recommendations offered in the machine learning library's official documentation. Finally, the code smell catalogue was validated.

There were a total of 22 machine learning-specific code odours that were collected and described. The researchers presented a broad explanation for each smell, followed by the setting of the smell, the problem with its presence, and the solution. Finally, they summarised all of the scents, including the references that support the smell, the stage of the machine learning pipeline where they are most important, and the major effect of having those smells.

Implications

The catalogue investigates recurring code issues from many sources to assist in understanding prevalent errors in machine learning application development. Because many data scientists lack software engineering experience and are not up to date on software engineering best practises, their catalogue of smells helps to overcome this barrier by offering some guidance for designing machine learning applications. New versions of machine learning libraries are released on a regular basis. They re-used the "TensorFlow Bugs" replication package and discovered that several instances had been deprecated due to TensorFlow's upgrading to version 2. As a result, they anticipated that new API-specific code smells will emerge with new library versions and features. In reality, the findings suggest that the majority of API-related odours are only recorded in grey literature rather than in literature. Compiling a catalogue of code smells aids in the promotion of a collaborative effort between practitioners and academics. Because the ecosystem of artificial intelligence frameworks is changing so quickly, some smells may become obsolete in the meanwhile.

They predicted that three code smells in their catalogue would be deemed temporary: Dataframe Conversion API Misused, Matrix Multiplication API Misused, and Gradients Not Cleared Before Backward Propagation. Temporary smells may be deprecated after a few years, whilst some smells are considered to last a long time. However, these three smells are significant and should be recognised to assist practitioners in preventing problems down the road.

Conclusion

They gathered the code smells from a variety of sources, including mining 1750 publications, mining 2170 grey literature items, utilising existing bug datasets, which included 88 Stack Overflow posts and 87 GitHub commits, and gathering 403 complimentary Stack Overflow postings. They examined the pitfalls described in the blogs and assessed whether or not to consider them a code smell. They gathered 22 odours from the code, including generic and API-specific smells. They also classified the code smell according to the pipeline phases and its impact. This has aided the machine learning community in improving code quality. It would be interesting to find out how common these code smells are in real-world machine learning systems and how useful it would be to have a list of machine learning-specific code smells.

About The Authors

Suleman Shah

Suleman Shah - Suleman Shah is a researcher and freelance writer. As a researcher, he has worked with MNS University of Agriculture, Multan (Pakistan) and Texas A & M University (USA). He regularly writes science articles and blogs for science news website immersse.com and open access publishers OA Publishing London and Scientific Times. He loves to keep himself updated on scientific developments and convert these developments into everyday language to update the readers about the developments in the scientific era. His primary research focus is Plant sciences, and he contributed to this field by publishing his research in scientific journals and presenting his work at many Conferences. Shah graduated from the University of Agriculture Faisalabad (Pakistan) and started his professional carrier with Jaffer Agro Services and later with the Agriculture Department of the Government of Pakistan. His research interest compelled and attracted him to proceed with his carrier in Plant sciences research. So, he started his Ph.D. in Soil Science at MNS University of Agriculture Multan (Pakistan). Later, he started working as a visiting scholar with Texas A&M University (USA). Shah’s experience with big Open Excess publishers like Springers, Frontiers, MDPI, etc., testified to his belief in Open Access as a barrier-removing mechanism between researchers and the readers of their research. Shah believes that Open Access is revolutionizing the publication process and benefitting research in all fields.

Recent Articles

  • Stone Age Humans Conducted Surgical Amputation, A New Study Finds Evidence

    Stone Age Humans Conducted Surgical Amputation, A New Study Finds Evidence

    Scientific investigation in Borneo has unearthed the world's first documented instance that stone age humans conducted surgical amputation. This discovery represents a significant achievement in the annals of human prehistory.

  • 180 Tips - Best Website For Football Prediction And Tips

    180 Tips - Best Website For Football Prediction And Tips

    How can you beat the best odds at the most well-known online bookmakers when betting on soccer matches? Today's 180 Tips forecasts from Betwinner360 include a record of winning methods. 180 tips provides in-depth research of more than 50 different football leagues, betting tactics organized by market, and expert predictions for each match.

  • Virgo And Sagittarius Compatibility - Great Conversations

    Virgo And Sagittarius Compatibility - Great Conversations

    Virgo and Sagittarius's compatibility is such that they are attracted to one another right away. They base their first interactions on how well they get along in conversation, which comes naturally to them both. These changeable signs will enjoy every minute of talking to each other to death! They engage in frenzied arguments, lengthy philosophical discussions, and fast banter.

  • Pisces And Aquarius Compatibility - Creative Brilliance

    Pisces And Aquarius Compatibility - Creative Brilliance

    Pisces and Aquarius compatibility is such that these two are masters of manifestation while working together. When Aquarians let go of their rigid views, they become natural alchemists who are capable of creating with their creative brilliance. Because of their more flexible and understanding nature, Pisces may assist them in becoming less stuck and releasing their boundless creative potential.

  • Pisces And Scorpio Compatibility - Best Match For Love

    Pisces And Scorpio Compatibility - Best Match For Love

    Pisces and Scorpio compatibility is that they have an innate knowledge of one another, even though they are frequently mysterious to others. These two are irresistibly attracted to each other because they feel like they understand each other but don't say it out loud. They seem to have a psychic connection because they can easily tune into one another's brains.

  • A Massive 7.6 Earthquake Rocks Papua New Guinea

    A Massive 7.6 Earthquake Rocks Papua New Guinea

    On Sunday, a massive 7.6 earthquake rocks Papua New Guinea, causing landslides, cracking roads, and damaging houses. It is currently unknown how extensive the damage is; however, there is debris scattered over the highways and fissures popping up in the roads. According to the United States Geological Survey, the epicenter of the earthquake was located at a depth of 90 kilometers, or around 56 miles, and was close to the town of Kainantu, which has a population of approximately 8,500 people.

  • Most Frequent Angel Numbers You Keep Seeing Is Luck Or Unlucky

    Most Frequent Angel Numbers You Keep Seeing Is Luck Or Unlucky

    The most frequent angel numbers you keep seeing are distinct from other forms of esoterica in that they have no connection to the date that you were born. In numerology, every number has a meaning. Nevertheless, certain number sequences are more prevalent than others. Because all of us have come across them, three-digit angel numbers are widespread.

  • Pisces And Leo Compatibility Is Quite Strong

    Pisces And Leo Compatibility Is Quite Strong

    Leo will inevitably rule Pisces in some aspect of life, Pisces and Leo compatibility whether it is in terms of work, friendship, or love. However, as Leos are kind and loving rulers who have no malice in their hearts, and since the fish don't mind being ruled if it's done with warmth and love, this isn't always a terrible thing.

  • Angel Number 6666 Meaning - A Sign That Your Heart Is Full Of Love

    Angel Number 6666 Meaning - A Sign That Your Heart Is Full Of Love

    If you keep seeing the same number in your life, it's not a coincidence. The angels use Angel Number 6666 meaning to send you an important message. If you can clearly interpret the message of angel number 6666, it will serve you well. This number appears in your life directly from the divine realm.