估计阅读时长: 2 分钟

imports "clustering" from "MLkit";

require(graphics2D);

multishapes = read.csv("./multishapes.csv");
[x, y] = list(multishapes[, "x"], multishapes[, "y"]);
print(multishapes, max.print = 13);

# detect object shapes
objects = graphics2D::pointVector(multishapes[, "x"], multishapes[, "y"]) |> dbscan_objects();
objects[objects == "-1"] = "noise";
objects = ifelse(objects == "noise", objects, `object_${objects}`);

# show object detection result
bitmap(file = "./object_detection.png") {
    plot(multishapes[, "x"], multishapes[, "y"], 
        class     = objects, 
        grid.fill = "white",
        padding   = "padding: 125px 300px 200px 200px;",
        colorSet  = "paper"
    );
}
谢桂纲

Attachments

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *

博客文章
November 2025
S M T W T F S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
  1. 其实,你不应该直接跑原始表达矩阵的。因为在原始表达矩阵中,基因的特征数量可能会非常多,做随机森林或者SVM建模就会会非常久。应该先用limma程序包对矩阵筛选一次,例如用log2fc绝对值按照阈值cutoff筛选一次,或者对log2fc绝对值排序后取前1000个特征,得到小一些feature集合的矩阵后再使用这个程序包做机器学习分析。