代做41040 Introduction to Artificial Intelligence - Spring 2025 Lab 5代做留学生SQL 程序

- 首页 >> Java编程

Lab 5. Supervised Learning Algorithms – Part II (Neural network models)

Aims: This lab provides an opportunity for you to learn from lab demos how to use neural network based models to solve simple classification, regression and time series prediction problems.

The specific techniques used include (1) perceptron model for a binary classification problem, (2) multilayer perceptrons or feedforward neural network (FNN) model for a classification problem (binary or multi-class classification problem) and a regression problem (single output or multi-output regression problem), (3) recurrent neural network (RNN) for time series prediction, (4) Long-term short memory (LSTM) network for time series prediction and (5) Gated recurrent unit (GRU) for time series prediction.

Tasks:

Task 1. First, learn from the Demo given by your tutor, which demonstrates

o how to load a dataset stored in a local csv file, which defines a simple binary classification problem of telling if a given patient has diabetes,

o how to separate the dataset into the inputs and outputs using a method drop(),

o how to split it into train and test datasets,

o how to develop a Perceptron model

o how to develop a feedforward neural network (FNN) model, and

o for the perceptron model, try different penalty options (l1, l2, elasticnet with a l1_ratio) and compare the evaluation results.

o for a FNN model, try different network configurations such as numbers of neurons in hidden layers and compare the evaluation results.

Notebook name:

binaryClassification_perceptron_FNN_solution.ipynb   

Dataset used: diabetes.csv  (local csv file, provided in Lab5 package)

Task 2. First, Learn from the Demo given by your tutor, which demonstrates

o how to load a dataset stored in a local csv file, which defines either a simple regression problem of predicting the price of a given house or a simple multi-class classification problem of predicting the class label of a given wine,

o how to load a dataset that is online through a 3rd party loader, which defines a simple multi-output regression problem of forecasting three continuous variables (weight, waist and pules) given a set of features

o how to develop a feedforward neural network model to solve a regression problem with single output or multi-outputs or a three-class classification problem,

o try different network configurations such as numbers of neurons in hidden layers in each problem solution and compare the evaluation results.

Notebook name:

FNN_regression_classification_solution.ipynb   

Datasets used:

1) HousingData.csv ((local csv file, provided in the package)) and

2) Linnerud dataset, which is about the physical exercise and available in sklearn datasets, accessed through a 3rd party loader (load_linnerud()).

3) wine.csv (local csv file, provided in the package)

Task 3. First, Learn from the Demo given by your tutor, which demonstrates

o how to transform. the given time series dataset into the format that can be used by a recurrent neural network (RNN), a Long short-term memory (LSTM) network, or a gated recurrent unit (GRU) network

o how to develop a RNN or LSTM or GRU model using Tensorflow and Keras

o how to apply a RNN or LSTM or GRU model to predict the future values in a time series, and

o try different numbers of units in RNN, LSTM and GRU and compare the evaluation results.

Notebook name:

TimeSeries_RNN_LSTM_GRU_solution.ipynb  

Dataset used: airline-passengers.csv (local csv file, provided in the package)

 


站长地图