GithubHelp home page GithubHelp logo

guntas-13 / ml_2024_tensionflow_a3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robohrriday/ml_2024_tensionflow_a3

0.0 0.0 0.0 128.67 MB

Assignment 3 of ES 335: Machine Learning Course (Spring 2024) - TensionFlow

Python 0.19% Jupyter Notebook 99.81%

ml_2024_tensionflow_a3's Introduction

ML_2024_TensionFlow_A3

Assignment 3 of ES 335: Machine Learning Course (Spring 2024) - TensionFlow Assignment 3 Problem Statements: Problem Statements

Datasets: Link

Embedding the characters as a Vector $\in \mathbb{R}^N$

Input layer of the model and creating the training examples

To run the StreamLit App, run the script:

streamlit run app.py

Streamlit App hosted at (https://tensionflowcharpredict.streamlit.app/)

  1. Replicate the notebook on the next character prediction and use it for generation of text. Use one of the datasets specified below for training. Refer to Andrej Karpathy’s blog post on Effectiveness of RNNs. Visualise the embeddings using t-SNE if using more than 2 dimensions or using a scatter plot if using 2 dimensions. Write a streamlit application which asks users for an input text and it then predicts next k characters [5 marks]

    Datasets (first few based on Effectiveness of RNN blog post from Karpathy et al.)

    • Paul Graham essays
    • Wikipedia (English)
    • Shakespeare
    • Maths texbook
    • Something comparable in spirit but of your choice (do confirm with TA Ayush)
  2. Learn the following models on XOR dataset (refer to Tensorflow Playground and generate the dataset on your own containing 200 training instances and 200 test instances) such that all these models achieve similar results (good). The definition of good is left subjective – but you would expect the classifier to capture the shape of the XOR function.

    • a MLP
    • MLP w/ L1 regularization (you may vary the penalty coefficient by choose the best one using a validation dataset)
    • MLP w/ L2 regularization (you may vary the penalty coefficient by choose the best one using a validation dataset)
    • learn logistic regression models on the same data with additional features (such as x1*x2, x1^2, etc.)

Show the decision surface and comment on the plots obtained for different models. [2 marks]

  1. Using the Mauna Lua CO2 dataset (monthly) perform forecasting using an MLP and compare the results with that of MA (Moving Average) and ARMA (Auto Regressive Moving Average) models. Main setting: use previous “K” readings to predict next “T” reading. Example, if “K=3” and “T=1” then we use data from Jan, Feb, March and then predict the reading for April. Comment on why you observe such results. For MA or ARMA you can use any library or implement it from scratch. The choice of MLP is up to you. [2 marks]
  2. Train on MNIST dataset using an MLP. The original training dataset contains 60,000 images and test contains 10,000 images. If you are short on compute, use a stratified subset of a smaller number of images. But, the test set remains the same 10,000 images. Compare against RF and Logistic Regression models. The metrics can be: F1-score, confusion matrix. What do you observe? What all digits are commonly confused?

Let us assume your MLP has 30 neurons in first layer, 20 in second layer and then 10 finally for the output layer (corresponding to 10 classes). On the trained MLP, plot the t-SNE for the output from the layer containing 20 neurons for the 10 digits. Contrast this with the t-SNE for the same layer but for an untrained model. What do you conclude?

Now, use the trained MLP to predict on the Fashion-MNIST dataset. What do you observe? How do the embeddings (t-SNE viz for the second layer compare for MNIST and Fashion-MNIST images) [3 marks]

ml_2024_tensionflow_a3's People

Contributors

guntas-13 avatar mumukshjain avatar robohrriday avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.