Skip to content

socr.model interface

selvam1991 edited this page Feb 3, 2013 · 8 revisions

This is the model object where all the computation , data manipulation and storage of data happens. All the data is stored in the private variables. socr.model is defined in the object literal pattern and the function returns all publicly available methods and properties.

Private Variables

_dataset={}

This object contains the initial dataset created by the user (both incase of simulation and datadriven mode).For example, when the user generates 2 datasets from the binomial coin toss experiment, _dataset ={0:{"index":"0", "keys":"H,T,H,H,H", "values":"1,0,1,1,1", "name":null}, 1:{"index":"1", "keys":"H,T,T,H,T", "values":"1,0,0,1,0", "name":null}}

_bootstrapGroupKeys

This object contains all the random samples generated by the user. Every group has random samples from all the initial group of datasets.

_bootstrapGroupValues

Why there are keys and values? Its because in some form of data input (like coin toss), the "key" contains the symbolic meaningful reference whereas the "value" contains the mathematical equivalent value.

Structure of both bootstrapGroupKeys and Values `{

                    "0": [ [..],[..],[..],..] ,
		"1": [ [..],[..],[..],..] ,
		 ..
	}`

Private Methods

_getRandomInt(min,max)

_generateMean(sampleNumber,K)

_generateCount(sampleNumber,K)

_generateStandardDev(sampleNumber,K)

##Public Properties

##Public Methods

generateTrail

generateSample()

generateStep()

getMean

getMeanOf

getMeanOfDataset

getDataset

setDataset

getSample

getSamples

getStopCount

setStopCount

setN

getN

getRSampleCount

setRSampleCount

reset

resetVariables

getK

Clone this wiki locally