Giter VIP home page Giter VIP logo

damp's Introduction

DAMP

Damp is a Deep Learning Library for the Android Platform.

Third party libraries

Uses JAMA a basic linear algebra package for Java. (http://math.nist.gov/javanumerics/jama/)

Example Code

Binary Classification using Titanic Dataset.
Reference from Karthik M Swamy github code for TFLearn (https://github.com/karthikmswamy/TFTutorials/blob/master/TFLearn_Tutorials/Titanic_TFLearn.py).
TitanicDataSet dataSet = new TitanicDataSet(this);
int[] columnsToIgnore = {2, 7};
dataSet.loadDataSet(0, columnsToIgnore);

// Build the neural network.
FullyConnectedLayer fc1 = new FullyConnectedLayer(6, 32, "sigmoid", 0.0);
fc1.learningRate = 0.01;
fc1.regLambda = 0.0;
fc1.useBatchNormalization = true;
fc1.learningRateDecayFactor = 0.1;
fc1.useLRDecay = true;
fc1.activation = new SigmoidActivation();
fc1.optimizer = new SGDOptimizer(0.9, 0.01);
fc1.useDropout = true;
fc1.dropoutP = 0.6;
SoftmaxLayer sf1 = new SoftmaxLayer(32, 2, 0.0);
sf1.activation = new SigmoidActivation();
sf1.optimizer = new SGDOptimizer(0.9, 0.01);

FeedForwardNetwork network = new FeedForwardNetwork(NeuralNetUtils.featureNormalize(dataSet.featuresMatrix, 0), dataSet.labelsMatrix, 16);
List<Layer> layers = new ArrayList<Layer>();
layers.add(fc1);
layers.add(sf1);
network.layers = layers;
network.epochs = 100;
network.fit();

// Test Data.
List<String[]> testList = new ArrayList<String[]>();
String[] dicaprio = {"0", "3", "JackDawson", "male", "19", "0", "0", "N/A", "5.0000"};
String[] winslet = {"1", "1", "Rose DeWitt Bukater", "female", "17", "1", "2", "N/A", "100.0000"};
testList.add(dicaprio);
testList.add(winslet);

TitanicDataSet testSet = preprocess(testList, 0, columnsToIgnore);
network.predict(testSet.featuresMatrix);

NeuralNetUtils.printMatrix(network.layers.get(network.layers.size()-1).output);
NeuralNetUtils.printMatrix(network.layers.get(network.layers.size()-1).yOut);

damp's People

Contributors

yashiro32 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

priveyes

damp's Issues

about titanic

As everything work well, I've a simple question :

Is it possible to have percentage of chance to survive and the class "yes/no" ?

if i i add a passenger to predict, then if i have 3,
I'll to have a max percentage of 100 and for example
passenger 1 : 25%
passenger 2: 12%
passenger 3 : 73%

is it the last of softmaxlayer ?

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.