Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Fig2 in the paper page5 #22

Open
xgyopen opened this issue Jul 15, 2019 · 2 comments
Open

Question about Fig2 in the paper page5 #22

xgyopen opened this issue Jul 15, 2019 · 2 comments

Comments

@xgyopen
Copy link

xgyopen commented Jul 15, 2019

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()
@yaoyishen
Copy link

I am also confused about it.Have you solved it?

@otaviog
Copy link

otaviog commented Jul 31, 2021

I got a similar Figure using a different formula:

image

From this paper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants