dclab 0.62.11__cp39-cp39-macosx_11_0_arm64.whl → 2.18.0__cp39-cp39-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dclab might be problematic. Click here for more details.
- dclab/_version.py +2 -2
- dclab/definitions/meta_const.py +1 -11
- dclab/downsampling.cpython-39-darwin.so +0 -0
- dclab/external/skimage/_find_contours_cy.cpython-39-darwin.so +0 -0
- dclab/external/skimage/_pnpoly.cpython-39-darwin.so +0 -0
- dclab/external/skimage/_shared/geometry.cpython-39-darwin.so +0 -0
- dclab/http_utils.py +2 -12
- dclab/lme4/__init__.py +4 -4
- dclab/lme4/rlibs.py +93 -0
- dclab/lme4/rsetup.py +153 -150
- dclab/lme4/wrapr.py +129 -93
- dclab/rtdc_dataset/check.py +6 -74
- dclab/rtdc_dataset/copier.py +19 -73
- dclab/rtdc_dataset/core.py +2 -12
- dclab/rtdc_dataset/export.py +12 -16
- dclab/rtdc_dataset/feat_basin.py +3 -30
- dclab/rtdc_dataset/fmt_dcor/tables.py +4 -6
- dclab/rtdc_dataset/fmt_hdf5/base.py +2 -7
- dclab/rtdc_dataset/fmt_hdf5/events.py +3 -3
- dclab/rtdc_dataset/fmt_hierarchy/base.py +1 -0
- dclab/rtdc_dataset/fmt_hierarchy/events.py +3 -4
- dclab/rtdc_dataset/linker.py +124 -0
- dclab/rtdc_dataset/writer.py +11 -30
- dclab/util.py +0 -6
- {dclab-0.62.11.dist-info → dclab-2.18.0.dist-info}/METADATA +5 -3
- {dclab-0.62.11.dist-info → dclab-2.18.0.dist-info}/RECORD +30 -29
- {dclab-0.62.11.dist-info → dclab-2.18.0.dist-info}/WHEEL +1 -1
- dclab/lme4/lme4_template.R +0 -94
- {dclab-0.62.11.dist-info → dclab-2.18.0.dist-info}/LICENSE +0 -0
- {dclab-0.62.11.dist-info → dclab-2.18.0.dist-info}/entry_points.txt +0 -0
- {dclab-0.62.11.dist-info → dclab-2.18.0.dist-info}/top_level.txt +0 -0
dclab/lme4/lme4_template.R
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
require(stats);
|
|
2
|
-
require(lme4);
|
|
3
|
-
|
|
4
|
-
model_name <- "<MODEL_NAME>"
|
|
5
|
-
cat("OUTPUT model:", model_name, "#*#\n")
|
|
6
|
-
|
|
7
|
-
func_model <- "feature ~ group + (1 + group | repetition)"
|
|
8
|
-
func_nullmodel <- "feature ~ (1 + group | repetition)"
|
|
9
|
-
|
|
10
|
-
# These are the feature, group, and repetition arrays that are set by dclab
|
|
11
|
-
# via templates.
|
|
12
|
-
feature <- c(<FEATURES>)
|
|
13
|
-
group <- c(<GROUPS>)
|
|
14
|
-
repetition <- c(<REPETITIONS>)
|
|
15
|
-
|
|
16
|
-
data <- data.frame(feature, group, repetition)
|
|
17
|
-
|
|
18
|
-
if (model_name == "glmer+loglink") {
|
|
19
|
-
Model <- glmer(func_model, data, family=Gamma(link='log'))
|
|
20
|
-
NullModel <- glmer(func_nullmodel, data, family=Gamma(link='log'))
|
|
21
|
-
} else if (model_name == "lmer") {
|
|
22
|
-
Model <- lmer(func_model, data)
|
|
23
|
-
NullModel <- lmer(func_nullmodel, data)
|
|
24
|
-
} else {
|
|
25
|
-
stop("Invalid model_name:", model_name)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
# Anova analysis (increase verbosity by making models global)
|
|
29
|
-
# Using anova is a very conservative way of determining
|
|
30
|
-
# p values.
|
|
31
|
-
res_anova <- anova(Model, NullModel)
|
|
32
|
-
cat("OUTPUT r anova: ")
|
|
33
|
-
res_anova
|
|
34
|
-
cat("#*#\n")
|
|
35
|
-
|
|
36
|
-
pvalue <- res_anova$"Pr(>Chisq)"[2]
|
|
37
|
-
cat("OUTPUT anova p-value:", pvalue, "#*#\n")
|
|
38
|
-
|
|
39
|
-
model_summary <- summary(Model)
|
|
40
|
-
cat("OUTPUT r model summary:")
|
|
41
|
-
model_summary
|
|
42
|
-
cat("#*#\n")
|
|
43
|
-
|
|
44
|
-
model_coefficients <- coef(Model)
|
|
45
|
-
cat("OUTPUT r model coefficients:")
|
|
46
|
-
model_coefficients
|
|
47
|
-
cat("#*#\n")
|
|
48
|
-
|
|
49
|
-
fe_reps <- model_coefficients$repetition
|
|
50
|
-
|
|
51
|
-
effects <- data.frame(coef(model_summary))
|
|
52
|
-
|
|
53
|
-
fe_icept <- effects$Estimate[1]
|
|
54
|
-
|
|
55
|
-
fe_treat <- effects$Estimate[2]
|
|
56
|
-
|
|
57
|
-
if (model_name == "glmer+loglink") {
|
|
58
|
-
# transform back from log
|
|
59
|
-
fe_treat <- exp(fe_icept + fe_treat) - exp(fe_icept)
|
|
60
|
-
fe_icept <- exp(fe_icept)
|
|
61
|
-
fe_reps[, 2] = exp(fe_reps[, 1] + fe_reps[, 2]) - exp(fe_reps[, 1])
|
|
62
|
-
fe_reps[, 1] = exp(fe_reps[, 1])
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
cat("OUTPUT fixed effects intercept:", fe_icept, "#*#\n")
|
|
66
|
-
cat("OUTPUT fixed effects treatment:", fe_treat, "#*#\n")
|
|
67
|
-
cat("OUTPUT fixed effects repetitions:")
|
|
68
|
-
fe_reps
|
|
69
|
-
cat("#*#\n")
|
|
70
|
-
|
|
71
|
-
# convergence
|
|
72
|
-
|
|
73
|
-
# convergence warnings in lme4
|
|
74
|
-
is_warning_generated <- function(m) {
|
|
75
|
-
df <- summary(m)
|
|
76
|
-
!is.null(df$optinfo$conv$lme4$messages) &&
|
|
77
|
-
grepl('failed to converge', df$optinfo$conv$lme4$messages)
|
|
78
|
-
}
|
|
79
|
-
lme4_not_converged <- is_warning_generated(Model)
|
|
80
|
-
|
|
81
|
-
# convergence code by the optimizer
|
|
82
|
-
lme4l <- model_summary$optinfo$conv$lme4
|
|
83
|
-
if (length(lme4l) == 0) {
|
|
84
|
-
# the optimizer probably does not know
|
|
85
|
-
conv_code <- 0
|
|
86
|
-
} else if (is.null(lme4l$code)) {
|
|
87
|
-
# NULL means 0
|
|
88
|
-
conv_code <- 0
|
|
89
|
-
} else {
|
|
90
|
-
conv_code <- lme4l$code
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
cat("OUTPUT model converged:", (conv_code == 0) && !lme4_not_converged, "#*#\n")
|
|
94
|
-
cat("OUTPUT lme4 messages:", lme4l$optinfo$conv$lme4$messages, "#*#\n")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|