• News
  • Spirituality
    • Dream Interpretation
    • Angel Numbers
    • Tarot
    • Prayers
    • Spells
  • Health
  • Science
  • Celebs
  • Betting

How Are Code Smells Used In Machine Learning?

38.6KShares
644.4KViews

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.

COPYRIGHT_SZ: Published on https://stationzilla.com/code-smells/ by Suleman Shah on 2022-04-26T08:19:29.666Z

Smelling Source Code Using Deep Learning

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.

Share: Twitter | Facebook | Linkedin

About The Authors

Suleman Shah

Suleman Shah

Recent Articles

  • Dreaming About Where I Used To Work - A New Chance Presented To You

    Dream Interpretation

    Dreaming About Where I Used To Work - A New Chance Presented To You

    Dreaming about where I used to work can have either a positive or negative connotation depending on the dreamer. However, it will all depend on how each individual sees it. When a dream appears to be typical, it represents the dreamer's strong personality. On the other side, it may also turn into nightmares, which are a warning of bad luck for the future and also an indication that evil energy is tempting the dreamer.

  • Simba Nagpal - An Indian Actor And Model Who Predominantly Works In Hindi Television

    Celebs

    Simba Nagpal - An Indian Actor And Model Who Predominantly Works In Hindi Television

    Simba Nagpal is a well-known face on Indian television, as well as a model, media personality, participant in reality shows, and influencer on Instagram. After participating in the reality dating program "MTV Splitsvilla" on MTV, he became more well-known to the public.

  • Virajas Kulkarni - Actor, Director, And Writer Primarily Working In The Marathi Television Industry

    Celebs

    Virajas Kulkarni - Actor, Director, And Writer Primarily Working In The Marathi Television Industry

    Actor, director, and writer Virajas Kulkarni is a multi-talented artist. His primary area of employment is in the Marathi television business. Even more, he is a writer and was an assistant director on his mother's first feature film, Rama Madhav. With the movie "Hostel Days," released in 2018, Virajas kicked off his career in the Marathi film industry.

  • Japan Seeks Bomb Threat Faxer To Hundreds Of Schools

    News

    Japan Seeks Bomb Threat Faxer To Hundreds Of Schools

    Multiple schools in Japan received bomb and murder threats through fax. There were threatening faxes sent from a number registered in Tokyo. Messages demanded ransoms of 300,000 to 3,000,000 Japanese yen. Japan seeks bomb threat faxer to several schools, prompting their immediate closure.

  • Acne Remedies - How To Find The Right Treatment For You

    Health

    Acne Remedies - How To Find The Right Treatment For You

    Acne is a frustratingly pervasive skin problem that may be difficult to cure. Acne remedies extend from natural treatments to traditional treatment options. Acne is caused by the skin producing too much oil, or sebum.

  • Orange Cat Spiritual Meaning - A Symbol Of Good Luck And Fortune

    Spirituality

    Orange Cat Spiritual Meaning - A Symbol Of Good Luck And Fortune

    Orange cat spiritual meaning can vary depending on the culture or belief system. In certain religions, cats are emblems of mystery and magic, and orange cats may be especially spiritual. In certain cultures, cats are emblems of independence and self-sufficiency, and orange cats are especially determined.

  • Webbed Toes Spiritual Meaning - It Is Our Responsibility To Take Charge Of Our Lives

    Spirituality

    Webbed Toes Spiritual Meaning - It Is Our Responsibility To Take Charge Of Our Lives

    Many individuals think webbed toes spiritual meaning to be a lucky charm or an omen of good fortune. Some people even think it's a gift from God. Let's examine the myths, superstitions, and biblical allusions related to this natural phenomenon in more detail.

  • Orion's Belt Spiritual Meaning - A Symbol Of Strength

    Spirituality

    Orion's Belt Spiritual Meaning - A Symbol Of Strength

    Orion's belt spiritual meaning is bisected by the triangle formed by the three stars that make up Orion's Belt. Because it seems to be a belt when worn by the hunter, it is referred to as a "hunter's belt." Amateur astronomers use it frequently since it is one of the most recognizable star patterns.

  • Hole In The Ear Spiritual Meaning - Symbolizes A Life Filled With Good Luck

    Spirituality

    Hole In The Ear Spiritual Meaning - Symbolizes A Life Filled With Good Luck

    The preauricular sinus, or additional hole in the ear spiritual meaning, is a congenital abnormality that exists from birth. Another name for this issue is a preauricular pit or fissure. A little cavity that can be found in front of the ear, on the ear lobe, below, or above the ear is known as the odd preauricular sinus.

  • When A Stray Cat Chooses You Spiritual Meaning

  • Skin Fungus Infection - Treatment And Prevention Strategies For Effective Management

  • Aadhya Anand - An Indian Actress, Model & Dancer

  • Dream Of Dead Father Talking To Me - A Sign Of Bad Luck

  • Life Path 3 And 9 Compatibility - Numerology Guide To Find True Love