Browse code

rebuild documentation

- due to changes in struct (removal of unicode)

Gavin Rhys Lloyd authored on 02/02/2024 10:50:50
Showing 1 changed files
... ...
@@ -26,7 +26,7 @@ The dataset is divided into two subsets. A predefined proportion of samples from
26 26
 \section{Inheritance}{
27 27
 
28 28
 A \code{stratified_split} object inherits the following \code{struct} classes: \cr\cr
29
-\code{stratified_split()} ⭢ \code{split_data()} ⭢ \code{model()} ⭢ \code{struct_class()}
29
+\verb{[stratified_split]} >> \verb{[split_data]} >> \verb{[model]} >> \verb{[struct_class]}
30 30
 }
31 31
 
32 32
 \examples{
Browse code

update documentation

- get_description moved to struct and updated

Gavin Rhys Lloyd authored on 31/01/2024 09:48:31
Showing 1 changed files
... ...
@@ -23,7 +23,17 @@ A  \code{stratified_split} object with the following \code{output} slots:
23 23
 \description{
24 24
 The dataset is divided into two subsets. A predefined proportion of samples from each level of a factor is selected for the training set, and the remaining samples are used for the test set. The stratification by factor level means that the relative number of samples per level is approximately equal to the original dataset.
25 25
 }
26
+\section{Inheritance}{
27
+
28
+A \code{stratified_split} object inherits the following \code{struct} classes: \cr\cr
29
+\code{stratified_split()} ⭢ \code{split_data()} ⭢ \code{model()} ⭢ \code{struct_class()}
30
+}
31
+
26 32
 \examples{
33
+M = stratified_split(
34
+      factor_name = "V1",
35
+      p_train = 0.75)
36
+
27 37
 D = iris_DatasetExperiment()
28 38
 M = stratified_split(p_train=0.75,factor_name='Species')
29 39
 M = model_apply(M,D)
Browse code

add outputs to auto generated documentation (#58)

Gavin Rhys Lloyd authored on 07/07/2021 09:37:19 • GitHub committed on 07/07/2021 09:37:19
Showing 1 changed files
... ...
@@ -14,7 +14,11 @@ stratified_split(p_train, factor_name, ...)
14 14
 \item{...}{Additional slots and values passed to \code{struct_class}.}
15 15
 }
16 16
 \value{
17
-A  \code{stratified_split} object.
17
+A  \code{stratified_split} object with the following \code{output} slots:
18
+\tabular{ll}{
19
+\code{training} \tab          (DatasetExperiment) A DatasetExperiment object containing samples selected for the training set. \cr
20
+\code{testing} \tab          (DatasetExperiment) A DatasetExperiment object containing samples selected for the testing set. \cr
21
+}
18 22
 }
19 23
 \description{
20 24
 The dataset is divided into two subsets. A predefined proportion of samples from each level of a factor is selected for the training set, and the remaining samples are used for the test set. The stratification by factor level means that the relative number of samples per level is approximately equal to the original dataset.
Browse code

Release 3 12 candidate (#32)

* fix base=10 regardless of input (see #15)

class constructor was always setting base to 10 instead of the input value

* merge bug fix 1.01 into dev (#19)

* bug fix issue #7

Correctly re-order the sample_meta column for colouring samples in the dendrogram plot

* version bump

bug fix issue #7

* fix for https://github.com/computational-metabolomics/structToolbox/issues/18 (#20)

correctly reorder the factor labels so that the control group always ends up in the denominator for the fold change calculation.

* fix for https://github.com/computational-metabolomics/structToolbox/issues/18

fixed incorrect length check on matching class labels.

* Issue 17 ttest factor (#21)

* convert to factor if not one already

fix for issue #17

* update roxygen version

* fix for issue #9 (#22)

changed from lapply to vapply and used drop=FALSE to ensure compatibility with a single factor.

* allow user to set lambda (#24)

- lambda changed to input parameter. NULL = uses pmp optimisation
- model_predict now uses the set value of lambda, or lambda_opt if used.
- documentation updated

* Feature non parametric fold change (#26)

* add "median" method

based on DOI: 10.1080/00949650212140 can now calcuate fold changes equivalent to using medians and corresponding confidence intervals

* update documentation

* update median method

now correctly calculates ratio of medians

* use wilcox for paired median intervals

make use of wilcox.test to estimate intervals for the median when using median for paired samples

* Issue 23 filter by name (#27)

* fix for #23

moved all model_apply functionality to model_predict so that model_train and model_predict can be used as well as model_apply

* update documentation

* Update mean_of_medians.R (#29)

fix for #28
- correctly loop over all levels in the named factor

* Feature documentation 3 12 (#31)

* update documentation

Description and inputs now pulled from the object definitions for consistency.

* fix definition of label_features

allows NULL and description updated

* replace non ascii characters

* export mixed_effect object

* use correct object name to generate documentation

* export mixed_effect object

* remove non ascii characters

* update tests with new object name

* add import for capture.output

* add import for capture.output

* use pca_biplot in tests

chart was renamed

* add utils import

* update struct dependency version

* update documentation

* update news, version bump

Gavin Rhys Lloyd authored on 25/10/2020 08:50:13 • GitHub committed on 25/10/2020 08:50:13
Showing 1 changed files
... ...
@@ -7,18 +7,17 @@
7 7
 stratified_split(p_train, factor_name, ...)
8 8
 }
9 9
 \arguments{
10
-\item{p_train}{The proportion of samples in the training set.}
10
+\item{p_train}{(numeric) The proportion of samples selected for the training set.}
11 11
 
12
-\item{factor_name}{The column of sample_meta to use for stratification}
12
+\item{factor_name}{(character) The name of a sample-meta column to use.}
13 13
 
14
-\item{...}{additional slots and values passed to struct_class}
14
+\item{...}{Additional slots and values passed to \code{struct_class}.}
15 15
 }
16 16
 \value{
17
-struct object
17
+A  \code{stratified_split} object.
18 18
 }
19 19
 \description{
20
-Splits the data into a training and test set, using stratification to keep group sizes
21
-in equal proportions to the full dataset.
20
+The dataset is divided into two subsets. A predefined proportion of samples from each level of a factor is selected for the training set, and the remaining samples are used for the test set. The stratification by factor level means that the relative number of samples per level is approximately equal to the original dataset.
22 21
 }
23 22
 \examples{
24 23
 D = iris_DatasetExperiment()
Browse code

add functionality related to gastric_cancer vignette (see description)

+ AUC metric
+ PLS charts (reg coeff, ROC, VIP scores)
+ stratified data set splitting

Gavin Rhys Lloyd authored on 07/04/2020 14:39:32
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,28 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/stratified_split_class.R
3
+\name{stratified_split}
4
+\alias{stratified_split}
5
+\title{Stratified sampling}
6
+\usage{
7
+stratified_split(p_train, factor_name, ...)
8
+}
9
+\arguments{
10
+\item{p_train}{The proportion of samples in the training set.}
11
+
12
+\item{factor_name}{The column of sample_meta to use for stratification}
13
+
14
+\item{...}{additional slots and values passed to struct_class}
15
+}
16
+\value{
17
+struct object
18
+}
19
+\description{
20
+Splits the data into a training and test set, using stratification to keep group sizes
21
+in equal proportions to the full dataset.
22
+}
23
+\examples{
24
+D = iris_DatasetExperiment()
25
+M = stratified_split(p_train=0.75,factor_name='Species')
26
+M = model_apply(M,D)
27
+
28
+}