Macaulay2 » Documentation
Packages » RandomMonomialIdeals :: getData
next | previous | forward | backward | up | index | toc

getData -- get the underlying samples

Synopsis

Description

An object of type Sample contains several pieces of information about the random sample, namely: the name of the model used to generate the sample, values of the model's parameters used to generate the sample, the size of the sample (that is, the number of data points in it), and the data itself. The function getData is used to extract the sample data.

In the example below, we obtain a sample of size $5$ from the ER model with parameter values $(3,4,0.1)$

i1 : s = sample(ER(3,4,0.1),5)

o1 = Sample{...4...}

o1 : Sample
i2 : getData s

            2   2 2     3     2   3     2   2         3       2     3   
o2 = {{x , x , x x , x x }, {x , x , x x , x x x , x x , x x x }, {x x ,
        3   2   1 3   1 2     3   2   2 3   1 2 3   1 2   1 2 3     1 2 
     ------------------------------------------------------------------------
      3     2 2
     x x , x x }, {x , x x }, {x x , x x x }}
      1 3   2 3     2   2 3     1 2   1 2 3

o2 : List

Ways to use getData:

For the programmer

The object getData is a method function.