![]() ![]() Instances data = query.retrieveInstances() Ĭonnection db = DriverManager.getConnection("jdbc:postgresql:"ĭatabaseMetaData dbmd = db.getMetaData() tQuery("SELECT price FROM products LIMIT 20") InstanceQuery query = new InstanceQuery() ![]() Public static void main(String args) throws ClassNotFoundException, The other is just a reference for general use of the database. One uses the configuration above to create instances directly from a query. The code below shows two examples combined. JdbcURL=jdbc:postgresql://localhost:5432/my_database_name Optional: If you look below, I added the mapping “numeric=2” to show that the Postgres type numeric should be translated as a Java double. Look for two files, DataUtils.props and .Ħ) Create a backup of DataUtils.props and replace the contents of the original with that of .ħ) Edit the jdbcURL to your own configurations, “jdbcURL=jdbc:postgresql://localhost:5432/my_database_name” 1) Make sure you have Weka downloaded and Weka.jar extracted into a folder.ģ) Navigate to “Java Build Path” -> “Libraries”Ĥ) “Add External Class Folder” and choose your extracted weka folderĥ) Navigate inside the extracted weka folder to weka/experiment.
0 Comments
Leave a Reply. |