问题标签 [singular]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
sage - 在一些 CAS(计算机代数系统)中定义一个特定的多项式环
我有兴趣在某些 CAS(单数、GAP、Sage 等)中定义以下多项式商环:
具体来说,R
是所有次数最多为 3 的多项式的集合,其系数属于 GF(256)。两个例子包括:
加法和乘法被定义为每环定律。在这里,我提到它们是为了强调:
加法:对应的系数是异或的(GF(256)中的加法法则):
/li>乘法:多项式相乘(系数在 GF(256) 中相加和相乘)。结果以 x^4 + 1 为模计算:
/li>
请告诉我如何
R = GF(256)[x] / (x^4 + 1)
在您选择的 CAS 中定义,并展示如何实现上述 p(x) 和 q(x) 之间的加法和乘法。
php - Php mysql search - 如果使用复数和单数,搜索不起作用
如果我搜索“销售订单”,它会在结果中获取“销售订单”和“销售订单” 。它也用“s”获取结果。
但是,如果我搜索“销售订单”,它只会获取“销售订单”,但我希望“销售订单”也会获取。
我正在使用 php mysql 查询。
matrix - Eigen:理解预处理器的概念
我尝试编写自定义预处理器,但到目前为止不了解 Eigen 预处理器的概念。我现在的状态看起来是这样的,但是有什么明显的错误……
我想设置一些零空间信息并将其从每个 cg 步骤的 rhs 中删除。不知何故,我觉得这在某种程度上是不可能的预处理器概念。至少我找不到正确的方法来实现它。
参考:
-求解奇异矩阵
- https://bitbucket.org/eigen/eigen/src/1a24287c6c133b46f8929cf5a4550e270ab66025/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h?at=default&fileviewer=file-view-default#BasicPreconditioners.h-185
更多信息:
零空间是这样构造的:
所以这个问题可能与 eigen 没有太大关系,而是一个基本的 c++ 问题:如何通过依赖于 rhs 的投影来操作 const 函数中的 rhs。所以我猜 const 概念不符合我的需要。
但是从函数中删除“const”会导致如下错误:
r - 无法估计差异中的差异 RE 模型(系统完全是奇异误差)
我正在尝试使用面板数据方法(池化、FE 和 RE)来估计 DiD 模型。该模型用于确定卡特尔的存在(E1
回归中的虚拟变量 -1
对于卡特尔时期和0
其他情况)是否影响所检查市场上鱼的消费价格(虚拟变量Cartel
-1
对于假定的卡特尔化市场,0
否则,有两个市场)总计。据我了解,在 DiD 回归中,我需要有一个方程E1
,Cartel
以及它们的交互项E1*Cartel
(以及一些控制变量 - FPI
(鱼价指数)和季度虚拟变量Q2
,Q3
和Q4
)。
这种结构可以很好地用于估计线性模型,但是当我尝试实际实现面板数据方法时,特别是 RE,R 给了我system is exactly singular
错误。如果我理解正确,这意味着两个虚拟变量完全共线。我测试了这个理论并得出结论,问题是由虚拟变量引起的Cartel
——当我将它添加到模型中时,它停止工作。我不明白为什么 - 如果这个变量实际上与另一个变量共线,那么常规lm
回归不应该也失败了吗?
任何意见是极大的赞赏。
这很好用:
这些模型也是如此:
但这给了我错误:
这是面板数据(用 转换index = c("Market", "Month)
):
structure(list(Market = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("RU", "UK"), class = "factor"),
Month = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L,
23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L,
35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L,
47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L,
59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L,
71L, 72L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L,
13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L,
25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L,
37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L,
49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L,
61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L
), .Label = c("2009-01-31", "2009-02-28", "2009-03-31", "2009-04-30",
"2009-05-31", "2009-06-30", "2009-07-31", "2009-08-31", "2009-09-30",
"2009-10-31", "2009-11-30", "2009-12-31", "2010-01-31", "2010-02-28",
"2010-03-31", "2010-04-30", "2010-05-31", "2010-06-30", "2010-07-31",
"2010-08-31", "2010-09-30", "2010-10-31", "2010-11-30", "2010-12-31",
"2011-01-31", "2011-02-28", "2011-03-31", "2011-04-30", "2011-05-31",
"2011-06-30", "2011-07-31", "2011-08-31", "2011-09-30", "2011-10-31",
"2011-11-30", "2011-12-31", "2012-01-31", "2012-02-29", "2012-03-31",
"2012-04-30", "2012-05-31", "2012-06-30", "2012-07-31", "2012-08-31",
"2012-09-30", "2012-10-31", "2012-11-30", "2012-12-31", "2013-01-31",
"2013-02-28", "2013-03-31", "2013-04-30", "2013-05-31", "2013-06-30",
"2013-07-31", "2013-08-31", "2013-09-30", "2013-10-31", "2013-11-30",
"2013-12-31", "2014-01-31", "2014-02-28", "2014-03-31", "2014-04-30",
"2014-05-31", "2014-06-30", "2014-07-31", "2014-08-31", "2014-09-30",
"2014-10-31", "2014-11-30", "2014-12-31"), class = "factor"),
Salmonoid = c(218.79, 225.98, 233.85, 239.88, 247.61, 256.19,
263.39, 265.7, 264.38, 261.32, 258.49, 257.18, 259.18, 262.27,
265.11, 266.43, 266.28, 266.95, 269.15, 270.19, 275.43, 280.21,
285.3, 292.06, 298.89, 301.78, 304.49, 307.23, 310.13, 310.77,
312.51, 311.66, 309.92, 308.76, 309.72, 310.08, 306.73, 307.17,
306.03, 305.09, 301.73, 299.08, 299.24, 300.39, 300.09, 299.19,
298.49, 299.38, 298.94, 299.72, 303.33, 305.38, 307.82, 309.52,
312.41, 318.07, 323.53, 326.11, 328.75, 332.44, 341.6, 347.65,
355.87, 363.61, 369.4, 372.36, 377.08, 386.36, 403.76, 418.74,
426, 445.29, 10.07, 11.69, 10.96, 11.77, 11.75, 11.28, 11.43,
11.4, 11.45, 11.53, 11.52, 11.45, 11.71, 12.74, 12.68, 13.04,
13.11, 13.72, 14.69, 14.6, 14.42, 15.29, 15.64, 15.83, 15.78,
15.66, 15.64, 14.47, 15.67, 15.55, 15.3, 14.9, 15.14, 15.75,
15.36, 14.5, 14.96, 16.39, 16.05, 15.87, 16.22, 15.69, 15.7,
16.13, 15.66, 15.96, 15.23, 16.19, 16.15, 14.52, 14.95, 14.53,
15.36, 15.7, 15.46, 15.49, 15.39, 16.44, 16.39, 16.34, 16.16,
17.09, 17.27, 16.41, 17.44, 17.14, 17.89, 17.29, 16.79, 17.11,
17.16, 16.75), E1 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L,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3.8, 3.4, 3.4, 3.6, 3.4, 3.3, 3.5, 4.1, 4.6, 4.9,
5, 5.5, 5.6, 5.3, 5.6, 5.2, 4, 4.5, 4.7, 5.9, 5.8, 5.7, 5.3,
5.5, 4.8, 4.3, 4.7, 4, 4, 4.1, 4.7, 5), Price_Index = c(0.713298341,
0.736739152, 0.762396896, 0.78205588, 0.807257197, 0.835229681,
0.858703094, 0.866234147, 0.861930688, 0.851954488, 0.842728132,
0.838457275, 0.844977668, 0.855051674, 0.864310632, 0.868614091,
0.868125061, 0.870309393, 0.877481824, 0.880872429, 0.897955857,
0.913539595, 0.930133994, 0.952172921, 0.974440061, 0.983862028,
0.99269716, 1.001630098, 1.011084667, 1.013171193, 1.018843934,
1.016072768, 1.010400026, 1.006618198, 1.009747987, 1.010921657,
1, 1.001434486, 0.997717863, 0.994653278, 0.983699019, 0.975059499,
0.97558113, 0.979330356, 0.978352297, 0.97541812, 0.973135983,
0.976037557, 0.974603071, 0.977146024, 0.988915333, 0.995598735,
1.003553614, 1.009095948, 1.018517915, 1.036970626, 1.054771297,
1.063182604, 1.071789522, 1.083819646, 1.113683044, 1.133407231,
1.160206044, 1.185439963, 1.2043165, 1.213966681, 1.229354807,
1.259609428, 1.316336843, 1.365174584, 1.388843608, 1.451732794,
0.694482759, 0.806206897, 0.755862069, 0.811724138, 0.810344828,
0.777931034, 0.788275862, 0.786206897, 0.789655172, 0.795172414,
0.794482759, 0.789655172, 0.807586207, 0.87862069, 0.874482759,
0.899310345, 0.904137931, 0.946206897, 1.013103448, 1.006896552,
0.994482759, 1.054482759, 1.07862069, 1.091724138, 1.088275862,
1.08, 1.07862069, 0.997931034, 1.080689655, 1.072413793,
1.055172414, 1.027586207, 1.044137931, 1.086206897, 1.059310345,
1, 1.031724138, 1.130344828, 1.106896552, 1.094482759, 1.11862069,
1.082068966, 1.082758621, 1.112413793, 1.08, 1.100689655,
1.050344828, 1.116551724, 1.113793103, 1.00137931, 1.031034483,
1.002068966, 1.059310345, 1.082758621, 1.066206897, 1.068275862,
1.06137931, 1.133793103, 1.130344828, 1.126896552, 1.114482759,
1.17862069, 1.191034483, 1.131724138, 1.202758621, 1.182068966,
1.233793103, 1.192413793, 1.157931034, 1.18, 1.183448276,
1.155172414)), .Names = c("Market", "Month", "Salmonoid",
"E1", "E2", "E4", "E3", "Cartel", "Q2", "Q3", "Q4", "FPI", "Price_Index"
), row.names = c("RU-2009-01-31", "RU-2009-02-28", "RU-2009-03-31",
"RU-2009-04-30", "RU-2009-05-31", "RU-2009-06-30", "RU-2009-07-31",
"RU-2009-08-31", "RU-2009-09-30", "RU-2009-10-31", "RU-2009-11-30",
"RU-2009-12-31", "RU-2010-01-31", "RU-2010-02-28", "RU-2010-03-31",
"RU-2010-04-30", "RU-2010-05-31", "RU-2010-06-30", "RU-2010-07-31",
"RU-2010-08-31", "RU-2010-09-30", "RU-2010-10-31", "RU-2010-11-30",
"RU-2010-12-31", "RU-2011-01-31", "RU-2011-02-28", "RU-2011-03-31",
"RU-2011-04-30", "RU-2011-05-31", "RU-2011-06-30", "RU-2011-07-31",
"RU-2011-08-31", "RU-2011-09-30", "RU-2011-10-31", "RU-2011-11-30",
"RU-2011-12-31", "RU-2012-01-31", "RU-2012-02-29", "RU-2012-03-31",
"RU-2012-04-30", "RU-2012-05-31", "RU-2012-06-30", "RU-2012-07-31",
"RU-2012-08-31", "RU-2012-09-30", "RU-2012-10-31", "RU-2012-11-30",
"RU-2012-12-31", "RU-2013-01-31", "RU-2013-02-28", "RU-2013-03-31",
"RU-2013-04-30", "RU-2013-05-31", "RU-2013-06-30", "RU-2013-07-31",
"RU-2013-08-31", "RU-2013-09-30", "RU-2013-10-31", "RU-2013-11-30",
"RU-2013-12-31", "RU-2014-01-31", "RU-2014-02-28", "RU-2014-03-31",
"RU-2014-04-30", "RU-2014-05-31", "RU-2014-06-30", "RU-2014-07-31",
"RU-2014-08-31", "RU-2014-09-30", "RU-2014-10-31", "RU-2014-11-30",
"RU-2014-12-31", "UK-2009-01-31", "UK-2009-02-28", "UK-2009-03-31",
"UK-2009-04-30", "UK-2009-05-31", "UK-2009-06-30", "UK-2009-07-31",
"UK-2009-08-31", "UK-2009-09-30", "UK-2009-10-31", "UK-2009-11-30",
"UK-2009-12-31", "UK-2010-01-31", "UK-2010-02-28", "UK-2010-03-31",
"UK-2010-04-30", "UK-2010-05-31", "UK-2010-06-30", "UK-2010-07-31",
"UK-2010-08-31", "UK-2010-09-30", "UK-2010-10-31", "UK-2010-11-30",
"UK-2010-12-31", "UK-2011-01-31", "UK-2011-02-28", "UK-2011-03-31",
"UK-2011-04-30", "UK-2011-05-31", "UK-2011-06-30", "UK-2011-07-31",
"UK-2011-08-31", "UK-2011-09-30", "UK-2011-10-31", "UK-2011-11-30",
"UK-2011-12-31", "UK-2012-01-31", "UK-2012-02-29", "UK-2012-03-31",
"UK-2012-04-30", "UK-2012-05-31", "UK-2012-06-30", "UK-2012-07-31",
"UK-2012-08-31", "UK-2012-09-30", "UK-2012-10-31", "UK-2012-11-30",
"UK-2012-12-31", "UK-2013-01-31", "UK-2013-02-28", "UK-2013-03-31",
"UK-2013-04-30", "UK-2013-05-31", "UK-2013-06-30", "UK-2013-07-31",
"UK-2013-08-31", "UK-2013-09-30", "UK-2013-10-31", "UK-2013-11-30",
"UK-2013-12-31", "UK-2014-01-31", "UK-2014-02-28", "UK-2014-03-31",
"UK-2014-04-30", "UK-2014-05-31", "UK-2014-06-30", "UK-2014-07-31",
"UK-2014-08-31", "UK-2014-09-30", "UK-2014-10-31", "UK-2014-11-30",
"UK-2014-12-31"), class = c("pdata.frame", "data.frame"), index = structure(list(
Market = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L
), .Label = c("RU", "UK"), class = "factor"), Month = structure(c(1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L,
15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L,
27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L,
39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L,
51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L,
63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L,
28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L,
40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L,
52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L,
64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L), .Label = c("2009-01-31",
"2009-02-28", "2009-03-31", "2009-04-30", "2009-05-31", "2009-06-30",
"2009-07-31", "2009-08-31", "2009-09-30", "2009-10-31", "2009-11-30",
"2009-12-31", "2010-01-31", "2010-02-28", "2010-03-31", "2010-04-30",
"2010-05-31", "2010-06-30", "2010-07-31", "2010-08-31", "2010-09-30",
"2010-10-31", "2010-11-30", "2010-12-31", "2011-01-31", "2011-02-28",
"2011-03-31", "2011-04-30", "2011-05-31", "2011-06-30", "2011-07-31",
"2011-08-31", "2011-09-30", "2011-10-31", "2011-11-30", "2011-12-31",
"2012-01-31", "2012-02-29", "2012-03-31", "2012-04-30", "2012-05-31",
"2012-06-30", "2012-07-31", "2012-08-31", "2012-09-30", "2012-10-31",
"2012-11-30", "2012-12-31", "2013-01-31", "2013-02-28", "2013-03-31",
"2013-04-30", "2013-05-31", "2013-06-30", "2013-07-31", "2013-08-31",
"2013-09-30", "2013-10-31", "2013-11-30", "2013-12-31", "2014-01-31",
"2014-02-28", "2014-03-31", "2014-04-30", "2014-05-31", "2014-06-30",
"2014-07-31", "2014-08-31", "2014-09-30", "2014-10-31", "2014-11-30",
"2014-12-31"), class = "factor")), .Names = c("Market", "Month"
), class = c("pindex", "data.frame"), row.names = c(NA, 144L)))
php - 在 Laravel 中获取单数形式的同形异义词
当str_singular()
在 Laravel 中使用函数来获取单词 'leaves' 的单数形式时,它会返回 'leaf'。
但是我需要得到“请假”这个词,例如“请假”。
python - 如何在Python中计算给定语料库的复数和单数数量
我希望你能帮助我完成一项任务。
我需要计算语料库中复数和单数的数量。我有一个语料库,其行具有以下结构:
第一个位置 [0] 计算一个数字 (4),第二个位置 [1] 计算一个形式 (lanzas),第三个位置 [2] 计算一个引理 (lanza),第四个位置 [3] 计算一个类别 (NCFP000) 例如,动词、名词等。因此,在这个语料库中,每个单词都根据其引理和类别进行结构化,类别为我们提供了单词是单数、复数、阳性还是阴性的信息。
因此,如您所见,最后一个位置 [3] 说明了单词的类别,因此 AQ0MP00 表示该单词是复数和形容词。
我的问题是在这种情况下如何计算复数和单数的数量?具体来说,我需要计算整个语料库中的以下类别(NCFS000、NCFP000、NCMS000 和 NCMP000,分别代表复数、单数、女性和男性)。
到目前为止,我已经尝试过:
corpus=open('F:/python/corpus-morf.txt','r')
text=open('F:/python/deberes.txt','r')
行=语料库.readlines()
对于 i 行:
我被困在这里。
你有什么想法?我真诚地感谢您的帮助。
r - R广义矩回归估计方法与仪器
我正在尝试使用 R 中的广义矩量法来训练回归模型。我有 3 个内生回归量,它们与我知道是外生的 6 个事物相关。
- 我的结果变量是 y
- 我有 3 个内生回归变量:z1、z2、z1*z2
- 我有 6 个外源工具:x1、x2、x3、x4、x5、x6
为了进行培训,我将数据设置在 data.matrix 中dat
。第一列为 y,第二列为全 1,第三至第八列为仪器 x1-x6。第 9 到第 11 列是回归量(z1、z2 和 z1*z2)。
然后我将我的时刻条件设置如下:
然后我尝试训练我的模型:
当我运行它时,我得到一个错误:
model order: 1 singularities in the computation of the projection matrix results are only valid up to model order 0Error in AA %*% t(X) : requires numeric/complex matrix/vector arguments
该误差表明 x 的秩不够大,无法估计与 z 对应的变量的系数。
但是当我检查Matrix::rankMatrix(dat[,3:8])
告诉我我的 x 有 5 级并Matrix::rankMatrix(dat[2,9,10,11])
告诉我我的 z 有 4 级时。此外,rankMatrix(t(x) %*% z )
产生 4。这些值对我来说似乎对 GMM 很好。我究竟做错了什么?
我也尝试使用pgmm
from plm
,但我的数据实际上只是一个横截面(不是面板数据集),当我尝试使用它时,我因为每个人有多个观察结果而出错。
dat
好像:
x1 是 [30-100] 中的整数 x2 是二进制 0,1 x3 取两个值 x4 取两个值 x5 取两个值 x6 取两个值
z1 是二进制 0,1 z2 在 [0,1] 中是连续的
c# - Humanizer 无法在 C# 中对意大利语单词进行单数化或复数化
我已经设法使用Humanizer对英语单词进行单数化/复数化,但是当我将 CultureInfo 设置为意大利语时,它只是在单词中添加了一个额外的 's'。
例如:
"Man".Pluralize() => "Men"
-----正确,它按预期工作
"Spaghetto".Pluralize() => "Spaghettos"
-----错,应该是“意大利面”
恐怕它找不到意大利包Humanizer.Core.it
,即使我已经正确安装了所有东西!
这是一个错误还是我错过了什么?如果没有,我应该编写自己的规则和字典,还是可以使用另一个库?
我目前正在使用 .NET 4.x 。
提前谢谢你,干杯!
r - 如何在 R 中的混合效应模型中处理边界(奇异)拟合误差?
我正在尝试拟合一个混合模型,以查看我的测量值的变化(变量“差异”)是否与零显着不同(考虑到受试者的个人影响)。这是我的数据框:
基本上,我对我的 10 个受试者进行了 4 天的前后测量。以上数据来自前后测量的差异。这是我的代码:
当我运行模型时,我确实看到了结果,但我也得到了一个错误:“边界(奇异)拟合:见?isSingular”
在一些谷歌搜索中,有时会发生这种情况,因为模型过于复杂,但据我所知,这个模型与模型一样简单。
这是什么意思,我可以忽略/修复它吗?