1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-28 13:48:56 +08:00

17 Commits

Author SHA1 Message Date
sshehata
0f33e2fa72 feat: allow missing values when parsing csvs 2022-12-18 03:21:01 +01:00
Etienne Bruines
db086a864e Made versions of CSV-readers w/ io.ReadSeeker
Each method now ontains a -FromReader counterpart
such that it'll allow use of those helper-methods
even when someone does not have his data in a physical
file. The original methods make use of those -FromReader
methods.

The reader is being reset (Seek(0, 0)) before every method-
specific read, to ensure it's reading from the start of the
reader.

Test cases are not yet touched, and I'm not sure they should.
2017-09-29 09:48:33 +02:00
Richard Townsend
7041fc33c7 base: correct handling of class attributes in ParseCSVToTemplatedInstances 2016-07-11 23:16:18 +01:00
Richard Townsend
e30ff6580a ARFF import/export, CSV export, serialisation
* Only numeric and categorical ARFF attributes are currently supported.
* Only the dense version of the ARFF format is supported.
* Compressed format is .tar.gz file which should allow extensibility.
    * Attributes stored using JSON representations.
* Also offers smarter estimation of the precision of numeric Attributes.
* Also adds support for writing instances to CSV
2014-11-13 20:09:00 +00:00
Richard Townsend
527c6476e1 Optimised version of KNN for Euclidean distances
This patch also:
   * Completes removal of the edf/ package
   * Corrects an erroneous print statement
   * Introduces two new CSV functions
      * ParseCSVToInstancesTemplated makes sure that
        reading a second CSV file maintains strict Attribute
        compatibility with an existing DenseInstances
      * ParseCSVToInstancesWithAttributeGroups gives more control
        over where Attributes end up in memory, important for
        gaining predictable control over the KNN optimisation
      * Decouples BinaryAttributeGroup from FixedAttributeGroup for
        better casting support
2014-09-30 23:10:22 +01:00
Amit Kumar Gupta
f38fc713ef Remove unused untested ParseCSV function 2014-08-22 13:39:29 +00:00
Amit Kumar Gupta
d835081de9 Favor idiomatic error return over panic when parsing non-existent CSV file 2014-08-22 07:27:16 +00:00
Richard Townsend
f9c1e24e5b neural: stop-gap support for neural networks 2014-08-09 19:27:20 +01:00
Richard Townsend
47341b2869 base: Cleaned up duplicate Attribute resolution functions 2014-08-03 15:17:20 +01:00
Richard Townsend
2bb7c2de75 base: merge from v2-instances 2014-08-03 15:16:38 +01:00
Niclas Jern
2a3d80b475 Remove complete unnecessary fmt.Println :) 2014-07-19 16:31:11 +03:00
Niclas Jern
627a5537d3 Comments should be of the form "<Struct> ..." or "<MethodName> ..." 2014-07-18 13:48:28 +03:00
Richard Townsend
521844cbb2 base: handling spaces between entries 2014-07-02 15:48:14 +01:00
Richard Townsend
a2c67592df Adds Instances and Attributes type
* Refactors KNNClassifier to use them
* csv handling moved back into base due to a circular dependency
* Also adds the datasets used to test CSV handling
2014-05-13 22:08:11 +01:00
Stephen Whitworth
b4cc1e85c7 Made a start on interfaces 2014-04-30 09:10:16 +01:00
Stephen Whitworth
84569019b8 Split it out, created iris example, debugged KNN 2014-01-04 19:16:05 +00:00
Stephen Whitworth
f1d51412ef Move to subclassing 2014-01-04 11:12:06 +00:00