Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
rictjo
impetuous
提交
323cd38e
I
impetuous
项目概览
rictjo
/
impetuous
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
impetuous
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
323cd38e
编写于
6月 10, 2021
作者:
rictjo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
equiv
上级
9378f014
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
18 deletion
+10
-18
setup.py
setup.py
+1
-1
src/impetuous/quantification.py
src/impetuous/quantification.py
+9
-17
未找到文件。
setup.py
浏览文件 @
323cd38e
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"impetuous-gfa"
,
version
=
"0.48.
1
"
,
version
=
"0.48.
2
"
,
author
=
"Richard Tjörnhammar"
,
author_email
=
"richard.tjornhammar@gmail.com"
,
description
=
"Impetuous Quantification, a Statistical Learning library for Humans : Alignments, Clustering, Enrichments and Group Analysis"
,
...
...
src/impetuous/quantification.py
浏览文件 @
323cd38e
...
...
@@ -317,7 +317,6 @@ def run_rpls_regression ( analyte_df , journal_df , formula ,
return
(
res_df
)
import
impetuous.fit
as
ifit
import
impetuous.clustering
as
icluster
def
run_shape_alignment_clustering
(
analyte_df
,
journal_df
,
formula
,
bVerbose
=
False
)
:
...
...
@@ -382,24 +381,21 @@ def knn_clustering_alignment( P , Q ) :
return
(
np
.
array
(
labels
),
np
.
array
(
centroids
)
)
def
tol_check
(
val
,
TOL
=
1E-10
):
if
val
>
TOL
:
print
(
"WARNING: DATA ENTROPY HIGH (SNR LOW)"
,
val
)
def
multifactor_solution
(
analyte_df
,
journal_df
,
formula
)
:
inventing_saiga__
=
'Richard Tjörnhammar'
A
,
J
,
f
=
analyte_df
,
journal_df
,
formula
encoding_df
=
interpret_problem
(
analyte_df
=
A
,
journal_df
=
J
,
formula
=
f
).
T
solution_
=
solve
(
A
.
T
,
encoding_df
.
T
)
if
solution_
[
1
]
>
1E-10
:
print
(
"WARNING: YOUR DATA IS SHIT "
,
solution_
[
1
]
)
tol_check
(
solution_
[
1
]
)
beta_df
=
pd
.
DataFrame
(
solution_
[
0
]
,
index
=
A
.
index
,
columns
=
encoding_df
.
index
)
U
,
S
,
VT
=
np
.
linalg
.
svd
(
beta_df
.
values
,
full_matrices
=
False
)
U
,
S
,
VT
=
np
.
linalg
.
svd
(
beta_df
.
values
,
full_matrices
=
False
)
P
=
pd
.
DataFrame
(
U
.
T
,
index
=
[
'Comp'
+
str
(
r
)
for
r
in
range
(
len
(
U
.
T
))]
,
columns
=
A
.
index
)
W
=
pd
.
DataFrame
(
VT
,
index
=
[
'Comp'
+
str
(
r
)
for
r
in
range
(
len
(
U
.
T
))]
,
columns
=
encoding_df
.
index
)
S
=
pd
.
DataFrame
(
np
.
dot
(
W
,
np
.
linalg
.
svd
(
encoding_df
,
full_matrices
=
False
)[
-
1
]
)
,
columns
=
encoding_df
.
columns
,
index
=
[
'Comp'
+
str
(
r
)
for
r
in
range
(
len
(
U
.
T
))]
)
return
(
P
.
T
,
W
.
T
,
S
.
T
,
encoding_df
.
T
)
Z
=
threshold
(
encoding_df
.
T
,
S
*
W
)
.
T
return
(
P
.
T
,
W
.
T
,
Z
.
T
,
encoding_df
.
T
)
def
multivariate_factorisation
(
analyte_df
,
journal_df
,
formula
,
bVerbose
=
False
,
synonyms
=
None
,
blur_cutoff
=
99.8
,
...
...
@@ -416,16 +412,12 @@ def multivariate_factorisation ( analyte_df , journal_df , formula ,
exclude_labels_from_centroids
=
exclude_labels_from_centroids
,
study_axii
=
study_axii
,
owner_by
=
owner_by
)
if
bReturnAll
:
return
(
{
'Mu
tl
ivariate Solutions'
:
res_df
,
return
(
{
'Mu
lt
ivariate Solutions'
:
res_df
,
'Feature Scores'
:
P
,
'Encoding Weights'
:
W
,
'Sample Scores'
:
S
,
'Encoding DataFrame'
:
encoding_df
})
'Sample Scores'
:
S
,
'Encoding DataFrame'
:
encoding_df
})
else
:
return
(
res_df
)
crop
=
lambda
x
,
W
:
x
[:,:
W
]
def
run_shape_alignment_regression
(
analyte_df
,
journal_df
,
formula
,
bVerbose
=
False
,
synonyms
=
None
,
blur_cutoff
=
99.8
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录