Skip to content

mehtadeepen/Image-Classification-in-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. Instructions to run the code goes here.
  2. Track all softwares and their versions here. It is the responsibility of the new library/package adder to update this file.

Dependencies

  1. NumPy -- pip install numpy
  2. h5py -- pip install h5py

Load Dataset

  1. python main.py -h -> Help command

  2. python main.py -l knn -> For the first time you run the code. This loads the dataset from your data folder and converts them into h5 file

  3. python main.py knn -> Loads the h5 files directly

Run Cross Validation CrossValidation.py is a simple utility to generate the cross validation folds.

Here is a template for using it.

    1. Create an object.
    
    crossValidObj = CrossValidation(numOfFolds, allData, allLabels)
    
    2. Generate Train and test
    
    foldsGen = crossValidObj.generateTrainAndTest()
    
    3. Iterate over the num of folds and access the train and test data
    
    for i in xrange(numOfFolds):
        next(foldsGen)
            crossValidObj = CrossValidation(numOfFolds, allData, allLabels)
    foldsGen = crossValidObj.generateTrainAndTest()
    for i in xrange(numOfFolds):
        next(foldsGen)
        X_train = crossValidObj.train
        y_train = crossValidObj.labels_train
        X_test = crossValidObj.test
        y_test = crossValidObj.labels_test
        //Call Whatever method you want.
        //Average the accuracy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages