文章阅读目录大纲

估计阅读时长: 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 *

博客文章
February 2026
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
  1. […] 基于之前的一篇文章《TF-IDF与N-gram One-hot文档嵌入算法原理》的学习,我们了解到可以将生物序列通过分解为kmer,组成单词集合用来表示一个文档。从而将长度各异的生物序列嵌入为长读一致的数值向量,进而可以用于后续的各种数据处理工作中。在这里,假设我们将基因组中的所有基因提取出来,然后通过blast比对的方式将基因注释到对应的ec number编号,既可以将某一个基因组使用一个ec number的集合来表示。通过这样子的数据表示方法,我们就可以将任意一个大小各异,基因组成不同的基因组都嵌入为具有相同维度特征的数值向量用于机器学习建模之类的工作。 […]