models: contains relevant code for different NN models (manualNN.py: a NN from scratch; rest are tensorflow based models of varying complexity)
saved_models: contains .h5 tensorflow models that have been trained
utils: contains helper scripts
data: contains the dataset
Download the dataset from https://archive.ics.uci.edu/ml/machine-learning-databases/00310/UJIndoorLoc.zip and extract trainingData.csv and validationData.csv to the data/ folder as:
- data/trainingData.csv
- data/validationData.csv
Python: 3.7
DataExploration.py is only for additional info but all details relevant are covered in Report_IndoorLoc.pdf.
Main script:
python main.py --Train 0 --Name tf_smallDNN
Preferably set up a virtual environment at \venv. With conda>4.6, in your Anaconda prompt:
4.1. >> conda cd ..[PREFERRED-DIRECTORY]
4.2. >> conda create -n venv python=3.7
4.3. >> conda activate venv
4.4. >> pip install -r requirements.txt
Depending on the argparse, main.py will either:
- train, save and evaluate a specific model architecture
- or, load a saved model and evaluate it
For example: >> python main.py --Train 0 --Name tf_smallDNN
will load the saved model and evaluate it on test set
Train, save and evaluate models: >> python main.py --Train 1 --Name tf_smallDNN
- if args --Train == 1 and --Name = 'name' then train 'name' model on the dataset in ./data where
'name' represents a specific architecture of model: {manualNN, tf_simpleNN, tf_smallDNN, tf_DNN}
manualNN: a single node NN created with manual code
tf_simpleNN: TF based regression and classification models with single node
tf_smallDNN: TF based regression and classification models with 1 hidden layer and 16 nodes
tf_DNN: TF based regression and classification models with 2 hidden layer and 64 nodes each
- After training saves the model in 'saved_models/name.h5'
- After saving Evaluates the model against LONGITUDE, LATITUDE, BUILDINGID and FLOOR prediction on test set and results are displayed on prompt
Load the saved models and evaluate them: >> python main.py --Train 0 --Name tf_smallDNN