https://publicpagestutorbin.blob.core.windows.net/%24web/%24web/assets/Vector_3_18e566da35.png

Machine Learning Homework Help | Machine Learning Assignment Help

Excel in Exams with Expert Machine Learning Homework Help Tutors.

https://publicpagestutorbin.blob.core.windows.net/%24web/%24web/assets/Frame_1_7db546ad42.png

Trusted by 1.1 M+ Happy Students

WhatsApp Support

Get Instant
Online Homework Help
via WhatsApp

Get instant homework help from top tutors—just a WhatsApp message away. 24/7 hw help support for all your academic needs!

A
S
M
R
★★★★★
2M+ students trust TutorBin
Your WhatsApp Number
phone
or
⚡ Instant reply
🔒 100% private
👨‍🏫 Top tutors
🌍 All subjects
*Get instant homework help from top tutors—just a WhatsApp message away. 24/7 support for all your academic needs!
2M+ Students Helped24/7 Live SupportExpert TutorsAll Subjects CoveredInstant Response100% ConfidentialTop Rated ServiceMoney-back Guarantee2M+ Students Helped24/7 Live SupportExpert TutorsAll Subjects CoveredInstant Response100% ConfidentialTop Rated ServiceMoney-back Guarantee

Mastering Machine Learning: A Comprehensive Guide for Students

Introduction to Machine Learning

Machine learning, a pivotal branch of artificial intelligence (AI), empowers computers to replicate human learning processes, enhancing their abilities automatically through algorithms and statistical models. This field is integral for students aiming to excel in the domains of advanced data science, mathematics, and computer science. Mastering machine learning requires a deep understanding of complex subjects, setting the foundation for innovative solutions in technology and beyond.

Expert Online Tutoring for Machine Learning

Personalized Tutoring Sessions

At the heart of our service are personalized online tutoring sessions. Our seasoned tutors, equipped with expertise in machine learning, craft lessons tailored to your individual learning style and academic needs. Utilizing cutting-edge tools, including a state-of-the-art whiteboard platform featuring desktop sharing and multimedia capabilities, we ensure an interactive and enriching learning experience. Whether you're grappling with basic principles or advanced concepts, our tutors are here to guide you every step of the way.

Homework Assistance and Resource Library

Struggling with machine learning assignments? Our homework help service offers expert assistance, providing clear code examples, detailed explanations, and documentation to support your learning. Additionally, our Homework Library serves as a quick reference, offering solutions to common machine learning challenges.

Key Machine Learning Topics Covered

Our tutoring service encompasses all aspects of machine learning, including but not limited to:

  • Artificial Intelligence: Dive into the world of AI, where computers emulate human intelligence across tasks like decision-making and speech recognition.
  • Computer Science: Explore the foundations of computing, including software and hardware intricacies.
  • Algorithms: Understand the essence of algorithms and their role in solving computational problems.
  • Python Programming: Gain proficiency in Python, a premier language for machine learning development.
  • Supervised and Unsupervised Learning: Master these core machine learning approaches, from working with labeled datasets to identifying patterns in untagged data.

Why Choose Tutorbin?

Unmatched Tutoring Expertise

Our team comprises computer science veterans and machine learning experts, holding credentials from leading institutions and tech companies. Their real-world experience translates into deeper, practical insights, elevating your understanding of machine learning.

Flexibility and Accessibility

Our services are designed to fit your schedule, offering 24/7 tutoring to suit your busy life. With prompt response times and a straightforward process, getting the help you need is seamless and efficient.

Affordability and Transparency

We believe in offering quality tutoring at fair prices. With no hidden fees or obligations, you control your tutoring budget, ensuring access to top-notch educational support without financial strain.

Building Confidence and Competence

Working with our tutors not only enhances your machine learning skills but also boosts your confidence, empowering you to tackle future challenges with assurance. This confidence is key to a successful and progressive educational journey.

Get Started with Machine Learning Tutoring Today

Embark on your machine learning journey with Tutorbin. Whether you need help with specific assignments, conceptual understanding, or exam preparation, our tutors are ready to support your academic goals. Unlock the full potential of machine learning and elevate your educational experience with expert tutoring tailored to your needs.

Recently Asked Machine Learning Questions

