Close Menu
    Trending
    • Apple TV+ raises subscription prices worldwide, including in UK
    • How to Build a Business That Can Run Without You
    • Bots Are Taking Over the Internet—And They’re Not Asking for Permission
    • Data Analysis Lecture 2 : Getting Started with Pandas | by Yogi Code | Coding Nexus | Aug, 2025
    • TikTok to lay off hundreds of UK content moderators
    • People Really Only Care About These 3 Things at Work — Do You Offer Them?
    • Can Machines Really Recreate “You”?
    • Meet the researcher hosting a scientific conference by and for AI
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Machine Learning»Project 1: Implementing Data Science and Statistical Analysis on Banking Data | by Code Titan | Aug, 2025
    Machine Learning

    Project 1: Implementing Data Science and Statistical Analysis on Banking Data | by Code Titan | Aug, 2025

    Team_AIBS NewsBy Team_AIBS NewsAugust 14, 2025No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Use the Predictive Mannequin Above and Feed It Person Enter and See the Predictions

    Lastly, we are going to take EducationLevel, MaritalStatus, AccountType, LoanType, InterestRate, CreditLimit as person enter to see what credit_card_risk_type (excessive, low,medium) the skilled prediction mannequin predicts.

    # Outline mappings for categorical enter to integer encoding
    education_levels = {"Excessive College": 0, "Bachelor": 1, "Grasp": 2, "PhD": 3}

    marital_status = {"Single": 0, "Married": 1, "Divorced": 2, "Widowed": 3}

    account_types = {"Checking": 0, "Financial savings": 1, "Credit score Card": 2, "Mortgage": 3}

    risk_type_options = {0: 'Low', 1: 'Medium', 2: 'Excessive'}

    # Operate to get person enter and convert to encoded worth
    def get_user_input(immediate, category_dict):
    whereas True:
    response = enter(immediate)

    if response in category_dict:
    return category_dict[response]
    else:
    print("Invalid entry. Please select one in every of:", checklist(category_dict.keys()))

    # Operate to get numerical enter and validate it
    def get_numerical_input(immediate):
    whereas True:
    strive:
    worth = float(enter(immediate))
    return worth
    besides ValueError:
    print("Invalid entry. Please enter a legitimate quantity.")

    # Accumulate inputs
    education_level = get_user_input("Enter Schooling Degree (Excessive College, Bachelor, Grasp, PhD): ", education_levels)
    marital_status = get_user_input("Enter Marital Standing (Single, Married, Divorced, Widowed): ", marital_status)
    account_type = get_user_input("Enter Account Kind (Checking, Financial savings, Credit score Card, Mortgage): ", account_types) "Enter Account Kind (Checking, Financial savings, Credit score Card, Mortgage): ", account_types)
    interest_rate = get_numerical_input("Enter Curiosity Charge: ")
    credit_limit = get_numerical_input("Enter Credit score Restrict:")

    # Put together the enter information for prediction
    input_data = pd.DataFrame({'EducationLevel': [education_level],
    'MaritalStatus': [marital_status], 'AccountType': [account_type],
    'LoanAmount': [loan_amount], 'InterestRate': [interest_rate],
    'CreditLimit': [credit_limit]})

    # Predict the danger kind
    prediction = mannequin.predict(input_data)
    print("Predicted Danger Kind:", risk_type_options[prediction[0]])

    Upon operating the above Challenge 1, you may be requested to supply the required enter, primarily based on which the predictive mannequin will inform you if the danger is excessive, medium, or low.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleForget Competitors — Scammers Posing as Your Brand Could Be Your Real Risk
    Next Article Where Retirees Are Most and Least Likely to Run Out of Money
    Team_AIBS News
    • Website

    Related Posts

    Machine Learning

    Data Analysis Lecture 2 : Getting Started with Pandas | by Yogi Code | Coding Nexus | Aug, 2025

    August 22, 2025
    Machine Learning

    Current Landscape of Artificial Intelligence Threats | by Kosiyae Yussuf | CodeToDeploy : The Tech Digest | Aug, 2025

    August 22, 2025
    Machine Learning

    Optimizing ML Costs with Azure Machine Learning | by Joshua Fox | Aug, 2025

    August 22, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Apple TV+ raises subscription prices worldwide, including in UK

    August 22, 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

    Automated Testing: A Software Engineering Concept Data Scientists Must Know To Succeed

    July 31, 2025

    Why Most Entrepreneurs Fail at Turning Goals Into Action

    December 17, 2024

    LLM-as-a-Judge: A Practical Guide | Towards Data Science

    June 20, 2025
    Our Picks

    Apple TV+ raises subscription prices worldwide, including in UK

    August 22, 2025

    How to Build a Business That Can Run Without You

    August 22, 2025

    Bots Are Taking Over the Internet—And They’re Not Asking for Permission

    August 22, 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.