Close Menu
    Trending
    • What comes next for AI copyright lawsuits?
    • Why PDF Extraction Still Feels LikeHack
    • GenAI Will Fuel People’s Jobs, Not Replace Them. Here’s Why
    • Millions of websites to get ‘game-changing’ AI bot blocker
    • I Worked Through Labor, My Wedding and Burnout — For What?
    • Cloudflare will now block AI bots from crawling its clients’ websites by default
    • 🚗 Predicting Car Purchase Amounts with Neural Networks in Keras (with Code & Dataset) | by Smruti Ranjan Nayak | Jul, 2025
    • Futurwise: Unlock 25% Off Futurwise Today
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Machine Learning»From Numbers to Notes: Predicting Music Trends with Machine Learning 🎵📊 | by Lucy Mulei | Mar, 2025
    Machine Learning

    From Numbers to Notes: Predicting Music Trends with Machine Learning 🎵📊 | by Lucy Mulei | Mar, 2025

    Team_AIBS NewsBy Team_AIBS NewsMarch 28, 2025No Comments3 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Now that our dataset is clear and preprocessed (because of Milestone 1), it’s time to construct machine studying fashions to foretell track reputation based mostly on options like streams, playlists, and audio traits.

    We have to predict whether or not a track is well-liked/successful or not.

    • We outline reputation based mostly on the variety of streams.
    • We convert streams right into a binary classification (well-liked vs not well-liked)
    • Drop any lacking values to scrub dataset.
    loading the dataset and binary classification.
    It defines well-liked/hit songs as these within the 10% most streamed.
    Options are chosen for use in figuring out reputation

    ✅ Now, we have now a classification drawback:

    • 1 → In style track/Hit track (above median streams)
    • 0 → Not well-liked track /Not hit track (beneath median streams)

    Earlier than coaching, we break up our dataset into coaching (80%) and testing (20%).

    Standardizes options so that they have a imply of 0 and commonplace deviation of 1. Prevents some options from dominating the mannequin (e.g., BPM Standardizes options so that they have a imply of 0 and commonplace deviation of 1

    Stratified sampling ensures each coaching and take a look at units have a balanced variety of well-liked and non-popular songs.

    Since our drawback is a classification drawback, we opted to strive the next ✅ Logistic Regression — Easy and interpretable.
    ✅ Random Forest — Can deal with advanced relationships.

    We used Logistic Regression to foretell whether or not a track is well-liked based mostly on options like BPM, dancebility, vitality and acousticness.

    Implementation of Logistic Regression. It makes use of the skilled mannequin to foretell whether or not a songs within the take a look at set are well-liked.
    Printing of precision, recall and F1-score on the high
    and code for Confusion Matrix on the backside
    Visualisation of Confusion Matrix
    Helps perceive false positives and false negatives

    We used Random Forest to foretell whether or not a track is a “hit” or “not successful” based mostly on its options.

    Loading the dataset is the primary setep. It purported to predict whether or not a track is a “hit” based mostly on its options. y is the goal, the place “hit” is probably going a binary classification (1 for hit, 0 for not successful).
    Random Forest is an ensemble studying methodology that trains a number of resolution bushes and averages their prediction
    This code:
    1. Makes Predictions on the take a look at set.
    2. Evaluates Efficiency (Accuracy, Classification Report, and Confusion Matrix).
    3. Shows Function Significance (which options contribute most to the mannequin).
    4. Visualizes the Confusion Matrix.
    Precision: What number of predicted hits have been truly hits?
    Recall: What number of precise hits have been appropriately predicted?
    F1-score: Steadiness of precision and recall
    energy_%” is crucial characteristic, that means it has the very best affect on figuring out successful.
    • Random Forest is strong and works nicely with each imbalanced and high-dimensional knowledge.
    • Function significance helps determine which elements contribute probably the most to predicting successful.
    • If recall for hits (1) is low, knowledge balancing or hyperparameter tuning could also be wanted.

    ✅ Transformed ‘streams’ right into a binary classification drawback (well-liked vs. not well-liked).
    ✅ Educated two fashions: Logistic Regression and Random Forest
    ✅ Evaluated mannequin efficiency utilizing accuracy, precision, recall, and F1-score.

    Try our repository on Github!!



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleSurvey: 84% Say AI Won’t Replace Low-Code and No-Code Tools
    Next Article How to Better Support Your Employees’ Well-Being
    Team_AIBS News
    • Website

    Related Posts

    Machine Learning

    Why PDF Extraction Still Feels LikeHack

    July 1, 2025
    Machine Learning

    🚗 Predicting Car Purchase Amounts with Neural Networks in Keras (with Code & Dataset) | by Smruti Ranjan Nayak | Jul, 2025

    July 1, 2025
    Machine Learning

    Reinforcement Learning in the Age of Modern AI | by @pramodchandrayan | Jul, 2025

    July 1, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    What comes next for AI copyright lawsuits?

    July 1, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    What Worked (and Didn’t) When I Modernized a 20-Year-Old Brand

    May 20, 2025

    Morgan Stanley Builds AI Tool That Fixes Major Coding Issue

    June 3, 2025

    Practical SQL Puzzles That Will Level Up Your Skill

    March 5, 2025
    Our Picks

    What comes next for AI copyright lawsuits?

    July 1, 2025

    Why PDF Extraction Still Feels LikeHack

    July 1, 2025

    GenAI Will Fuel People’s Jobs, Not Replace Them. Here’s Why

    July 1, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.