Expert help when you need it
  • Q1:Module Number: SWE6204 Module Name: Machine Learning Year/Semester: 2023-24 / Semester 2 Module Tutor/s: MD Maksudur Mazumder Assessment Number 1 Assessment Type and Weighting Report of 4000 words (+/- 10%) and 100% Assessment Name Coursework Portfolio Assessment Submission Date Week 15 Learning Outcomes assessed. LO1: Develop an understanding of a wide selection of Machine Learning Algorithms LO2: Identify fundamental issues of applying Machine Learning in designing and implementing real-world applications. LO3: Demonstrate the application of machine learning algorithms to solve real-world problems. LO4: Critically evaluate the performance of machine learning solutions and identify the scope of improvements and optimisations. LO5: Identify social, and ethical issues/implications in the application of machine learning. LO6: Critically summarise the entire project, and prepare a concise presentation summarising the key findings, challenges faced, and lessons learned during the project 1 | Page Task 1 - Machine Learning [40 marks] a. We all know we have three main types of Machine Learning (ML), such as Supervised Learning, Unsupervised Learning, and Reinforcement Learning. Assume you have given the following scenarios. Your task is to identify what type of ML you can apply to the following scenarios and why explain in your own words. [LO1] (4 marks) i. Imagine you work for a financial consulting firm, and one of your responsibilities is to develop a predictive model that can forecast stock prices based on various financial indicators. This model will serve as a valuable tool for investors and traders to make informed decisions about buying or selling stocks, ultimately helping them maximise their returns. (1 mark) ii. Imagine you work for a healthcare organisation, and your objective is to create a patient segmentation plan to optimise and improve patient care and treatment strategies. To effectively tailor medical services, the goal is to identify distinct groups of patients with similar health profiles or medical needs. This segmentation will help the healthcare facility allocate resources efficiently and provide personalised care to each patient group. (1 mark) iii. Imagine that you work for a social media platform, and your role involves creating a system that can automatically identify and flag inappropriate content posted by users. This system is crucial for maintaining a safe and enjoyable online environment, as it helps in swiftly removing offensive or harmful material from the platform. (1 mark) iv . Imagine you're tasked with creating an autonomous delivery drone system for a futuristic logistics company. This drone must learn how to efficiently navigate a complex urban environment, follow aviation regulations, and make intelligent decisions on-the-fly. (1 mark) b. What is the difference between K means clustering algorithm and the k nearest neighbours (KNN) classification? [LO1] (8 marks) c. Can you explain what is a 'loss' in machine learning, and how to calculate that for linear regression? [LO2, LO4] (4 marks) d. Explain "Overfitting" in Machine Learning. [LO2, LO4] (8 marks) | Page e. Given the following training (T) and validation (V) error curves what actions would you take, if any, to improve performance given that m is the number of training pairs being used? Each point of the curve is obtained by training until convergence. Provide an explanation for your reasoning. [LO2, LO4] 1. (4 marks) error V T Relatively small Error m II. (4 marks) V error T Relatively large Error > m 3 | Page f. Can you give an example with an explanation of the challenges & risks involved in the application of AI/machine learning in the following table? [LO5] (8 marks) Challenge/Risks Example with an explanation Bias can affect the results Errors may cause harm A solution may not work for everyone Who's liable for Al-driven decisions? 4 | Page Task 2 - Predicting House Prices Using Regression Techniques [60 marks] Scenario: You are a bachelor's student enrolled in a Computer Science program at a university in the UK. As part of your undergraduate studies, you have been tasked with a Machine Learning project. The objective of this project is to create a predictive model capable of accurately estimating property prices using a range of input features. You are provided an example of Python source code to generate a sample dataset comprising details about houses in a specific city, including the size of the house, number of bedrooms, number of bathrooms, location, and other significant features. Your task is to build a Regression Model that can effectively predict the selling price of a house given its features. Assignment Tasks: 1. Data Exploration and Pre-processing [LO3]: (10 marks) i. Load/import the dataset from house_prices_dataset.csv, examine its structure, and print the first 20 rows. (5 marks) ii. Visualise data for features 'size', 'bedrooms', 'location', and 'prices' using appropriate plots or graphs. (5 marks) 2. Model Selection and Evaluation [LO3, LO4]: (30 marks) i. Split the dataset into training and testing sets using an appropriate ratio. For example, split 65% data for training and 35% data for testing. (5 marks) ii. Select at least one regression algorithm (e.g., Linear Regression, Decision Tree Regression, Random Forest Regression) to build predictive models. (10 marks) iii. Train each model using the training data and evaluate their performance using appropriate evaluation metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and R-squared. (15 marks) 3. Model Fine-tuning and Optimisation [LO3, LO4]: (10 marks) i. Perform hyperparameter tuning on the selected regression model using techniques like Grid Search or Random Search. (10 marks) 5 | Page 4. Conclusion and Presentation [LO6]: (10 marks) i. Summarise the entire project, including the problem statement, data exploration, model selection, optimisation, and interpretation of results. (5 marks) ii. Prepare a concise presentation summarising the key findings, challenges faced, and lessons learned during the project. (5 marks) Note: You must use Python programming language and feel free to use any machine learning libraries (e.g., scikit-learn, TensorFlow) to complete the assignment. Remember to document your code, provide appropriate comments, and include necessary visualisations to support your analysis. Here is an example code of how you can generate a sample dataset using Python: import numpy as np import pandas as pd # Set random seed for reproducibility np.random.seed(42) # Generate synthetic data for house prices num_samples = 1000 # Features size = np.random.randint(500, 3000, size=num_samples) bedrooms = np.random.randint(1, 6, size=num_samples) bathrooms = np.random.randint(1, 4, size=num_samples) location = np.random.choice(['City Centre', 'Suburbs', 'Rural Area'], size=num_samples) 6 | Page # Target variable prices = 50000 + (size * 100) + (bedrooms * 20000) + (bathrooms * 15000) prices += np.random.normal(0, 20000, size=num_samples) # Create Data Frame data = pd.DataFrame({ 'Size': size, 'Bedrooms': bedrooms, 'Bathrooms': bathrooms, 'Location': location, 'Price': prices }) # Save the dataset to a CSV file data.to_csv('house_prices_dataset.csv', index=False) Assessment Deliverables: You are required to produce a report (+/- 4000 words) that discusses all the above factors in Task 1 and Task 2. Formatting requirements . References list must include a minimum of 5-10 academic sources with a minimum of 3 peer-reviewed academic journals. Harvard referencing format must be used to credit secondary research sources. In-text citations should be included within your discussion (where relevant) using the author-date format and full reference details should be included in your bibliography. . Diagrams should be captioned and discussed in the body of your report. · A table of contents should be included. · Page numbers should be inserted in the centre of the footer. · The student ID number be placed in the header of each page. Submission Please submit to the Turnitin assignment section through Moodle. 7 | Page Grading A percentage mark will be provided based on General Assessment Guidelines for Written Assessments. Grading is as follows: A: 70 - 100% B: 60 - 69% C: 50- 59% D: 40 - 49% F: Below 40% Glossary: . Analyse: Break an issue or topic into smaller parts by looking in depth at each part. Support each part with arguments and evidence for and against (Pros and cons) . Critically Evaluate/Analyse: When you critically evaluate you look at the arguments for and against an issue. You look at the strengths and weaknesses of the arguments. This could be from an article you read in a journal or from a textbook. · Discuss: When you discuss you look at both sides of a discussion. You look at both sides of the argument. Then you look at the reason why it is important (for) then you look at the reason why it is important (against). . Explain: When you explain you must say why it is important or not important. · Evaluate: When you evaluate you look at the arguments for and against an issue. · Describe: When you give an account or representation of in words. . Identify: When you identify you look at the most important points. · Define: State or describe the nature, scope, or meaning. · Implement: Put into action/use/effect · Compare: Identify similarities and differences · Explore: To find out about · Recommend: Suggest/put forward as being appropriate, with reasons why. 8 | Page GENERAL ASSESSMENT GUIDELINES - LEVEL HE4 Relevance Learning outcomes must be met for an overall pass Knowledge and understanding Analysis, Creativity and Problem-Solving Self-awareness and Reflection Research/ Referencing Written English Presentation and Structure The presentational style and layout are correct for the type of assignment. Evidence of planning and logically structured. Where relevant, there is effective placement of, and reference to, figures, tables and images. Class I (Excellent Quality) 70% - 84% Work is relevant and comprehensively addresses the requirements of the brief. Learning outcomes are met. Demonstrates an excellent breadth of knowledge and understanding of theory and practice for this level. Demonstrates in-depth understanding of key concepts. Presents an excellent and cohesive appraisal of findings through the critical analysis of information. Draws clear, justified and thoughtful conclusions. Demonstrates creative flair, originality and initiative. Demonstrates a critical understanding of problem-solving approaches and applies strong problem-solving skills. Presents an excellent and cohesive discussion of findings through the interpretation and evaluation of information sources. Draws clear, justified and thoughtful conclusions. Demonstrates clearly creativity and initiative. Applies excellent problem-solving skills. Class I (Exceptional Quality) 85% - 100% Work is directly relevant and expertly addresses the requirements of the brief. Learning outcomes are met. Demonstrates breadth of knowledge and understanding of theory and practice beyond the threshold expectation for the level. Demonstrates excellent understanding of key concepts in different contexts. Provides insightful reflection and self- awareness in relation to the outcomes of own work and personal responsibility. A wide range of contemporary and relevant reference sources selected and drawn upon. Sources cited accurately in both the body of text and in the Reference List/ Bibliography. Writing style is clear and appropriate to the requirements of the assessment. An exceptionally well written answer with competent spelling, grammar and punctuation. For example, paragraphs are well structured and include linking and signposting. Sentences are complete and different types are used. A wide range of appropriate vocabulary is used. Provides excellent reflection and self- awareness in relation to the outcomes of own work and personal responsibility. A range of contemporary and relevant reference sources selected and drawn upon. Sources cited accurately in both the body of text and in the Reference List/Bibliography. Writing style is clear and appropriate to the requirements of the assessment. An excellently well written answer with competent, spelling, grammar and punctuation. For example, paragraphs are well structured and include linking and signposting. Sentences are complete and different types are used. A wide range of appropriate vocabulary is used. The presentational style and layout are correct for the type of assignment. Evidence of planning and logically structured. Where relevant, there is effective placement of and reference to, figures, tables and images. Class II/i (Very Good Quality) 60% - 69% Work is relevant and addresses most of the requirements of the brief well. Learning outcomes are met. Demonstrates a thorough breadth of knowledge and understanding of theory and practice for this level. Demonstrates very good understanding of key concepts. Presents a perceptive and cohesive discussion of findings through the interpretation and evaluation of information sources. Draws clear and justified conclusions. Demonstrates creativity and initiative. Applies strong problem-solving skills. Provides justified reflection and self- awareness in relation to the outcomes of own work and personal responsibility, as required by the assessment. A range of appropriate reference sources selected and drawn upon. Sources cited accurately in the main in the text and in the Reference List/ Bibliography. Writing style is clear and appropriate to the requirements of the assessment. A very well written answer with competent spelling, grammar and punctuation. For example, paragraphs are well structured and include linking and signposting. Sentences are complete and different types are used. A range of appropriate vocabulary is used. The presentational style and layout are correct for the type of assignment. Evidence of planning and logically structured in the main. Where relevant, there is effective placement of figures, tables and images. 9 | Page Relevance Learning outcomes must be met for an overall pass Knowledge and understanding Analysis, Creativity and Problem-Solving Self-awareness and Reflection Research/ Referencing Written English Presentation and Structure The presentational style and layout are largely correct for the type of assignment. Logically structured in the most part. Where relevant, effective placement of some figures, tables and images. Class III (Satisfactory Quality) 40% - 49% Class II/ii (Good Quality) 50% - 59% Work addresses key requirements of the brief. Some irrelevant content. Learning outcomes are met. Demonstrates a sound breadth of knowledge and understanding of theory and practice for this level. Demonstrates sound understanding of key concepts. Presents a logical discussion of findings through the interpretation and evaluation of information sources. Draws clear and justified conclusions. Demonstrates some creativity and initiative. Applies sound problem-solving skills. Provides valid reflection and self- awareness in relation to the outcomes of own work and personal responsibility, as required by the assessment. Relevant reference sources selected and drawn upon. Some sources accurately cited in both the body of text and in the Reference List/Bibliography. Writing style is mostly appropriate to the requirements of the assessment - Grammar, spelling and punctuation are generally competent and minor lapses do not pose difficulty for the reader. Paragraphs are structured and include some linking and signposting. Sentences are complete. A range of appropriate vocabulary is used. Work addresses the requirements of the brief, although superficially in places. Some irrelevant content. Demonstrates a sufficient understanding of key concepts. Demonstrates a sufficient breadth of knowledge and understanding of theory and practice for this level. Presents a valid discussion of findings through the interpretation and evaluation of information sources. Draws justified conclusions. Demonstrates creativity and initiative in places. Applies sufficient problem-solving skills. Provides some reflection and self- awareness in relation to the outcomes of own work and personal responsibility, as required by the assessment. Some relevant reference sources selected and drawn upon. Some weaknesses in referencing technique. Writing style is occasionally not appropriate for the assessment. Grammar, spelling and punctuation are generally competent, but may pose minor difficulties for the reader. Some paragraphs may lack structure, and there is limited linking and signposting. Some appropriate vocabulary is used Learning outcomes are met. Borderline Fail 35% - 39% Work addresses only some of the requirements of the brief. Irrelevant and superficial content. One or more learning outcomes have not been met. Demonstrates limited knowledge and understanding of theory and practice for this level. Demonstrates a lack of understanding of key concepts. Presents a limited discussion of findings through the interpretation of information sources. Draws some irrelevant conclusions. Creativity and initiative are lacking. Problem-solving skills are lacking. Provides limited reflection and self- awareness in relation to the outcomes of own work and personal responsibility, when required. Sources selected are limited and lack relevance. Poor referencing technique employed. Writing style is unclear and does not match the requirements of the assessment in question. Deficiencies in spelling, grammar and punctuation makes reading difficult and arguments unclear in places. Paragraphs are poorly structured. The presentational style and layout are largely correct for the type of assignment. Adequately structured. Inclusion of some figures, tables and images but not always relevant and/or clear. For the type of assignment the presentational style, layout and/or structure are lacking. Figures, tables and images included when required but these lack clarity and relevance. 10 | Page Fail <34% Work does not address the requirements of the brief. Irrelevant and superficial content. One or more learning outcomes have not been met. Demonstrates inadequate knowledge and understanding of theory and practice for this level. Demonstrates insufficient understanding of key concepts. Presents a limited discussion of findings with little consideration of the quality of information drawn upon. Draws irrelevant conclusions. Creativity, initiative and problem- solving skills are absent. Provides inadequate reflection and self- awareness in relation to the outcomes of own work and personal responsibility, when required. There is an absence of relevant sources. Poor referencing technique employed. Writing style is unclear and does not match the requirements of the assessment in question. Deficiencies in spelling, grammar and punctuation makes reading difficult and arguments unclear. Unstructured paragraphs. For the type of assignment the presentational style, layout and/or structure are lacking. Figures, tables and images are absent when required or lack relevance/clarity. 11 | PageSee Answer
  • Q2:3. Write a program to find the coefficients for a linear regression model for the dataset provided (data2.txt). Assume a linear model: y = wo + W₁*x. You need to 1) Plot the data (i.e., x-axis for the 1st column, y-axis for the 2nd column), and use Python to implement the following methods to find the coefficients: Normal equation, and 2) 3) Gradient Descent using batch AND stochastic modes respectively: a) Split dataset into 80% for training and 20% for testing. b) Plot MSE vs. iteration of each mode for both training set and testing set; compare batch and stochastic modes (with discussion) in terms of accuracy (of testing set) and speed of convergence (You need to determine an appropriate termination condition, e.g., when cost function is less than a threshold, and/or after a given number of iterations.) c) Plot MSE of the testing set vs. learning rate (using 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01) and determine the best learning rate. Please implement the algorithms by yourself and do NOT use the fit() function of the library.See Answer
  • Q3:1. In Module 2, we gave the normal equation (i.e., closed-form solution) for linear regression using MSE as the cost function. Prove that the closed-form solution for Ridge Regression is w = (1 + XT-X)-¹.XT.y, where I is the identity matrix, X = (x(¹), x(2),...,x(m)) is the input data matrix, x(¹) = (1,x₁,x₂,...,xn) is the i-th data sample, and y = (y(1), y(2),..., ym). Assume the hypothesis function h(x) = W₁ + W₁x₁ + W₂X₂ + ...+ WnXn, and y) is the measurement of hw(x) for the j-th training sample. The cost function of the Ridge Regression is E(w) = ₁(w²x) − y(¹) ² + 2₁w₁².See Answer
  • Q4: Question 1 Support Vector Machine via SciKit Learn (5 points) Scikit-Learn is a free machine learning library for data mining and data analysis. It was built upon NumPy, SciPy, and Matplotlib. It supports the following methods: support vector machine, decision trees, random forests, k-nearest neighbors, k-means clustering, etc. Conduct the following tasks: (1) Load the built-in Iris dataset from sklearn (2) Split the dataset into training data and test data based on a 6:4 ratio (3) Import svm from sklearn (4) Create a svm model based on svm.SVC() call (5) Train the svm model by using the training data (6) Run an evaluation by using score( ) of the svm model over the test data (7) Use the predict( ) function of the svm model to predict the first and second images in the Iris dataset. Compare the predictions and ground truths. Note: The basic information of the Iris dataset is as follows: Scikit Learning • Iris Data Set sepal petal ⚫The data set contains three species of iris (iris setosa, virginica, and versicolor) with 50 samples for each species; four measured features of each sample are the length and width of sepals and petals in centimeters. Iris versicolor this virginice 151 The prediction results will be an integer between 0 and 2, representing three categories of the flowers. Question 2 Tensor Flow and Keras via Google Colab (5 points) (a) Visit https://colab.research.google.com/ to open an account at Google Colab (b) Visit a Keras Website: https://keras.io/examples/vision/image_classification_from_scratch/ (c) Try to run the code at Google Colab and train the model (d) Test the trained model with two your own images about dog or cat (e) Create screenshots for outputs If your free time of using gpu exceeds the limit at Google Colab, then try to run your code another day. You should create screenshots for all the task.See Answer
  • Q5:Problem 1: Download the zip folder "Homework 4 Supporting Material.rar" from Canvas. It contains the MATLAB implementation of Logistic Regression. Open the "ex2.mlx" file and it will walk you through how logistic regression is coded. In Section 2.5, vary the regularization parameter y and observe the changes to the decision boundary and the accuracy. Plot the decision boundaries for different y and comment on why you observe such behavior.See Answer
  • Q6:Problem 1a - Concepts: Interpreting SSE Total SSE is the sum of the SSE for each separate attribute in the Kmeans algorithm. What does it mean if the SSE for one variable is low for all clusters? Low for just one cluster? High for all clusters? High for just one cluster? How could you use the per variable SSE information to improve your clustering?/nProblem 1b. Local and Global Objective Functions K-means. For the following sets of two-dimensional points, (1) provide a sketch of how they would be split into clusters by K-means for the given number of clusters and (2) indicate approximately where the resulting centroids would be. Assume that we are using the squared error objective function. If you believe that there is more than one possible solution, then please indicate whether each solution is a global or local minimum (draw pictures to represent your responses). Darker areas indicate higher density. Assume a uniform density within each shaded area./n(a) k=3. O (b) k=2 (c) k=2/nProblem 1c. Density clustering Suppose we apply DBSCAN to cluster the following dataset using Euclidean distance. 3 10. 2 c E 1 a A L L M 0 1 2 3 4 5 6 A point is a core point if its density (num point within EPS) is > MinPts. Given that MinPts =3 and EPS =, answer the following questions. a) Label all point as 'core points', 'boundary points', and 'noise'. b) What is the clustering result (i.e., how will the data cluster)?/nProblem 1d. Entropy vs. SSE Assume you are given a data set of objects, each of which is assigned to one of two classes, and suppose that C1 and C2 are two clusterings produced from this data set. If entropy judges C1 to be a more accurate clustering than C2, is it necessary that SSE will also judge C1 to be a more accurate clustering than C2?See Answer
  • Q7:Part 1 Assignment 1 (Part 1) Question 1 In the lecture we have implemented two ML models, one using PyTorch and one using Tensorflow for predicting tomorrow's price the stock mtr (0066.HK). This question asks you to implement yet another ML model using sklearn's Linear Regression method using the same set of stock price (i.e., 0066.HK between "2010- 01-01" and "2020-06-30"). You should submit a Jupyter notebook that includes the three ML models (i.e., the Pytorch and Tensorflow implementations from the lectures and your implementation using sklearn), and compare their accuracy on predicting the price of 0066.HK during the period "2021-01-01" and "2021-04-30". Question 2 Choose a suitable method (except neural network) from sklearn to train a Machine Learning model using the MNIST data set given in Lecture 3 for hand- written digit classification. Provide a brief explanation of your chosen method and why it is suitable for this task. Question 3 and 4 will be released later. Part 2 deadline will be announced later. Submit 2 ipynb files to Assignment 1 Part 1 (Jupyter Notebook format and 1 Jupyter notebook for each question; programs in code cell and answers to the questions written in the text cell). Please note that the ipynb files should already be run on Colab with clear output data/graph. All the submissions via Moodle.See Answer
  • Q8:16. You are asked to evaluate the performance of two classification models, M₁ and M2. The test set you have chosen contains 26 binary attributes, labeled as A through Z. Table 4.5 shows the posterior probabilities obtained by applying the models to the test set. (Only the posterior probabilities for the positive class are shown). As this is a two-class problem, P(-) = 1 − P(+) and P(-|A,..., Z) = 1 - P(+A,,Z). Assume that we are mostly interested in detecting instances from the positive class. Table 4.5. Posterior probabilities for Exercise 16. Instance True Class | P(+|A,..., Z, M₁) | P(+|A, ………, Z, M2) 1 2 3 4 6 7 9 10 ++ || ++11 +1 0.73 0.61 0.69 0.03 0.44 0.68 0.55 0.31 0.67 0.45 0.47 0.09 0.08 0.38 0.15 0.05 0.45 0.01 0.35 0.04 (a) Plot the ROC curve for both M₁ and M2. (You should plot them on the same graph.) Which model do you think is better? Explain your reasons.See Answer
  • Q9: SUSS SINGAPORE UNIVERSITY OF SOCIAL SCIENCES AIB504 End-of-Course Assessment - January Semester 2024 Machine Learning in Business INSTRUCTIONS TO STUDENTS: 1. This End-of-Course Assessment paper comprises 7 pages (including the cover page). 2. You are to include the following particulars in your submission: Course Code, Title of the ECA, SUSS PI No., Your Name, and Submission Date. 3. Late submission will be subjected to the marks deduction scheme. Please refer to the Student Handbook for details. AIB504 Copyright © 2024 Singapore University of Social Sciences (SUSS) ECA January Semester 2024 Page 1 of 7 ECA Submission Guidelines Please follow the submission instructions stated below: A-What Must Be Submitted You are required to submit the following TWO (2) items for marking and grading: • • A Report of no more than 4,000 words, excluding references and appendix, if any (you should submit this item first as it carries the highest weightage). Dataset & code used for the report (you should submit a .Zip file, consisting of both the data and codes) Please verify your submissions after you have submitted the above TWO (2) items. B-Submission Deadline • • • The TWO (2) items of Report, and Data & Code .Zip file are to be submitted by 12 noon on the submission deadline. You are allowed multiple submissions till the cut-off date for each of the TWO (2) items. Late submission of any of the TWO (2) items will be subjected to mark-deduction scheme by the University. Please refer to Section 5.2 Para 2.4 of the Student Handbook. C-How the TWO (2) Items Should Be Submitted • The Report: submit online to Canvas via TurnItIn (for plagiarism detection) under the ECA submission link The Data & Code Zip file: submit online to Canvas via the -ECA Zip File submission link D-Additional guidelines on file formatting are given as follows: 1. Report • Please ensure that your Microsoft Word document is generated by Microsoft Word 2016 or higher. • The report must be saved in .docx format. AIB504 Copyright © 2024 Singapore University of Social Sciences (SUSS) ECA January Semester 2024 Page 2 of 7 2. Data & Code.Zip file The dataset must be saved in .xlsx or .xls format. • The dataset must be included in the .zip file. • The code file must be saved in the required format. • You are to include the following particulars in your submission: Course Code, Title of the ECA, SUSS PI No., Your Name, and Submission Date. E-Please be Aware of the Following: Submission in hardcopy or any other means not given in the above guidelines will not be accepted. You do not need to submit any other forms or cover sheets (e.g. form ET3) with your ECA. You are reminded that electronic transmission is not immediate. The network traffic may be particularly heavy on the date of submission deadline and connections to the system cannot be guaranteed. Hence, you are advised to submit your work early. Canvas will allow you to submit your work late but your work will be subjected to the mark-deduction scheme. You should therefore not jeopardise your course result by submitting your ECA at the last minute. It is your responsibility to check and ensure that your files are successfully submitted to Canvas. F-Plagiarism and Collusion Plagiarism and collusion are forms of cheating and are not acceptable in any form in a student's work, including this ECA. Plagiarism and collusion are taking work done by others or work done together with others respectively and passing it off as your own. You can avoid plagiarism by giving appropriate references when you use other people's ideas, words or pictures (including diagrams). Refer to the APA Manual if you need reminding about quoting and referencing. You can avoid collusion by ensuring that your submission is based on your own individual effort. The electronic submission of your ECA will be screened by plagiarism detection software. For more information about plagiarism and collusion, you should refer to the Student Handbook (Section 5.2.1.3). You are reminded that SUSS takes a tough stance against plagiarism or collusion. Serious cases will normally result in the student being referred to SUSS's Student Disciplinary Group. For other cases, significant mark penalties or expulsion from the course will be imposed. AIB504 Copyright © 2024 Singapore University of Social Sciences (SUSS) ECA January Semester 2024 Page 3 of 7 G-Use of Generative AI Tools (Allowed) The use of generative AI tools is allowed for this assignment. • • • You are expected to provide proper attribution if you use generative AI tools while completing the assignment, including appropriate and discipline-specific citation, a table detailing the name of the AI tool used, the approach to using the tool (e.g. what prompts were used), the full output provided by the tool, and which part of the output was adapted for the assignment; To take note of section 3, paragraph 3.2 and section 5.2, paragraph 24.1 (Viva Voce) of the Student Handbook; The University has the right to exercise the viva voce option to determine the authorship of a student's submission should there be reasonable grounds to suspect that the submission may not be fully the student's own work. For more details on academic integrity and guidance on responsible use of generative AI tools in assignments, please refer to the TLC website for more details; The University will continue to review the use of generative AI tools based on feedback and in light of developments in AI and related technologies. AIB504 Copyright © 2024 Singapore University of Social Sciences (SUSS) ECA January Semester 2024 Page 4 of 7 (Full marks: 100) Section A (100 marks) Answer all questions in this section. Question 1 The aim of this individual assignment is to implement a machine-learning project based on the methods covered in this course and derive a business strategy/solution based on the outcomes of the project. The focus will be on enhancing customer-oriented strategies within the e-commerce industry through the implementation of predictive models and/or recommendation engines. This assessment will assess your ability to: • • • Identify real-world business problems/issues and apply business principles and practices to real and/or hypothetical situations. Design and implement relevant machine learning workflows that address the business questions identified, which include but are not limited to: ○ Data Collection: Identify relevant data sources and implement data collection: Gather the data to address the problem at hand. You may access relevant data from online open data, such as Kaggle, UCI Machine Learning Repository, World Bank Open Data, Yelp Open Dataset, etc. The data should contain key information to enable strategic decision making on e-commerce platforms, which is suitable for relevant analysis, including but not limited to customer segmentation, click-through rate (CTR) prediction, churn prediction or recommendation systems. О О Data Preprocessing: Prepare and preprocess data to ensure it is in a suitable format for the relevant machine learning algorithms, including handling missing values, encoding categorical variables, and scaling numerical features, when applicable. Feature Engineering: Select or create or appropriate features from the available data that can effectively address the problem. ○ Training, validation and model evaluation: Implement the model and improve model performance (if applicable). Interpret the results and extract business insights: Synthesize information and apply them to relevant business decisions/solutions for the selected business scenarios. • Demonstrate writing proficiency. Discuss with the instructor of your choice of topic before working on the project. Provide a minimum of 5 references cited in your report. AIB504 Copyright © 2024 Singapore University of Social Sciences (SUSS) ECA January Semester 2024 Page 5 of 7See Answer
  • Q10:/n MAT1008 HOMEWORK The aim of this homework is to predict customer churn based on historical customer data by using machine learning methods. The homework will adhere to a conventional workflow commonly seen in machine learning projects, which includes data preprocessing, model building, evaluation, reporting and presenting your work. DATA SET GENERATION First, generate your INDIVIDUAL customer data using your Student ID. The data consists of 1000 data instances and 10 features, each storing a different type of information about the customers. CreditScore: The customer's credit score at the time of data collection. Location: The customer's country or region. Age: The customer's age. EducationLevel: The customer's education level. CustomerName: The customer's name. Tenure: The number of years the customer has been with the bank. Balance: The customer's account balance. IsActive Member: Indicates whether the customer is an active member (yes) or not (no). EstimatedSalary: The customer's estimated salary in thousand dollars. Churn: The target variable, indicating whether the customer has churned (yes) or not (no). # Import libraries from faker import Faker import random import pandas as pd fake Faker () #defining a function to generate a data instance def generate_instance(): return { 'CreditScore': random.gauss (550,100), 'Tenure': random.randint(0,15), 'EducationLevel': random.choice (['HighSchool', 'College','Graduat e']), 'Balance': random. gauss (125000, 1000), 'EstimatedSalary': random.uniform (10,25000), 'Age': random.randint (18,90), 'IsActiveMember':random.choice (['yes','no']), 'Location': fake.city(), 'CustomerName': fake.name (), 'Churn':random. choice (['yes', 'no']) } #Customizing your data set random.seed(*) %23plug your student ID in * Faker.seed (*) #plug your student ID in * #Generating a data set consisting of 1000 instances values = [generate_instance() for in range (1000)] #Converting the data set to dataframe. data=pd.DataFrame (values) REPORT Once you generated the data, apply AT LEAST TWO machine learning methods covered in the lectures to predict which customer(s) to Churn. Compare and discuss the results in a Report. The Report may include the following parts: Problem Definition (describing the problem at hand and the aim of the work) Solution Methodology (a description of your machine learning models, why you choose them, how you apply them, the results of your experiments, including numbers, visualizations, and interpretations as appropriate) Comparison of the models (describing how you measure goodness of the models and how you get final decision of your work) Conclusion (summarizing your work with a result) PRESENTATION Present your work in the class with a 5-minute talk in the REVERSE ORDER of submission. That is, if you submit it early, then you will present in the 2nd round; if you submit it late, then you will present in the 1st round. I will announce the presentation list when submission is closed. Due Dates Report & Presentation Submission (via Itslearning) Presentation May 15th, 2024 (1st round) May 16th/17th, 2024 Important Notes (2nd round) May 23rd/24th, 2024 • You need to submit BOTH Report and Presentation Slides. • LATE SUBMISSION is not allowed. • Submitting but NOT attending the Presentation leads ZERO POINT for the overall homework score. • There is NO MAKE-UP for the Presentations.See Answer
  • Q11:/n 1 Introduction 1.1 Summary Computational MACHINE LEARNING Machine Learning Project In this assignment you will design and create an end-to-end machine learning system for a real-world problem. This assignment is designed for you to apply and practice skills of critical analysis and evaluation to circumstances similar to those found in real-world problems. In this assignment you will: • Design and Create an end-to-end machine learning system • Apply multiple algorithms to a real-world machine learning problem • Analyse and Evaluate the output of the algorithms • Research into extending techniques that are taught in class Provide an ultimate judgement of the final trained model(s) that you would use in a real-world setting This assignment has the following deliverables: 1. A report (of no more than 5 pages, plus up to 2 pages for appendices) critically analysing your approach and ultimate judgement. 2. An independent evaluation of your model and ultimate judgement (to be included in the report). 3. Your Python scripts, Jupyter notebooks, and software used to build your learning system and produce the models and results. 2 Task Using machine learning in real-world settings involves a more than just running a data set through a particular algorithm. In this assignment, you will design, analyse and evaluate a complete machine learning system. The key aspect of this assignment is the design, analysis, and evaluation of your methodology, investi- gation, and results. This assignment focuses on both the accuracy of your model, and your understanding of your approach and model. For this assignment you have a choice of your project. You may select this project from the list in Section 3, or you may negotiate a project with the course co-ordinator. Regardless of the problem you choose, you must conduct the following tasks: 1. You need to come up with an approach, where each element of the system is justi ed using data analysis, performance analysis and/or knowledge from relevant literature. 2. Investigate various Machine Learning solutions to the problem 3. Make an ultimate judgement 4. Evaluate your ultimate judgement against independent testing data 5. Produce a report of your design, investigation, evaluation and findings 2.1 Investigation Your investigation will require you to design, use, analyse and evaluate an end-to-end machine learning system. You should consider a variety of techniques that have been discussed in class, and techniques you have researched. Your end-to-end system may consist of elements such as: • • • A well justified evaluation framework. Pre-processing the data set to make it suitable for providing to various machine learning algorithms. Carefully selected and justified baseline model(s). Hyper-parameter setting and tuning to refine the model. Evaluating the trained models, analysing and interpreting the results. Each project features many of these above aspects. Each project also has unique aspects which cover a sample of issues from across machine learning. Additionally, each project has unique mandatory requirement(s), detailed for each project. The details of each project are listed in Section 3. The details in this spec are the minimum requirements. A thorough investigation must consider more that the minimum to receive high grades. 2.2 Ultimate Judgement You must make an ultimate judgement of the "best" model that you would use and recommend for your particular project. It is up to you to determine the criteria by which you evaluate your model and determine what is means to be "the best model". 2.3 Independent Evaluation of your Ultimate Judgement You need to conduct an independent evaluation of your ultimate judgement, using data collected completly outside of the scope of your original training and evaluation. This evaluation simulates how your ultimate judgement would perform if it were deployed in a real-world setting, where you are unable to re-train and adjust the model. 2.4 Approach, Critical Analysis & Report You must compile a report analysing the approach you have taken in your investigation. Your report: • Must be no longer that 5 pages of text • May contain an additional 2 pages for appendices • • Use a single-column layout with no less than size 11pt font The appendices may only contain citations, figures, diagrams, or data tables that provide evidence to support the statements in your report. Any over length content, or content outside of these requirements will not be marked. For example, if you report is too long, ONLY the first 5 pages pages of text will be read and marked. In this report you should analyse elements such as: • Machine learning algorithms that you considered • Why you selected these approaches • • Evaluations of the performance of trained model(s) Your ultimate judgement with supporting analysis and evidence This will allow us to understand your rationale. We encourage you to explore this problem and not just focus on maximising a single performance metric. By the end of your report, we should be convinced that of your ultimate judgement and that you have considered all reasonable aspects in investigating your chosen problem. The key aspect of this assignment isn't your code or model, but the thought process behind your work. Remember that good analysis provides factual statements, evidence and justifications for conclusions that you draw. A statements such as: "I did <xyz> because I elt that it was good" is not analysis. This is an unjustified opinion. Instead, you should aim for statements such as: "I did <xyz> because it is more efficient. It is more efficient because ..." 3 Projects Project Classify Images of Road Traffic Signs This project is to train a model to classify images of European road traffic signs. You will be using a modified version of the Belgium Traffic Sign Classification Benchmark. These are images of road traffic signs taken from real-world vehicles. Note, this dataset, along with it's sister German TSC dataset, appear in many different forms on various research and ML online resources. The data set for you to use in this assignment has been specifically prepared for you, and is provided on Canvas. The dataset consists of 28x28 gray-scale images and you are expected to use the dataset to perform two tasks: • Classify images according to sign-shape, such as diamond, hex, rectangle, round, triangle. • Classify images according to sign-type, such as stop, speed, warning, parking, etc. The correct classification of the images is given by the image sub-directories. Images are first sub-divided by their shape, and then by their sign type. You should also note that some sign types have different individual signs. For example, the speed-sign type has examples of signs of speeds from 10 - 70 mph. You are not required to further sub-divide these signs, but consider all of the different signs as being of the sample type. Your tasks is to investigate classifying the signs using both categories. REQUIREMENTS • • • • . You must investigate at least one supervised machine learning algorithms or each of the two categories (Tasks). That is, you must build at least one model capable of classified the shape of the sign, and at least one model capable of classifying the type of the sign. You are not required to use separate type(s) of machine learning algorithms, however, a thorough insti- gations should consider different types of algorithms. You are required to ully train your own algorithms. You may not use pre-trained systems. You may NOT augment this data set with additional data. Your final report must conduct an analysis and comparison between classifying the two categories. INDEPENDENT EVALUATION • • Your independent evaluation should consist of classifying images of traffic signs that you have collected. You will need to either take your own digital photographs of traffic signs, and/or source suitable signs from internet resources. You will need to process these images so they may be used with your trained algorithms. As part of your evaluation, you should discuss challenges you face in combining this independent data and your models. 4.2 Marking Rubric A detailed rubric is attached on canvas. In summary: • • Approach 60%; • - Ultimate Judgment & Analysis (Independent Evaluation) 20%; Report Presentation 20%. 4.3 Submission Instructions You must submit all the relevant material as listed below via Canvas. 1. A report (of no more than 5 pages, plus up to 2 pages for appendices) critically analysing your approach and ultimate judgement 2. An independent evaluation of your model and ultimate judgement (included in the report). 3. Your Python scripts, Jupyter notebooks, and software used to build your learning system and produce the models and results. The submission portal on canvas consists of two sub-pages. First page for report submission, the second page for code submission. More information is provided on Canvas. Include only source code in a zip file containing your name. We strongly recommend you to attach a README file with instructions on how to run your application. Make sure that your assignment can run only with the code included in your zip file!See Answer
  • Q12: Kernel Methods for Deep Learning Youngmin Cho and Lawrence K. Saul Department of Computer Science and Engineering University of California, San Diego 9500 Gilman Drive, Mail Code 0404 La Jolla, CA 92093-0404 {yoc002, saul}@cs.ucsd.edu Abstract We introduce a new family of positive-definite kernel functions that mimic the computation in large, multilayer neural nets. These kernel functions can be used in shallow architectures, such as support vector machines (SVMs), or in deep kernel-based architectures that we call multilayer kernel machines (MKMs). We evaluate SVMs and MKMs with these kernel functions on problems designed to illustrate the advantages of deep architectures. On several problems, we obtain better results than previous, leading benchmarks from both SVMs with Gaussian kernels as well as deep belief nets. 1 Introduction Recent work in machine learning has highlighted the circumstances that appear to favor deep archi- tectures, such as multilayer neural nets, over shallow architectures, such as support vector machines (SVMs) [1]. Deep architectures learn complex mappings by transforming their inputs through mul- tiple layers of nonlinear processing [2]. Researchers have advanced several motivations for deep architectures: the wide range of functions that can be parameterized by composing weakly non- linear transformations, the appeal of hierarchical distributed representations, and the potential for combining unsupervised and supervised methods. Experiments have also shown the benefits of deep learning in several interesting applications [3, 4, 5]. Many issues surround the ongoing debate over deep versus shallow architectures [1, 6]. Deep ar- chitectures are generally more difficult to train than shallow ones. They involve difficult nonlinear optimizations and many heuristics. The challenges of deep learning explain the early and continued appeal of SVMs, which learn nonlinear classifiers via the "kernel trick”. Unlike deep architectures, SVMs are trained by solving a simple problem in quadratic programming. However, SVMs cannot seemingly benefit from the advantages of deep learning. Like many, we are intrigued by the successes of deep architectures yet drawn to the elegance of ker- nel methods. In this paper, we explore the possibility of deep learning in kernel machines. Though we share a similar motivation as previous authors [7], our approach is very different. Our paper makes two main contributions. First, we develop a new family of kernel functions that mimic the computation in large neural nets. Second, using these kernel functions, we show how to train multi- layer kernel machines (MKMs) that benefit from many advantages of deep learning. The organization of this paper is as follows. In section 2, we describe a new family of kernel functions and experiment with their use in SVMs. Our results on SVMs are interesting in their own right; they also foreshadow certain trends that we observe (and certain choices that we make) for the MKMs introduced in section 3. In this section, we describe a kernel-based architecture with multiple layers of nonlinear transformation. The different layers are trained using a simple combination of supervised and unsupervised methods. Finally, we conclude in section 4 by evaluating the strengths and weaknesses of our approach. 1 2 Arc-cosine kernels In this section, we develop a new family of kernel functions for computing the similarity of vector inputs x, y Є Rd. As shorthand, let (z) = ½ (1 + sign(z)) denote the Heaviside step function. We define the nth order arc-cosine kernel function via the integral representation: || w || kn(x, y) = 2 /dv dw (2π)d/2 O(w x) (wy) (w⋅ x)" (w·y)" (1) The integral representation makes it straightforward to show that these kernel functions are positive- semidefinite. The kernel function in eq. (1) has interesting connections to neural computation [8] that we explore further in sections 2.2-2.3. However, we begin by elucidating its basic properties. 2.1 Basic properties We show how to evaluate the integral in eq. (1) analytically in the appendix. The final result is most easily expressed in terms of the angle 0 between the inputs: Ꮎ = COS -1 x.y |x||||y|| The integral in eq. (1) has a simple, trivial dependence on the magnitudes of the inputs x and y, a complex, interesting dependence on the angle between them. In particular, we can write: (2) but 1 kn(x, y) = ||x|| ||y|| Jn (0) (3) П where all the angular dependence is captured by the family of functions Jn (0). Evaluating the integral in the appendix, we show that this angular dependence is given by: n Jn (0) = (−1)" (sin 0) 2n+1 (si 10 00 1 მ ;)" ( π- sin (4) For n= 0, this expression reduces to the supplement of the angle between the inputs. However, for n>0, the angular dependence is more complicated. The first few expressions are: eq. Jo(0) = п-0 J1(0) J2(0) = = sin (0) cos 0 ‚-1 x.y 3 sin cos 0+ ( − 0) (1 + 2 cos² 0) = (5) (7) We describe (3) as an arc-cosine kernel because for n 0, it takes the simple form ko(x, y) = 1−= COS |||||||| . In fact, the zeroth and first order kernels in this family are strongly motivated by previous work in neural computation. We explore these connections in the next section. Arc-cosine kernels have other intriguing properties. From the magnitude dependence in eq. (3), we observe the following: (i) the n = 0 arc-cosine kernel maps inputs x to the unit hypersphere in feature space, with ko(x,x) = 1; (ii) the n = 1 arc-cosine kernel preserves the norm of inputs, with k₁(x, x) = ||x||2; (iii) higher order (n> 1) arc-cosine kernels expand the dynamic range of the inputs, with kn(x, x) ~ ||x||2n. Properties (i)–(iii) are shared respectively by radial basis function (RBF), linear, and polynomial kernels. Interestingly, though, the n = 1 arc-cosine kernel is highly nonlinear, also satisfying k₁ (x, -x) = 0 for all inputs x. As a practical matter, we note that arc- cosine kernels do not have any continuous tuning parameters (such as the kernel width in RBF kernels), which can be laborious to set by cross-validation. 2.2 Computation in single-layer threshold networks Consider the single-layer network shown in Fig. 1 (left) whose weights Wij connect the jth input unit to the ith output unit. The network maps inputs x to outputs f(x) by applying an elementwise nonlinearity to the matrix-vector product of the inputs and the weight matrix: f(x) = g(Wx). The nonlinearity is described by the network's so-called activation function. Here we consider the family of one-sided polynomial activation functions gn (2) = O(z)z" illustrated in the right panel of Fig. 1. 2 f₁ f; fm W 0.5 X Step (n=0) 1 1 Ramp (n=1) 1 Quarter-pipe (n=2) JJJ 0.5 0.5 0 0 0 -1 0 1 -1 0 1 -1 0 1 Figure 1: Single layer network and activation functions For n=0, the activation function is a step function, and the network is an array of perceptrons. For n=1, the activation function is a ramp function (or rectification nonlinearity [9]), and the mapping f(x) is piecewise linear. More generally, the nonlinear (non-polynomial) behavior of these networks is induced by thresholding on weighted sums. We refer to networks with these activation functions as single-layer threshold networks of degree n. Computation in these networks is closely connected to computation with the arc-cosine kernel func- tion in eq. (1). To see the connection, consider how inner products are transformed by the mapping in single-layer threshold networks. As notation, let the vector w; denote ith row of the weight matrix W. Then we can express the inner product between different outputs of the network as: f(x) · f(y) = m (w₁ x)O(w₁ y)(Wi ⋅ x)" (W¿ ⋅ y)”, i=1 (8) where m is the number of output units. The connection with the arc-cosine kernel function emerges in the limit of very large networks [10, 8]. Imagine that the network has an infinite number of output units, and that the weights Wij are Gaussian distributed with zero mean and unit vari- ance. In this limit, we see that eq. (8) reduces to eq. (1) up to a trivial multiplicative factor: limm∞ f(x) f(y) = kn(x, y). Thus the arc-cosine kernel function in eq. (1) can be viewed as the inner product between feature vectors derived from the mapping of an infinite single-layer threshold network [8]. m Many researchers have noted the general connection between kernel machines and neural networks with one layer of hidden units [1]. The n=0 arc-cosine kernel in eq. (1) can also be derived from an earlier result obtained in the context of Gaussian processes [8]. However, we are unaware of any previous theoretical or empirical work on the general family of these kernels for degrees n ≥0. Arc-cosine kernels differ from polynomial and RBF kernels in one especially interesting respect. As highlighted by the integral representation in eq. (1), arc-cosine kernels induce feature spaces that mimic the sparse, nonnegative, distributed representations of single-layer threshold networks. Polynomial and RBF kernels do not encode their inputs in this way. In particular, the feature vector induced by polynomial kernels is neither sparse nor nonnegative, while the feature vector induced by RBF kernels resembles the localized output of a soft vector quantizer. Further implications of this difference are explored in the next section. 2.3 Computation in multilayer threshold networks A kernel function can be viewed as inducing a nonlinear mapping from inputs x to fea- ture vectors (x). The kernel computes the inner product in the induced feature space: k(x, y) = (x) (y). In this section, we consider how to compose the nonlinear mappings in- duced by kernel functions. Specifically, we show how to derive new kernel functions k(l) (x, y) = Þ(Þ(…..Þ(x))) · Þ(Þ(...Þ(y))) e times e times (9) which compute the inner product after / successive applications of the nonlinear mapping (.). Our motivation is the following: intuitively, if the base kernel function k(x, y) = Þ(x) · (y) mimics the computation in a single-layer network, then the iterated mapping in eq. (9) should mimic the computation in a multilayer network. 3 Test error rate (%) 26 24 SVM-RBF 22 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 (l). Quarter-pipe (n=2) DBN-3 Figure 2: Left: examples from the rectangles-image data set. Right: classification error rates on the test set. SVMs with arc-cosine kernels have error rates from 22.36-25.64%. Results are shown for kernels of varying degree (n) and levels of recursion (l). The best previous results are 24.04% for SVMs with RBF kernels and 22.50% for deep belief nets [11]. See text for details. We first examine the results of this procedure for widely used kernels. Here we find that the iterated mapping in eq. (9) does not yield particularly interesting results. Consider the two-fold composition that maps x to (Þ(x)). For linear kernels k(x, y) = x y, the composition is trivial: we obtain the identity map (4(x)) = $(x) = x. For homogeneous polynomial kernels k(x, y) = (x · y)d, the composition yields: (P(x)) P(P(y)) = ((x) . Đ(y)) = ((x - y)d)d = (x - y). (10) The above result is not especially interesting: the kernel implied by this composition is also polyno- mial, just of higher degree (d² versus d) than the one from which it was constructed. Likewise, for RBF kernels k(x, y) = e¯\||×-y||², the composition yields: Þ(Þ(x)) · Þ(Þ(y)) = e¯\||Þ(x)—Þ(y)||2 = e -2λ(1-k(x,y)) (11) Though non-trivial, eq. (11) does not represent a particularly interesting computation. Recall that RBF kernels mimic the computation of soft vector quantizers, with k(x, y) < 1 when ||x − y|| is large compared to the kernel width. It is hard to see how the iterated mapping Þ(Þ(x)) would generate a qualitatively different representation than the original mapping Þ(x). Next we consider the l-fold composition in eq. (9) for arc-cosine kernel functions. We state the result in the form of a recursion. The base case is given by eq. (3) for kernels of depth l = 1 and degree n. The inductive step is given by: /2 k(l+1) (x, y) = ± [k? (x, x) kg) (y, y) ]"/² Jn (0%), П (12) where 0(e) is the angle between the images of x and y in the feature space induced by the l-fold composition. In particular, we can write: 0(e) n COS = (l) | (k) (x, y) [k) (x, x) k (y, y)]] (y,y)] = 1/2). (13) The recursion in eq. (12) is simple to compute in practice. The resulting kernels mimic the com- putations in large multilayer threshold networks. Above, for simplicity, we have assumed that the arc-cosine kernels have the same degree n at every level (or layer) l of the recursion. We can also use kernels of different degrees at different layers. In the next section, we experiment with SVMs whose kernel functions are constructed in this way. 2.4 Experiments on binary classification We evaluated SVMs with arc-cosine kernels on two challenging data sets of 28 × 28 grayscale pixel images. These data sets were specifically constructed to compare deep architectures and kernel machines [11]. In the first data set, known as rectangles-image, each image contains an occluding rectangle, and the task is to determine whether the width of the rectangle exceeds its height; ex- amples are shown in Fig. 2 (left). In the second data set, known as convex, each image contains a white region, and the task is to determine whether the white region is convex; examples are shown 4 21 20 19 F 18 Test error rate (%) SVM-RBF DBN-3 17 1 2 3 4 5 6 Step (n=0) 1 2 3 4 5 6 Ramp (n=1) 1 2 3 4 5 6 (l). Quarter-pipe (n=2) Figure 3: Left: examples from the convex data set. Right: classification error rates on the test set. SVMs with arc-cosine kernels have error rates from 17.15-20.51%. Results are shown for kernels of varying degree (n) and levels of recursion (l). The best previous results are 19.13% for SVMs with RBF kernels and 18.63% for deep belief nets [11]. See text for details. in Fig. 3 (left). The rectangles-image data set has 12000 training examples, while the convex data set has 8000 training examples; both data sets have 50000 test examples. These data sets have been extensively benchmarked by previous authors [11]. Our experiments in binary classification focused on these data sets because in previously reported benchmarks, they exhibited the biggest performance gap between deep architectures (e.g., deep belief nets) and traditional SVMs. We followed the same experimental methodology as previous authors [11]. SVMs were trained using libSVM (version 2.88) [12], a publicly available software package. For each SVM, we used the last 2000 training examples as a validation set to choose the margin penalty parameter; after choosing this parameter by cross-validation, we then retrained each SVM using all the training examples. For reference, we also report the best results obtained previously from three-layer deep belief nets (DBN-3) and SVMs with RBF kernels (SVM-RBF). These references appear to be representative of the current state-of-the-art for deep and shallow architectures on these data sets. Figures 2 and 3 show the test set error rates from arc-cosine kernels of varying degree (n) and levels of recursion (l). We experimented with kernels of degree n = 0, 1 and 2, corresponding to thresh- old networks with “step”, “ramp”, and “quarter-pipe” activation functions. We also experimented with the multilayer kernels described in section 2.3, composed from one to six levels of recursion. Overall, the figures show that many SVMs with arc-cosine kernels outperform traditional SVMs, and a certain number also outperform deep belief nets. In addition to their solid performance, we note that SVMs with arc-cosine kernels are very straightforward to train; unlike SVMs with RBF kernels, they do not require tuning a kernel width parameter, and unlike deep belief nets, they do not require solving a difficult nonlinear optimization or searching over possible architectures. Our experiments with multilayer kernels revealed that these SVMs only performed well when arc- cosine kernels of degree n = 1 were used at higher (l > 1) levels in the recursion. Figs. 2 and 3 therefore show only these sets of results; in particular, each group of bars shows the test error rates when a particular kernel (of degree n = 0,1,2) was used at the first layer of nonlinearity, while the n = 1 kernel was used at successive layers. We hypothesize that only n = 1 arc-cosine kernels preserve sufficient information about the magnitude of their inputs to work effectively in composition with other kernels. Recall that only the n = 1 arc-cosine kernel preserves the norm of its inputs: the n = 0 kernel maps all inputs onto a unit hypersphere in feature space, while higher- order (n> 1) kernels induce feature spaces with different dynamic ranges. Finally, the results on both data sets reveal an interesting trend: the multilayer arc-cosine kernels often perform better than their single-layer counterparts. Though SVMs are (inherently) shallow architectures, this trend suggests that for these problems in binary classification, arc-cosine kernels may be yielding some of the advantages typically associated with deep architectures. 3 Deep learning In this section, we explore how to use kernel methods in deep architectures [7]. We show how to train deep kernel-based architectures by a simple combination of supervised and unsupervised methods. Using the arc-cosine kernels in the previous section, these multilayer kernel machines (MKMs) perform very competitively on multiclass data sets designed to foil shallow architectures [11]. 5/n Just need report on the paper in word doc not in pdf Report should follow the instruction mentioned in the file. Like the format. APA 3 PAGES Need CITATION and Reference also No codeSee Answer
  • Q13:3. Can you reproduce the results of Testing Neural ODE architecture on MNIST from the following link: Learning true dynamics function. (a) Plot the neural ODE architecture for your simulation. (b) Calculate the number of layers in this architecture, and write down your loss function. (c) Display your training error and testing error.See Answer
  • Q14:2. Consider the problem y = x - y² = f(x, y), y(0) = 0. For NЄN, we divide the interval [0, 1] by the N + 1 mesh points, 0 = 20$=h£N=Nh=1, with h 1/N as the step size. Let N = 10, and consider the following numerical scheme, Yn+1 = Yn-1 +2hf (xn, Yn). (2) Here, y, is the numerical solution for y(x). (a) Estimate the local truncation error for (2) for an abstract function f(x,y) which has bounded partial derivatives up to order two with respect to the second component. 1 (b) In order to apply numerical scheme (2), one can get an approximation to y(x1) by explicit Euler scheme, and denote it as y₁. Then by applying (2), one can obtain Yj for j 2, N. Calcuate Yj for j 1, N in this manner.See Answer
  • Q15:(60 points) Part 2: Q- Learning on an Atari Game Environment In this part of the assignment, you will adapt the Q-Learning code from Part 1 to an Atari game environment of your choosing. Objective: Adapt the Q-Learning code to an Atari game environment. Tasks: 1. Choose an Atari game environment from the RL Gym library[1]. 2. Adapt the Q-Learning code from Part 1 to work with the chosen Atari game environment. 3. Train your Q-Learning agent on the Atari game environment.See Answer
  • Q16:Programming Problem: Question 3: Design a genetic algorithm to solve the polynomial fitting problem that we did in Homework #1. You need to implement a genetic algorithm using BOTH mutation AND crossover operations. You need to decide a mutation rate and a crossover rate. Because the polynomial coefficients are numeric variables, consider using either numpy arrays or torch tensors to store their values. Plot the following in one figure: a) the original noisy data b) the polynomial you obtained in Homework #1 c) the polynomial obtained from this implementation Compare and discuss the difference in performance of the two polynomials obtained with two different methods. Note: if your solution for Homework #1 did not work correctly, remake it now using the Homework #1 method (numpy polyfit() function)See Answer
  • Q17:3. Consider a two-dimensional class problem that involves two classes wi (+1) and w₂ (-1). Each one of them is modeled by a mixture of equiprobable Gaussian distributions. Specifically, the means of the Gaussians associated with w₁ are [55] and [55], whereas the means of the Gaussians associated with w₂ are [-5 -5], [00], [55]. The covariance matrices of all Gaussians are an identity matrix I. (a) Generate and plot a data set X₁ (training set) containing 100 points from w₁ (50 points from each associated Gaussian) and 150 points from w2 (again 50 points from each associated Gaussian). In the same way, generate an additional set X2 (test set). (b) Based on X1, train a two-layer neural network with two nodes in the hidden layer, each one having the hyperbolic tangent as activation function and a single output node with linear activation function, 10, using the standard back- propagation algorithm for 9000 iterations and step size equal to 0.01. Compute the training and test errors, based on X1 and X2, respectively. Also, plot the test points as well as the decision lines formed by the network. Finally, plot the training error versus the number of iterations. (This plot is similar to figure (a) (b) on Slide 51 of Lecture 5.) (c) Repeat (b) for step size equal to 0.0001 and comment on the results. Hint: Use different seeds in the rand (MATLAB) function for the train and the test sets. To train the neural networks, use the newff (MATLAB) function. To plot the decision region performed by a neural network, first determine the boundaries of the region where the data live (for each dimension determine the minimum and the maximum values of the data points), then apply a rectangular grid on this region, and for each point in the grid compute the output of the network. Then draw this point with different colors according to the class it is assigned to (use, e.g., the "magenta" and "cyan" colors).See Answer
  • Q18:2. Consider the sum of the squared errors cost function N KL J = 2 ΣΣ(imm - Ynm)². n=1 m=1 Compute the elements of the Hessian matrix J² J მ0 მ0]}, kj Near the optimum, show that the second order derivatives can be approximated by N KL მ2.J = ΣΣ дупт дупт n=1 m=1 kj In other words, the second-order derivatives can be approximated as products of the first-order derivatives.See Answer
  • Q19:1. (a) The logistic sigmoid function is defined as 1 f(z) 1+ exp(-az) where a > 0. Show that the derivative of the sigmoid function is df(z) dz = = aƒ(z) [1 − f(z)] . (b) The hyperbolic tangent function is defined as f(z)= a tanh " where cand a are controlling parameters. Show that the derivative of the hyperbolic tangent function is df(z) с dz = 2a [a² – f²(z)].See Answer
  • Q20: Dataset- https://www.kaggle.com/competitions/house-prices-advanced-regression-techniques/data?fbclid =lwZXh0bgNhZW0CMTAAAR2BnKiEpOhh Rocut-ITwKV4mAWPBUCDXYclJxsSKBoL7uTbnYC vUvdnVY4_aem Ad8b0GC7IH3dkbZFw1tHoe8eNgy8QpldmsX5NbhkXGnoj5Zu3rFQUyFtEcX5 2SSjRweNmZex44ZKz19yLOVBJhsD Language - PYTHON (Submit the codes via jupyter notebook ) NEED- Code with comments + Output screenshots + 20-25 slides PPT(APA Format) on itSee Answer
