Skip to main content

A small example package

Project description

Two Layer Perceptron

A Two Layer Perceptron(specialized Multi Layer Perceptron) from scratch. The whole program is implemented on the principles of Object Oriented Programming Design. The program fetches mnist data, stores into a database then retrieves it using APIs. These APIs for creation, storing and retreiving from the database has also been implemented from scratch on the lines of OOPD.

Authors

  • Giridhar S. [MT21026]
  • Palani Vigneshwar [MT21062]
  • Shashwat Vaibhav [Mt21082]
  • Arpit Mathur [MT20328]

Necessary Modules

The modules and standard routines need to be pre-installed are as follows:-

  • numpy
  • pandas
  • matplotlib
  • sklearn
  • sqlite3
  • pycallgraph

Necessary Imports

  • numpy
  • pandas
  • matplotlib.pyplot
  • matplotlib.image
  • sklearn.datasets.load_digits
  • sqlite3
  • sklearn.preprocessing.StandardScaler
  • sklearn.preprocessing.MinMaxScaler
  • sklearn.model_selection.train_test_split
  • sklearn.metrics.classification_report
  • sklearn.model_selection accuracy_score
  • pycallgraph.PyCallGraph
  • pycallgraph.output.GraphvizOutput
  • pycallgraph.Config
  • pycallgraph.GlobbingFilter

Classes Defined

DescribeNCreate:

  • provides methods to get information, descriptive statistics and dataframe creation utility
  • accepts bunch dataset during instantiation.

DataBASE:

  • Inherits from DescribeNCreate class
  • Provides method to create and store to a database from dataframe proovided to it.
  • Implements all the Schema creation, insertion and exception handling for Database Error from scratch.

FetchFB:

  • Inherits from DataBASE class
  • provides utility to fetch database rows by implementing fetch query from scratch.
  • performs exception handling.

newDataBase:

  • instantiated by providing database name and table name of our choice.
  • provide methods to store the results from 2 Layer Perceptron into a database.
  • performs schema creation and Insertion queries from scratch.

Activation_Function:

  • It acts as a generic class to implement several activation functions such as Sigmoid, ReLu, Tanh and Softmax.

propagation:

  • inherits from Activation_Function class.
  • implements methods necessary for forward and backward propagation.

tlp:

  • most imporrtant of all, inherits from propagation class.
  • provides methods to set weights, hyperparameters parameters, initialization and updation.
  • provides the important fit and predict utility.
  • provides accuracy_score utility as well.
  • all the methods implemented from scratch.

Folders,Files wheel and installation info @Giridhar

oopd_iiitd_group9-0.0.1-py3-none-any.whl:

  • Wheel file which can be installed via -> pip install oopd_iiitd_group9-0.0.1-py3-none-any.whl
  • the classes in the wheel file can be accessed as follows -> from project.code import *
  • the project above is a folder in the wheel file

main:

  • This folder contains the files with running code
  • This folder contains two files main_code.py and code_with_whl.py

main_code.py:

  • This file contains the main code with all the classes.

code_with_whl.py:

  • This file contains only the code in main(). The whl file installed is used here and the classes from the wheel file is used here
  • Please look into oopd_iiitd_group9-0.0.1-py3-none-any.whl section

src:

  • This folder is used to create the whl file i.e. for packaging
  • It is not the main running folder.

dist:

  • This also contains the .whl file and got why building the file

doxygen_html:

  • This folder contains all the html files generated by doxygen.

profiling_pycallgraph:

  • This is the profiling report created using pycallgraph and is in the format of .png

UML Class diagram:

  • This is the UML class diagram visualising the classes and the relations in the main code.

setup.cfg

  • Used in creating the wheel file (.whl file)

pyproject.toml

  • Used in creating the wheel file (.whl file)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oopd_iiitd_group10-0.0.1.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

oopd_iiitd_group10-0.0.1-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page