From c9e9c691c353d5d4835551de8d7d1f4c0ec74b9f Mon Sep 17 00:00:00 2001 From: Paul Steckler Date: Wed, 24 May 2017 11:14:51 -0400 Subject: Remove mmm and ML4PG contribs and remove references to them in code and docs --- contrib/ML4PG/coq/weka.el | 81 ----------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 contrib/ML4PG/coq/weka.el (limited to 'contrib/ML4PG/coq/weka.el') diff --git a/contrib/ML4PG/coq/weka.el b/contrib/ML4PG/coq/weka.el deleted file mode 100644 index e21fa35c..00000000 --- a/contrib/ML4PG/coq/weka.el +++ /dev/null @@ -1,81 +0,0 @@ -(defun ml4pg-weka (n) - (let ((alg (cond ((string= "k" ml4pg-algorithm) "SimpleKMeans") - ((string= "e" ml4pg-algorithm) "EM") - ((string= "f" ml4pg-algorithm) "FarthestFirst") - ))) - ;(comint-send-string (get-buffer-process "*matlab*") -; (concat "load " (expand-file-name "temp.csv") "; [t1,X,t3] = princomp(temp); X=normalize(X); csvwrite('" -; (expand-file-name "temp2.csv") "',X); -;")) - - (shell-command (concat "sleep 1; cat " ml4pg-home-dir "aux_files/headers.txt " (expand-file-name "temp.csv") " > " (expand-file-name "temp3.arff"))) - (shell-command (concat "java -classpath " - *weka-dir* - " weka.filters.unsupervised.attribute.AddCluster -W \"weka.clusterers." alg " -N " (format "%s" n) " -S 42\" -I last -i " - (expand-file-name "temp3.arff") " -o " (expand-file-name "out.arff"))) - (shell-command (concat "tail -n +37 " - (expand-file-name "out.arff") " > " (expand-file-name "out_bis.arff"))) - )) - - -(defun ml4pg-0_n (n) - (do ((i 0 (1+ i)) - (temp nil)) - ((= i n) temp) - (setf temp (append temp (list (list i nil)))))) - - -(defun ml4pg-read-lines (file) - "Return a list of lines in FILE." - (with-temp-buffer - (insert-file-contents file) - (split-string - (buffer-string) "\n" t) - )) - - -(defun ml4pg-lines-to-clusters (lines) - (do ((temp lines (cdr temp)) - (temp2 nil)) - ((endp temp) temp2) - (setf temp2 (append temp2 (list (string-to-number (subseq (car temp) (+ 7 (search "cluster" (car temp) :from-end t))))))) - )) - - - -(defun ml4pg-extract-clusters-from-file (clusters) - (let* ((temp (ml4pg-0_n clusters)) - (lines (ml4pg-read-lines (expand-file-name "out_bis.arff")))) - (ml4pg-lines-to-clusters lines))) - - - - - -(defun ml4pg-form-clusters (list n) - (do ((i 0 (1+ i)) - (temp nil)) - ((= i n) temp) - (setf temp (append temp (list (ml4pg-clusters-of-n list i)))))) - - - - -(defun ml4pg-clusters-of-n (list n) - (do ((temp list (cdr temp)) - (i 1 (1+ i)) - (temp2 nil)) - ((endp temp) temp2) - (if (equal (car temp) n) - (setf temp2 (append temp2 (list i)))))) - - -(defun ml4pg-remove-alone (list) - (do ((temp list (cdr temp)) - (temp2 nil)) - ((endp temp) temp2) - (if (not (= (length (car temp)) 1)) - (setf temp2 (append temp2 (list (car temp))))))) - - - -- cgit v1.2.3