adaptive icon indicating copy to clipboard operation
adaptive copied to clipboard

document loss function to find the band gap

Open basnijholt opened this issue 5 years ago • 4 comments

Many people have asked me how to do this.

I've recommended them to use the following loss function:

@adaptive.learner.learner1D.uses_nth_neighbors(0)
def abs_min_log_loss(xs, ys):
    from adaptive.learner.learner1D import default_loss
    ys = [np.log(np.abs(y).min()) for y in ys]
    return default_loss(xs, ys)

We should put this in the documentation somewhere.

basnijholt avatar Mar 11 '19 15:03 basnijholt

What's the motivation for log, as opposed to any other monotonous function?

akhmerov avatar Mar 12 '19 15:03 akhmerov

This makes small y-values more important.

basnijholt avatar Mar 12 '19 15:03 basnijholt

But 1/abs(y).min() would make it even more important. I'm wondering why log specifically.

akhmerov avatar Mar 12 '19 21:03 akhmerov

when we say "band gap" here I guess we're making certain assumptions, e.g. system has direct gap, and valence and conduction bands are at y<0 and y>0 respectively.

jbweston avatar Apr 06 '19 09:04 jbweston