首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏数据结构与算法

    Discrete Logging

    Given a prime P, 2 <= P < 231, an integer B, 2 <= B < P, and an integer N, 1 <= N < P, compute the discrete

    70580发布于 2018-04-13
  • 来自专栏hotarugaliの技术分享

    CF1407D「Discrete Centrifugal Jumps」

    题目 题目链接:CF1407D「Discrete Centrifugal Jumps」 。 Let’s call a jump from -th skyscraper to -th ( ) discrete, if all skyscrapers between are strictly Formally, jump is discrete, if and one of the following conditions satisfied: At the and wants to live a little longer, so his goal is to reach nnn-th skyscraper with minimal count of discrete Output Print single number — minimal amount of discrete jumps.

    59510编辑于 2022-03-02
  • 来自专栏半杯茶的小酒杯

    Map Matching-轨迹相似性度量算法-Discrete Frechet Distance

    实际计算中,用多边形曲线逼近连续曲线,转化为Discrete Frechet Distance。 的Fréchet distance,要先找到对应的点对序列 其中 , 为了保证点的顺序,对于所有的 ,令 然后计算对应点对的最大距离: longest link 离散弗雷歇距离(Discrete Frechet Distance)的计算如下: 离散弗雷歇距离 离散弗雷歇距离(Discrete Frechet Distance)算法 Discrete Frechet Distance Algorithm

    1.9K20编辑于 2022-04-28
  • 来自专栏GiantPandaCV

    基于 Discrete Diffusion 的模型不可知分割细化

    基于 Discrete Diffusion 的模型不可知分割细化 引言 这次这篇文章介绍一篇很有意思的工作:SegRefiner,来自 NeurIPS, 2023,目前代码已开源。

    70510编辑于 2024-01-17
  • 来自专栏NLP/KG

    gym中的discrete类、box类和multidiscrete类简介和使用

    相关文章: Box() dict()可用于创建连续的空间;OpenAI Gym Discrete和Box spaces同时存在,代码该怎么写;gym中各种离散连续写法 解读gym中的action_space Box 连续空间->DiagGaussianPdType (对角高斯概率分布) Discrete离散空间->SoftCategoricalPdType(软分类概率分布) MultiDiscrete连续空间 ->SoftMultiCategoricalPdType (多变量软分类概率分布) 多二值变量连续空间->BernoulliPdType (伯努利概率分布) 1.discreteDiscrete 类对应于一维离散空间 定义一个Discrete类的空间只需要一个参数n就可以了 discrete space允许固定范围的非负数 2.box类 box类对应于多维连续空间 Box空间可以定义多维空间,每一个维度可以用一个最低值和最大值来约束

    1.8K20编辑于 2022-12-21
  • 来自专栏GoCoding

    RTSP 流相关工具介绍

    Interval: Discrete 0.033s (30.000 fps) Size: Discrete 320x240 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 176x144 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 160x120 Interval: Discrete 0.050s (20.000 fps) Size: Discrete 1280x720 Interval: Discrete 0.100s (10.000 fps) Size: Discrete 640x360 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 352x288 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 320x240 Interval: Discrete 0.033s (30.000

    3.8K41发布于 2021-05-06
  • 来自专栏大白技术控的技术自留地

    用Maxima画出一些有趣的图

    *cos(t)]; t_range:[t, 0, 40, 0.01]; inits:[0.0, 0.1]; sol:rk(eqs,[x,y],inits, t_range)$ plot2d([discrete , makelist([sol[i][2], sol[i][3]], i, 1, length(sol))], WEB_IMAGE); plot2d([discrete, makelist([sol[ i][3], sol[i][4]], i, 1, length(sol))], WEB_IMAGE); plot2d([discrete, makelist([sol[i][2], sol[i][4] , makelist([sol[i][2], sol[i][3]], i, 1, length(sol))], WEB_IMAGE); plot2d([discrete, makelist([sol[ i][2], sol[i][4]], i, 1, length(sol))], WEB_IMAGE); plot2d([discrete, makelist([sol[i][3], sol[i][4]

    48220发布于 2019-03-05
  • 来自专栏小明的数据分析笔记本

    R语言ggplot2作图离散变量更改坐标轴范围

    data=df,aes(x=gene_name,y=variable))+ geom_tile(aes(fill=value))+ scale_fill_social_c()+ scale_y_discrete data=df,aes(x=gene_name,y=variable))+ geom_tile(aes(fill=value))+ scale_fill_social_c()+ scale_y_discrete (expand=expansion(mult=c(1,0))) image.png 如果是要更改x轴左右的间距把scale_y_discrete()换成scale_x_discrete()就可以了 + geom_tile(aes(fill=value))+ coord_polar()+ scale_fill_social_c()+ theme_void()+ scale_y_discrete + geom_tile(aes(fill=value))+ coord_polar()+ scale_fill_social_c()+ theme_void()+ scale_y_discrete

    3.4K40发布于 2021-08-31
  • 来自专栏构建FFmpeg Android播放器

    Android 利用V4L2 调用camera

    1280x720 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 848x480 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 960x540 Interval: Discrete Interval: Discrete 0.033s (30.000 fps) Size: Discrete 320x180 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 320x240 Interval: Discrete 0.033s (30.000 fps) Size: Discrete 424x240 Interval: Discrete 0.033s (30.000 fps) Size: Discrete

    5.5K20发布于 2020-09-16
  • 来自专栏生信喵实验柴

    ggplot2分组条形图饼图箱线图

    (limits=x$X) p + scale_x_discrete(limits=x$X) + scale_fill_brewer(palette = 1,type = 'seq') p + scale_x_discrete (palette = 2,type = 'div') p + scale_x_discrete(limits=x$X) + scale_fill_brewer(palette = 3,type = 'div ') p + scale_x_discrete(limits=x$X) + scale_fill_brewer(palette = 4,type = 'div') p + scale_x_discrete (palette = 'Set1',type = 'div') p + scale_x_discrete(limits=x$X) + scale_fill_brewer(palette = 'Set1' ) p + scale_x_discrete(limits=x$X) + scale_fill_brewer(palette = 'Blues') ggplot(data = svs,aes(x=X,

    1.2K10编辑于 2022-10-25
  • 来自专栏生信喵实验柴

    ggplot2散点图直方图条形图

    (limits=x$chr) # p+scale_x_discrete(limits=x$chr)+coord_flip() # p+scale_x_discrete(limits=x$chr)+coord_flip T) x %>% dplyr::slice(1:24) %>% ggplot(aes(x=chr,y=length)) + geom_bar(stat = 'identity')+ scale_x_discrete dplyr::slice(1:24) %>% ggplot(aes(x=chr,y=length,fill=chr)) + geom_bar(stat = 'identity')+ scale_x_discrete dplyr::slice(1:24) %>% ggplot(aes(x=chr,y=length,fill=chr)) + geom_bar(stat = 'identity')+ scale_x_discrete dplyr::slice(1:24) %>% ggplot(aes(x=chr,y=length,fill=chr)) + geom_bar(stat = 'identity')+ scale_x_discrete

    78420编辑于 2022-10-25
  • 来自专栏NLP/KG

    gym.spaces中找不到prng解决方案

    即生成长度为self.num_discrete_space的一维随机数数组,用于随机抽样。 def sample(self): ​​​​​​​random_array = prng.np_random.rand(self.num_discrete_space)  可用np.random.RandomState np.random.random_sample也可以替换 ​import numpy as np random_array = np.random.RandomState().rand(self.num_discrete_space ) random_array = np.random.rand(self.num_discrete_space) random_array = np.random.random(self.num_discrete_space ) random_array = np.random.random_sample(self.num_discrete_space)

    51030编辑于 2022-12-21
  • 来自专栏算法码上来

    深度强化学习之:PPO训练红白机1942

    = 2 #: Discrete action space for filtered actions MULTI_DISCRETE = 3 #: MultiDiscete action space for filtered actions DISCRETE和MULTI_DISCRETE 是 Gym 里的 Action概念,它们的基类都是gym.spaces.Space,可以通过 sample( Discrete:对应一维离散空间,例如,Discrete(n=4) 表示 [0, 3] 范围的整数。 from gym.spaces import Discrete space = Discrete(4) print(space.sample()) 输出是 3 Box:对应多维连续空间,每一维的范围可以用 (low=-1.0, high=1.0, shape=(3,), dtype=np.float32), Discrete(n=3), Discrete(n=2))) print(space.sample

    2.5K30发布于 2021-04-08
  • 来自专栏北野茶缸子的专栏

    92-R可视化24-与ggplot图例较劲

    geom_point() + labs(x = "Year", y = "Temperature (°F)") + guides(color = "none") 另外scale_xx_discrete 函数亦可指定guide 参数,比如 scale_shape_discrete(guide = "none")。 定义,如 scale_color_discrete(name = "Seasons\nindicated\nby colors:")。 3-改变图例标题和子标签 改变图例标题的方法有很多,关于子标签,可以使用scale_xx_discrete 定义 labels : ggplot(chic, aes(x = date, y = temp , color = season)) + geom_point() + labs(x = "Year", y = "Temperature (°F)") + scale_color_discrete

    3.6K10编辑于 2022-02-08
  • 来自专栏机器学习/数据可视化

    plotly-express-4-常见绘图参数

    =None, color_discrete_map={}, color_continuous_scale=None, range_color=None, color_continuous_midpoint =None, color_discrete_map={}, color_continuous_scale=None, range_color=None, color_continuous_midpoint =None, color_discrete_map={}, orientation=None, groupnorm=None, log_x=False, log_y=False, range_x=None ,除非color列的值在参数color_discrete_map入参的dict键中; color_discrete_map:带字符串键和有效CSS颜色字符串值的dict,默认为{}。 当参数color指定的列不是数值数据时,该参数用于将特定颜色分配给,与特定值对应的标记,color_discrete_map中的键为color表示的列值。

    5.7K10发布于 2021-03-01
  • 来自专栏生信宝典

    这个方法无需旋转就可使得横轴坐标不重叠!

    # 2行交替 ggplot(data=df, aes(x=Gene, y=TPM))+ geom_col() + scale_x_discrete(guide = guide_axis(n.dodge =2)) # 3 行交替 ggplot(data=df, aes(x=Gene, y=TPM))+ geom_col() + scale_x_discrete(guide = guide_axis (n.dodge=3)) 隐藏重叠的坐标轴标记 ggplot(data=df, aes(x=Gene, y=TPM))+ geom_col() + scale_x_discrete(guide ggplot(data=df, aes(x=Gene, y=TPM))+ geom_col() + scale_x_discrete(guide = guide_axis(angle = 45 )) ggplot(data=df, aes(x=Gene, y=TPM))+ geom_col() + scale_x_discrete(guide = guide_axis(angle

    57710编辑于 2021-12-08
  • 来自专栏生物信息学、python、R、linux

    ggplot2之文本换行

    如使用clusterProfiler的barplot时,因为clusterProfiler是基于ggplot2,所以更改ggplot中scale_x_discrete或者scale_y_discrete image.png p + scale_x_discrete(labels=function(x) str_wrap(x, width=20)) ? image.png 如果是dotplot则需要改变scale_y_discrete p <- dotplot(x) p ? image.png p + scale_y_discrete(labels=function(x) str_wrap(x, width=20)) ? strwrap(x, width = width, simplify = FALSE), paste, collapse="\n") } } p<- barplot(x) p+scale_x_discrete

    3.7K30发布于 2020-04-01
  • 来自专栏DeepHub IMBA

    在Python中使用逆变换方法生成随机变量

    ### Generate arbitary discrete distributed random variables given ### the probability vector def discrete_inverse_trans def discrete_samples(prob_vec,n=1): sample=[] for i in range(0,n): sample.append(discrete_inverse_trans def discrete_simulate(prob_vec,numbers,n=1): sample_disc=discrete_samples(prob_vec,n) unique prob_vec=np.array([0.1,0.3,0.5,0.05,0.05]) numbers=np.array([1,2,3,4,5]) dis_example1=discrete_simulate (prob_vec, numbers, n=100) dis_example2=discrete_simulate(prob_vec, numbers, n=500) dis_example3=discrete_simulate

    1.8K20发布于 2021-03-24
  • 来自专栏数据科学(冷冻工厂)

    CUT&Tag 数据处理和分析教程(4)

    geom_jitter(aes(color = Replicate), position = position_jitter(0.15)) + scale_fill_viridis(discrete = TRUE, begin = 0.1, end = 0.9, option = "magma", alpha = 0.8) + scale_color_viridis(discrete = = TRUE, begin = 0.1, end = 0.9, option = "magma", alpha = 0.8) + scale_color_viridis(discrete = = TRUE, begin = 0.1, end = 0.9, option = "magma", alpha = 0.8) + scale_color_viridis(discrete = = TRUE, begin = 0.1, end = 0.9, option = "magma", alpha = 0.8) + scale_color_viridis(discrete =

    42810编辑于 2025-03-31
  • 来自专栏CreateAMind

    动画模拟统计随机变量生成器:离散基础篇

    均匀分布(离散) 离散均匀分布(Discrete Uniform Distribution)的随机变量是最为基本的,图中为 [0, 6] 七个整数的离散均匀分布。 实现代码 from discrete_bernoulli import bernoulli def geometric(p: float) -> int: fail_num = 0 while 实现代码 from discrete_bernoulli import bernoulli def negative_binomial(r: int, p: float) -> int: failures 实现代码 from discrete_bernoulli import bernoulli def hypergeometric(N: int, K_succ_num: int, n_trial_num 实现代码 from discrete_bernoulli import bernoulli def negative_hypergeometric(N: int, K_success_num: int

    1.5K20发布于 2021-02-19
领券