org.encog.platformspecific.j2se.data
Class SQLNeuralDataSet
- java.lang.Object
-
- org.encog.ml.data.basic.BasicMLDataSet
-
- org.encog.platformspecific.j2se.data.SQLNeuralDataSet
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<MLDataPair>, MLDataSet
public class SQLNeuralDataSet extends BasicMLDataSet
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: SQLCODEC.FETCH_SIZE = 1000;- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.encog.ml.data.basic.BasicMLDataSet
BasicMLDataSet.BasicMLIterator
-
-
Constructor Summary
Constructors Constructor and Description SQLNeuralDataSet(java.sql.Connection theConnection, java.lang.String theSQL, int theInputSize, int theIdealSize)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
-
Methods inherited from class org.encog.ml.data.basic.BasicMLDataSet
add, add, add, clone, close, get, getData, getIdealSize, getInputSize, getRecord, getRecordCount, isSupervised, iterator, openAdditional, setData, size, toList
-
-
-
-
Constructor Detail
-
SQLNeuralDataSet
public SQLNeuralDataSet(java.sql.Connection theConnection, java.lang.String theSQL, int theInputSize, int theIdealSize)Create a SQLNeuralDataSet based on the specified connection. This connection WILL NOT be closed when the close method is called.- Parameters:
theConnection- The connection to use.theSQL- The SQL command to execute.theInputSize- The size of the input data.theIdealSize- The size of the ideal data.
-
SQLNeuralDataSet
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)Construct a SQL dataset. A connection will be opened, this connection will be closed when the close method is called.- Parameters:
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG