|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.encog.neural.data.sql.SQLNeuralDataSet
public class SQLNeuralDataSet
A dataset based on a SQL query. This is not a memory based dataset, so it can handle very large datasets without a memory issue. This class makes use of JDBC to query the database. If you are running into "out of memory" issues with this class try setting a lower "fetch size". This can be done with: sqlDataSet.getStatement().setFetchSize(1000);
| Nested Class Summary | |
|---|---|
class |
SQLNeuralDataSet.SQLNeuralIterator
Iterator used to iterate over SQL results. |
| Field Summary | |
|---|---|
static java.lang.String |
ADD_NOT_SUPPORTED
Error message: adds are not supported. |
static java.lang.String |
REMOVE_NOT_SUPPORTED
Error message: removes are not supported. |
| Constructor Summary | |
|---|---|
SQLNeuralDataSet(java.sql.Connection connection,
java.lang.String sql,
int inputSize,
int idealSize)
Create a SQLNeuralDataSet based on the specified connection. |
|
SQLNeuralDataSet(java.lang.String sql,
int inputSize,
int idealSize,
java.lang.String driver,
java.lang.String url,
java.lang.String uid,
java.lang.String pwd)
Construct a SQL dataset. |
|
| Method Summary | |
|---|---|
void |
add(NeuralData data1)
Adds are not supported. |
void |
add(NeuralData inputData,
NeuralData idealData)
Adds are not supported. |
void |
add(NeuralDataPair inputData)
Adds are not supported. |
void |
close()
Close the SQL connection. |
java.sql.Connection |
getConnection()
|
int |
getIdealSize()
|
int |
getInputSize()
|
java.sql.PreparedStatement |
getStatement()
|
boolean |
isCloseConnection()
|
java.util.Iterator<NeuralDataPair> |
iterator()
Get an iterator for this collection. |
void |
setCloseConnection(boolean closeConnection)
Allows you to determine if the connection should be closed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ADD_NOT_SUPPORTED
public static final java.lang.String REMOVE_NOT_SUPPORTED
| Constructor Detail |
|---|
public SQLNeuralDataSet(java.sql.Connection connection,
java.lang.String sql,
int inputSize,
int idealSize)
connection - The connection to use.sql - The SQL command to execute.inputSize - The size of the input data.idealSize - The size of the ideal data.
public SQLNeuralDataSet(java.lang.String sql,
int inputSize,
int idealSize,
java.lang.String driver,
java.lang.String url,
java.lang.String uid,
java.lang.String pwd)
sql - The SQL command to execute.inputSize - The size of the input data.idealSize - The size of the ideal data.driver - The driver to use.url - The database connection URL.uid - The database user id.pwd - The database password.| Method Detail |
|---|
public void add(NeuralData data1)
add in interface NeuralDataSetdata1 - Not used.
public void add(NeuralData inputData,
NeuralData idealData)
add in interface NeuralDataSetinputData - Not used.idealData - Not used.public void add(NeuralDataPair inputData)
add in interface NeuralDataSetinputData - Not used.public void close()
close in interface NeuralDataSetpublic java.sql.Connection getConnection()
public int getIdealSize()
getIdealSize in interface NeuralDataSetpublic int getInputSize()
getInputSize in interface NeuralDataSetpublic java.sql.PreparedStatement getStatement()
public boolean isCloseConnection()
public java.util.Iterator<NeuralDataPair> iterator()
iterator in interface java.lang.Iterable<NeuralDataPair>public void setCloseConnection(boolean closeConnection)
closeConnection - True if the connection should be closed.
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||