Exemple #1
0
#!/usr/bin/python

# This example uses text input fields

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output value is the second field (index 1)
noOfSamples = deeplearn.readCsvFile("xor.data", 4, 1, [2], 0)
print str(noOfSamples) + " samples loaded"

# The error threshold (percent) for each layer of the network.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([0.8, 0.8])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.2)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(0.001)

# Title of the training error image
deeplearn.setPlotTitle("Xor Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(50000)

print "Training started"

timeStep = 0
Exemple #2
0
#!/usr/bin/env python3

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output value is the 12th field (index 11)
noOfSamples = deeplearn.readCsvFile("winequality-white.csv", 10, 3, [11], 0)
print(str(noOfSamples) + " samples loaded")

# The error threshold (percent) for each layer of the network.
# Three hidden layers, plus the final training.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([1.6, 2.05, 4.0, 9.5])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.5)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(0.001)

# Title of the training error image
deeplearn.setPlotTitle("White Wine Quality Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(500000)

print("Training started")

timeStep = 0
while (deeplearn.training() != 0):
Exemple #3
0
#!/usr/bin/env python3

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output value is the second field (index 1)
noOfSamples = deeplearn.readCsvFile("xor.data", 4, 1, [2], 0)
print(str(noOfSamples) + " samples loaded")

# The error threshold (percent) for each layer of the network.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([0.8, 0.8])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.2)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(0.001)

# Title of the training error image
deeplearn.setPlotTitle("Xor Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(50000)

print("Training started")

timeStep = 0
while (deeplearn.training() != 0):
    timeStep = timeStep + 1
#!/usr/bin/env python2

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output values are within field indexes 7,8,9 and 10
noOfSamples = deeplearn.readCsvFile("slump_test.data", 16, 3, [7, 8, 9, 10], 0)
print str(noOfSamples) + " samples loaded"

# The error threshold (percent) for each layer of the network.
# Three hidden layers, plus the final training.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([0.5, 0.5, 0.5, 2.0])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.2)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(0.001)

# Title of the training error image
deeplearn.setPlotTitle("Concrete Slump Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(900000)

print "Training started"

timeStep = 0
while (deeplearn.training() != 0):
#!/usr/bin/env python3

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output value is the second field (index 1)
noOfSamples = deeplearn.readCsvFile("wdbc.data", 16, 3, [1], 0)
print(str(noOfSamples) + " samples loaded")

# The error threshold (percent) for each layer of the network.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([1.0, 1.0, 1.5, 6.0])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.2)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(2.0)

# Title of the training error image
deeplearn.setPlotTitle("Cancer Classification Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(500000)

print("Training started")

timeStep = 0
while (deeplearn.training() != 0):
    timeStep = timeStep + 1
#!/usr/bin/env python2

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output value is the second field (index 1)
noOfSamples = deeplearn.readCsvFile("wdbc.data", 16, 3, [1], 0)
print str(noOfSamples) + " samples loaded"

# The error threshold (percent) for each layer of the network.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([3.0, 3.0, 3.5, 3.0])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.2)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(2.0)

# Title of the training error image
deeplearn.setPlotTitle("Cancer Classification Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(500000)

print "Training started"

timeStep = 0
while (deeplearn.training() != 0):
    timeStep = timeStep + 1
Exemple #7
0
#!/usr/bin/python

import deeplearn

samplesPerAxis = 128
axes = 3

# Reads a number of data samples from a CSV file
noOfSamples = deeplearn.readCsvFile("data.csv", samplesPerAxis*(axes-1), 3, [1], 0)
print str(noOfSamples) + " samples loaded"

# The error threshold (percent) for each layer of the network.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([5.0, 7.0, 7.0, 20.0])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.5)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(0.001)

# Title of the training error image
deeplearn.setPlotTitle("Catmuzzle Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(50000)

print "Training started"

timeStep = 0
Exemple #8
0
#!/usr/bin/python

import deeplearn

# The number of iris species to classify
no_of_classes = 3

# Reads a number of data samples from a CSV file
# where the expected output value is the fifth field (index 4)
noOfSamples = deeplearn.readCsvFile("iris.data", 16, 3, [4], no_of_classes)
print str(noOfSamples) + " samples loaded"

# The error threshold (percent) for each layer of the network.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([0.5, 0.5, 0.5, 2.5])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.1)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(0.01)

# Title of the training error image
deeplearn.setPlotTitle("Iris Species Classification Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(500000)

print "Training started"
#!/usr/bin/python

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output value is the second field (index 1)
noOfSamples = deeplearn.readCsvFile("wdbc.data", 16, 3, [1], 0)
print str(noOfSamples) + " samples loaded"

# The error threshold (percent) for each layer of the network.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([3.0, 3.0, 3.5, 3.0])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.2)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(2.0)

# Title of the training error image
deeplearn.setPlotTitle("Cancer Classification Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(500000)

print "Training started"

timeStep = 0
while (deeplearn.training() != 0):
    timeStep = timeStep + 1
#!/usr/bin/python

import deeplearn

# Reads a number of data samples from a CSV file
# where the expected output value is the 12th field (index 11)
noOfSamples = deeplearn.readCsvFile("winequality-white.csv", 10, 3, [11], 0)
print str(noOfSamples) + " samples loaded"

# The error threshold (percent) for each layer of the network.
# Three hidden layers, plus the final training.
# After going below the threshold the pre-training will move
# on to the next layer
deeplearn.setErrorThresholds([1.6, 2.05, 4.0, 9.5])

# The learning rate in the range 0.0-1.0
deeplearn.setLearningRate(0.5)

# The percentage of dropouts in the range 0-100
deeplearn.setDropoutsPercent(0.001)

# Title of the training error image
deeplearn.setPlotTitle("White Wine Quality Training")

# The number of time steps after which the training error image is redrawn
deeplearn.setHistoryPlotInterval(500000)

print "Training started"

timeStep = 0
while (deeplearn.training() != 0):