export.result: Saves MCFS-ID result into set csv files

Description Usage Arguments Examples

View source: R/rmcfs.R

Description

Saves csv files with result obtained by the MCFS-ID.

Usage

1
export.result(mcfs_result, path = "./", label = "rmcfs", zip = TRUE)

Arguments

mcfs_result

result of the MCFS-ID experiment returned by mcfs function.

path

path to the MCFS-ID results files. This parameter can also point to the zip result file.

label

label of the experiment and common name for output files.

zip

if = TRUE, saves all results data as one zip file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  ## Not run: ###dontrunbegin
  
  # create input data
  adata <- artificial.data(rnd_features = 10)
  showme(adata)
  
  # Parametrize and run MCFS-ID procedure
  result <- mcfs(class~., adata, cutoffPermutations = 0, featureFreq = 10,
                  finalCV = FALSE, finalRuleset = FALSE, threadsNumber = 2)

  # Export and import R result to/from files
  path <- file.path(tempdir(), "artificial.zip")
  export.result(result, path = path)
  result <- import.result(path = path)
  
  
## End(Not run)###dontrunend

Example output

Loading required package: rJava
OpenJDK 64-Bit Server VM warning: Can't detect primordial thread stack location - find_vma failed

  ########################
  # rmcfs version 1.3.1  #
  ########################
  If used please cite the following paper: 
  M. Draminski, J. Koronacki (2018), 
  rmcfs: An R Package for Monte Carlo Feature Selection and Interdependency Discovery,
  Journal of Statistical Software, vol 85(12), 1-28, doi:10.18637/jss.v085.i12.
           X1        X2          X3         X4         X5        X6        X7
1  0.99581417 0.9139286 0.467613689 0.76307143 0.57699358 0.4306610 0.1815434
2  0.90729762 0.5669729 0.916915433 0.09274247 0.58716706 0.4700228 0.5748240
3  0.08571826 0.9070771 0.117646818 0.31010099 0.20896780 0.9136586 0.5499236
4  0.83560278 0.4448110 0.067161812 0.22224953 0.08836382 0.3226718 0.5215631
5  0.99662921 0.1583453 0.923574891 0.89118349 0.35824262 0.3765540 0.3188964
6  0.21613641 0.4838934 0.006592104 0.99286265 0.33985065 0.2515216 0.3685462
7  0.64864363 0.3099411 0.768922314 0.82161645 0.09159175 0.4872456 0.5581855
8  0.51608262 0.8532786 0.365793506 0.17710079 0.35608672 0.7721942 0.5029364
9  0.72659048 0.5938810 0.135507521 0.24379162 0.69680571 0.4735562 0.3152544
10 0.23148974 0.4409311 0.039431995 0.19228547 0.99316179 0.1261975 0.8098959
            X8        X9        X10
1  0.615943554 0.2733215 0.86041869
2  0.560510632 0.2989398 0.77369681
3  0.310572156 0.5357704 0.49588842
4  0.063343750 0.7732679 0.09077917
5  0.875581168 0.9494730 0.60271783
6  0.758950748 0.7918096 0.59614615
7  0.865727027 0.1595908 0.55188048
8  0.114429411 0.4959416 0.32677953
9  0.007051488 0.1011521 0.47621870
10 0.086541755 0.8285687 0.59422487


          X7        X8        X9          X10 A1 A2 B1 B2 C1 C2 class
60 0.3026081 0.6647483 0.2740068 0.3041421000  0  0  B  B  0  0     B
61 0.2727806 0.7308817 0.8305666 0.2263425649  0  0  0  0  C  C     C
62 0.5465884 0.7503726 0.4357382 0.5377020543  0  0  0  0  0  0     C
63 0.5588765 0.3298375 0.4592453 0.9502508305  0  0  0  0  C  C     C
64 0.7633674 0.4831036 0.9889806 0.5796272904  0  0  0  0  C  C     C
65 0.5597498 0.9182282 0.4267734 0.4025095180  0  0  0  0  0  0     C
66 0.6623039 0.1215767 0.6223460 0.5429170048  0  0  0  0  C  C     C
67 0.5590783 0.1120125 0.7344211 0.9122515051  0  0  0  0  0  0     C
68 0.6450549 0.2247794 0.9143377 0.3347992129  0  0  0  0  C  C     C
69 0.2824056 0.4558992 0.4888564 0.7077345967  0  0  0  0  C  C     C
70 0.6830462 0.3680857 0.4326227 0.0004411996  0  0  0  0  0  0     C
class: 'data.frame' size: 70 x 17Checking input data...
Exporting params...
Exporting input data...
Running MCFS-ID...
##################################################
#####        dmLab 2.3.0 [2019.05.10]        #####
##################################################
Created by Michal Draminski [michal.draminski@ipipan.waw.pl]
http://www.ipipan.eu/staff/m.draminski/
Polish Academy of Sciences - Institute of Computer Science
##################################################

Warning! Value of cutoffPermutations = 0 and cutoffMethod = 'permutations'. Using cutoffMethod = 'mean'.

**************************
*** MCFS-ID Experiment ***
**************************
Loading header: 'input.adh'...
Loading data: 'input.csv'...
70 objects and 17 attributes to load... Done
Nominal target detected - using J48 model
MCFS-ID param: ID-Graph is ON
MCFS-ID param: balance classes is AUTO
Classes = ["A", "B", "C"], Sizes = [40, 20, 10], classSizeRatio = 0.25, balanceValue = 1.0
Starting MCFS-ID Procedure: projectionSize(m) = 4, projections(s) = 40, splits(t) = 5
Start time: Mon Dec 28 23:36:44 UTC 2020
Running: 2 threads...
[                                                                      ]  0% Time: 00:00 ETA: --:--    
[==================================>                                   ]  50% Time: 00:00 ETA: --:--    
[===================================================>                  ]  75% Time: 00:00 ETA: --:--    
[=====================================================================>]  100% Time: 00:00 ETA: --:--    
[=====================================================================>]  100% Time: 00:00               
200 trees built within 1.0 s.

Prediction Summary on a Random Subsample (st):
Accuracy = 81.42%
WeightedAccuracy = 70.13%

Cutoff RI (based on linear regression angle) = 0.0447639
Cutoff RI (based on k-means clustering) = 0.4460272
Cutoff RI (based on mean cutoff value) = 0.0447639
Important attributes (based on mean cutoff value) = 6
*** Saving pruned data ***
*** MCFS-ID Processing is done. Time: 1.2 s. ***

Reading results...
Done.
sh: 1: /usr/bin/zip: Permission denied
[1] 9
Error: File: '/work/tmp/tmp/Rtmp6yT63p/artificial.zip/artificial__RI.csv' does not exists.
Warning message:
In import.result(path = path) :
  Result does not contain all needed data.frames: [RI, distances, cutoff] are missing.

rmcfs documentation built on Sept. 18, 2021, 5:07 p.m.

Related to export.result in rmcfs...