|
||||||||||
| 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 String |
ADD_NOT_SUPPORTED
Error message: adds are not supported. |
static String |
REMOVE_NOT_SUPPORTED
Error message: removes are not supported. |
| Constructor Summary | |
|---|---|
SQLNeuralDataSet(Connection connection,
String sql,
int inputSize,
int idealSize)
Create a SQLNeuralDataSet based on the specified connection. |
|
SQLNeuralDataSet(String sql,
int inputSize,
int idealSize,
String driver,
String url,
String uid,
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. |
Connection |
getConnection()
|
int |
getIdealSize()
|
int |
getInputSize()
|
PreparedStatement |
getStatement()
|
boolean |
isCloseConnection()
|
boolean |
isSupervised()
|
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 String ADD_NOT_SUPPORTED
public static final String REMOVE_NOT_SUPPORTED
| Constructor Detail |
|---|
public SQLNeuralDataSet(Connection connection,
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(String sql,
int inputSize,
int idealSize,
String driver,
String url,
String uid,
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 Connection getConnection()
public int getIdealSize()
getIdealSize in interface EngineDataSetgetIdealSize in interface NeuralDataSetpublic int getInputSize()
getInputSize in interface EngineDataSetgetInputSize in interface NeuralDataSetpublic PreparedStatement getStatement()
public boolean isCloseConnection()
public Iterator<NeuralDataPair> iterator()
iterator in interface Iterable<NeuralDataPair>public void setCloseConnection(boolean closeConnection)
closeConnection - True if the connection should be closed.public boolean isSupervised()
isSupervised in interface EngineDataSetisSupervised in interface NeuralDataSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||