View More

Popular Subjects for Machine Learning

You can get the best rated step-by-step problem explanations from 65000+ expert tutors by ordering TutorBin Machine Learning homework help.

Get Instant Machine Learning Solutions From TutorBin App Now!

Get personalized homework help in your pocket! Enjoy your $20 reward upon registration!

Claim Your Offer

Sign Up now and Get $20 in your wallet

Moneyback

Guarantee

Free Plagiarism

Reports

$20 reward

Upon registration

Full Privacy

Full Privacy

Unlimited

Rewrites/revisions

Testimonials

TutorBin has got more than 3k positive ratings from our users around the world. Some of the students and teachers were greatly helped by TutorBin.

"After using their service, I decided to return back to them whenever I need their assistance. They will never disappoint you and craft the perfect homework for you after carrying out extensive research. It will surely amp up your performance and you will soon outperform your peers."

Olivia

"Ever since I started using this service, my life became easy. Now I have plenty of time to immerse myself in more important tasks viz., preparing for exams. TutorBin went above and beyond my expectations. They provide excellent quality tasks within deadlines. My grades improved exponentially after seeking their assistance."

Gloria

"They are amazing. I sought their help with my art assignment and the answers they provided were unique and devoid of plagiarism. They really helped me get into the good books of my professor. I would highly recommend their service."

Michael

"The service they provide is great. Their answers are unique and expert professionals with a minimum of 5 years of experience work on the assignments. Expect the answers to be of the highest quality and get ready to see your grades soar."

Richard

"They provide excellent assistance. What I loved the most about them is their homework help. They are available around the clock and work until you derive complete satisfaction. If you decide to use their service, expect a positive disconfirmation of expectations."

Willow

TutorBin helping students around the globe

TutorBin believes that distance should never be a barrier to learning. Over 500000+ orders and 100000+ happy customers explain TutorBin has become the name that keeps learning fun in the UK, USA, Canada, Australia, Singapore, and UAE.