First, you'll have to modify your DatabaseUtils.props file to reflect your database connection. Reading from Databases is slightly more complicated, but still very easy. For example, the XRFF format saves the class attribute information as wellĭata.setClassIndex(data.numAttributes() - 1) setting class attribute if the data format does not provide this information import .DataSource ĭataSource source = new DataSource("/some/where/data.arff") It can also read CSV files and other formats (basically all file formats that Weka can import via its converters it uses the file extension to determine the associated loader). The DataSource class is not limited to ARFF files. The classifiers and filters always list their options in the Javadoc API ( stable, developer version) specification.Ī comprehensive source of information is the chapter Using the API of the Weka manual. A link to an example class can be found at the end of this page, under the Links section. The following sections explain how to use them in your own code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |