Skip to content

Utilities to enable conversion of clj-ml datasets to core.matrix datasets (and vice versa)

License

Notifications You must be signed in to change notification settings

shark8me/cljml-core-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cljml-core-matrix

A Clojure library designed to convert datasets in Clj-ml (Weka) format to core.matrix format, and vice versa.

Rationale

Core.matrix is an excellent Clojure library for manipulation and transformation of arrays, datasets and matrices. It is also the library backing the Incanter toolkit.

To run machine learning algorithms such as classification or regression, one needs to use other libraries such as Clj-ml, which is a wrapper on the Weka toolkit implemented in Java.

However, the dataset formats used by Core.matrix and Clj-ml are different. This library enables one to load a dataset, do transformation and data cleaning tasks and then run machine learning algorithms in clj-ml.

Usage

Create a core.matrix dataset and convert it to Cljml format:

(ns your-ns 
    (:require [clojure.core.matrix :as cm]
              [clojure.core.matrix.dataset :as cd]
	      [cljml-core-matrix.core :as ccm :refer [to-cljml-dataset]]))

(-> (cd/dataset [:a :b] [[1 2] [3 4]])
    ;clj-ml datasets also needs a name associated with the dataset
    (to-cljml-dataset "test"))

License

Copyright © 2017 Kiran Karkera

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Utilities to enable conversion of clj-ml datasets to core.matrix datasets (and vice versa)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published