Learn R Programming

pguIMP (version 0.0.0.3)

pgu.model: pgu.model

Description

Comprises a list of models for data manipulation.

Arguments

Format

R6::R6Class object.

Active bindings

modelList

Returns a vector of pgu-normDist objects. (pgu.normDist)

modelParameter

Returns a dataframe comrising model parameters. (tibble::tibble)

Methods

Public methods

Method new()

Creates and returns a new pgu.model object.

Usage

pgu.model$new(data = "tbl_df")

Arguments

data

The data to be analyzed. (tibble::tibble)

Returns

A new pgu.model object. (pguIMP::pgu.model)

Method finalize()

Clears the heap and indicates that instance of pgu.model is removed from heap.

Usage

pgu.model$finalize()

Method print()

Prints instance variables of a pgu.model object.

Usage

pgu.model$print()

Returns

string

Method resetModelParameter()

Resets instance variable modelParameter

Usage

pgu.model$resetModelParameter(data = "tbl_df")

Arguments

data

Dataframe to be analyzed. (tibble::tibble)

Method resetModelList()

Resets instance variable modelList

Usage

pgu.model$resetModelList(data = "tbl_df")

Arguments

data

Dataframe to be analyzed. (tibble::tibble)

Method resetModel()

Resets instance variable modelList. Resets instance variable modelParameter. Displays progress if shiny is loaded.

Usage

pgu.model$resetModel(data = "tbl_df", progress = "Progress")

Arguments

data

Dataframe to be analyzed. (tibble::tibble)

progress

If shiny is loaded, the analysis' progress is stored in this instance of the shiny Progress class. (shiny::Progress)

Method setNormDist()

Stores the information of a pgu.norDist object in an entry of the instance variable modelList

Usage

pgu.model$setNormDist(data = "pgu.normDist", feature = "character")

Arguments

data

Instance of pgu.normDist (pguIMP::pgu.normDist)

feature

Attribute corresponding to the pgu.normDist object data. (character)

Method featureIdx()

Returns the index of a pgu.normDist object wihtin the instance variable modelParameter.

Usage

pgu.model$featureIdx(feature = "character")

Arguments

feature

Attribute's name. (character)

Returns

Index of attribute entry in dataframe (numeric)

Method fitFeature()

Runs the fit function of a pgu.normDist object at a user denied position within the instance variable modelList.

Usage

pgu.model$fitFeature(feature = "character")

Arguments

feature

Attribute's name. (character)

Method fitData()

Loops through all attributes and calls the object's ftiFeature function. Displays progress if shiny is loaded.

Usage

pgu.model$fitData(progress = "Progress")

Arguments

progress

If shiny is loaded, the analysis' progress is stored in this instance of the shiny Progress class. (shiny::Progress)

Method logFitResultsFeature()

Stores results from fitting procedure of a user defined attribute into the corrsponding attribute of instance variable modelParameter.

Usage

pgu.model$logFitResultsFeature(feature = "character")

Arguments

feature

Attribute's name. (character)

Method logFailedFitResultsFeature()

Stores results from fitting procedure of a user defined attribute into the corrsponding attribute of instance variable modelParameter in case of a failed fitting routine.

Usage

pgu.model$logFailedFitResultsFeature(feature = "character")

Arguments

feature

Attribute's name. (character)

Method scaleNumeric()

Scales numeric data based upon the model of a user defined attribute.

Usage

pgu.model$scaleNumeric(value = "numeric", feature = "character")

Arguments

value

Numeric vector (numeric)

feature

Attribute's name. (character)

Returns

scaled version of the given vector (numeric)

Method scaleData()

Scales a dataframe based upon a list of models stored in the instance variable modelList..

Usage

pgu.model$scaleData(data = "tbl_df")

Arguments

data

Dataframe to be analyzed. (tibble::tibble)

Returns

scaled version of the given dataframe (tibble::tibble)

Method rescaleNumeric()

Re-scales numeric data based upon the model of a user defined attribute.

Usage

pgu.model$rescaleNumeric(value = "numeric", feature = "character")

Arguments

value

Numeric vector (numeric)

feature

Attribute's name. (character)

Returns

Re-scaled version of the given vector (numeric)

Method rescaleData()

Re-scales a dataframe based upon a list of models stored in the instance variable modelList..

Usage

pgu.model$rescaleData(data = "tbl_df")

Arguments

data

Dataframe to be analyzed. (tibble::tibble)

Returns

Re-scaled version of the given dataframe (tibble::tibble)

Method modelParameterData()

Returns the model parameter (expectation value, standard deviation).

Usage

pgu.model$modelParameterData()

Returns

Dataframe comprising model parameter. (tibble::tibble)

Method modelParameterFeature()

Returns the model parameter (expectation value, standard deviation) for a user deined attribute.

Usage

pgu.model$modelParameterFeature(feature = "character")

Arguments

feature

Attribute's name. (character)

Returns

Dataframe comprising model parameter. (tibble::tibble)

Method modelQualityData()

Returns the model parameters connected to model quality.

Usage

pgu.model$modelQualityData()

Returns

Dataframe comprising model parameter. (tibble::tibble)

Method modelQualityFeature()

Returns the model parameters connected to model quality for a user deined attribute.

Usage

pgu.model$modelQualityFeature(feature = "character")

Arguments

feature

Attribute's name. (character)

Returns

Dataframe comprising model parameter. (tibble::tibble)

Method fitResultData()

Returns the model fit results.

Usage

pgu.model$fitResultData()

Returns

Dataframe comprising model fit results. (tibble::tibble)

Method fitResultFeature()

Returns the model fit results for a user deined attribute.

Usage

pgu.model$fitResultFeature(feature = "character")

Arguments

feature

Attribute's name. (character)

Returns

Dataframe comprising model fit results. (tibble::tibble)

Method testResultData()

Returns the hypothesis test results.

Usage

pgu.model$testResultData()

Returns

Dataframe comprising the hypothesis test results. (tibble::tibble)

Method testResultFeature()

Returns the hypothesis test results. for a user deined attribute.

Usage

pgu.model$testResultFeature(feature = "character")

Arguments

feature

Attribute's name. (character)

Returns

Dataframe comprising the hypothesis test results. (tibble::tibble)

Method plotModel()

Creates and returns a composite graphical analysis of the modeling procedure of a user defined attribute.

Usage

pgu.model$plotModel(feature = "character")

Arguments

feature

Attribute's name. (character)

Returns

Composite result plot. (ggplot2::ggplot)

Method clone()

The objects of this class are cloneable with this method.

Usage

pgu.model$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Comprises a list of pgu.normDist objects and model parameters. These can be used to scale data. This object is used by the shiny based gui and is not for use in individual R-scripts!