Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Question about Fig2 in the paper page5 #22

@xgyopen

Description

@xgyopen

Hi, this is an amazing work, and thank you very much.
But, I have a question about the fig2 in the page 5 of the paper. Fig2 is the picture of $$ ρ(x)=\frac{μ x^2}{μ+x^2} $$
FGR_loss_paper
But when I draw the picture, the result is different from it. Why?
FGR_loss_my

This is the code I am drawing the image:

# -*- coding: utf-8 -*-
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt  

mpl.rcParams['font.family'] = 'SimHei'
plt.rcParams['axes.unicode_minus'] = False

x = np.linspace(-10, 10, 100)
M_list = [0.25, 1, 4, 16]
color_list = ['k', 'b', 'g', 'r']

for idx, _ in enumerate(M_list):
    M = M_list[idx]
    color = color_list[idx]
    y = (M * np.square(x)) / (M + np.square(x)) # formulation
    plt.plot(x, y, color, label='μ='+str(M))
    plt.annotate(s='μ='+str(M), xy=(x[0], y[0]), xytext=(5,5),
                 xycoords='data',textcoords='offset points', fontsize=10, color=color)

plt.title('Geman-McClure estimator')
plt.xlabel('x')
plt.ylabel('y')
plt.legend()

plt.axis("equal")
plt.show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions