<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:02:13 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[PIPE2D-1060] Tune hyperparameters of fluxmodel interpolation</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1060</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;In &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1053&quot; title=&quot;Make a full fluxmodeldata package&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1053&quot;&gt;&lt;del&gt;PIPE2D-1053&lt;/del&gt;&lt;/a&gt;, I made a set of flux models, interpolating spectra on a fine grid of parameters (Teff, log(g), metalicity, alpha). The interpolator (RBF) has hyperparameters such as kernel type and kernel size. Because the &quot;kernel size&quot; (epsilon) is only isotropic, I set epsilon to a fixed constant, and instead introduced hyperparameters &lt;tt&gt;teffScale&lt;/tt&gt;, &lt;tt&gt;loggScale&lt;/tt&gt;, &lt;tt&gt;mScale&lt;/tt&gt; and &lt;tt&gt;alphaScale&lt;/tt&gt; by which to multiply the four parameters (Teff, log(g), metalicity, alpha) respectively. In &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1053&quot; title=&quot;Make a full fluxmodeldata package&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1053&quot;&gt;&lt;del&gt;PIPE2D-1053&lt;/del&gt;&lt;/a&gt;, I experimented a little and set &lt;tt&gt;kernel=&quot;multiquadric&quot;&lt;/tt&gt;, &lt;tt&gt;teffScale=0.5e-3&lt;/tt&gt;, &lt;tt&gt;loggScale=0.5&lt;/tt&gt;, &lt;tt&gt;mScale=2&lt;/tt&gt; and &lt;tt&gt;alphaScale=0.5&lt;/tt&gt; with &lt;tt&gt;epsilon=2&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The hyperparameters are, however, not optimal. For low temperature and low log(g), I know that the max relative error max_{&#955;} |(rbf(&#955;) - f(&#955;)) / f(&#955;)| is sometimes above 100%, where f(&#955;) is an AMBRE spectrum at (Teff, log(g), metal, alpha), and rbf(&#955;) is the RBF interpolation at (Teff, log(g), metal, alpha) guessed from all the other combinations of parameters than (Teff, log(g), metal, alpha). I must tune the hyperparameters more carefully.&lt;/p&gt;

&lt;p&gt;The smaller the scale parameters are, the better the RBF interpolation is. As the scale parameters get smaller, however, the condition number of the matrix of the linear equations to be solved gets worse (wikipedia says). In searching for the best scale parameters, I set the initial guess to somewhat big value, assuming that the condition number was small there, and hoping that the optimizer would optimize the parameters gradually to a smaller values as long as the linear equations were soluble. The optimization program has been running for a week, and it now seems to have found the minimum.&lt;/p&gt;

&lt;p&gt;The optimized problem was as follows: Minimize &lt;tt&gt;&lt;br class=&quot;atl-forced-newline&quot; /&gt;sum&amp;#95;{i = 1}^{6000} loss&amp;#40;i&amp;#41;&lt;/tt&gt;, where &lt;tt&gt;i&lt;/tt&gt; is the name of an AMBRE spectrum. We compute &lt;tt&gt;loss&amp;#40;i&amp;#41;&lt;/tt&gt; in this way: We put &lt;tt&gt;i&lt;/tt&gt; aside and make an RBF model from all the other AMBRE spectra. We interpolate the spectra at &lt;tt&gt;i&lt;/tt&gt; and compare the guess and the truth (We take care that this interpolation won&apos;t be extrapolation. If this interpolation is extrapolation, &lt;tt&gt;i&lt;/tt&gt; is excluded from the sum). Let &lt;tt&gt;loss&amp;#40;i&amp;#41; = \sum&amp;#95;{&#955;} (guess(&#955;) - truth(&#955;))^2 / truth(&#955;)^2&lt;/tt&gt;. Because it would take all too long a time if we were to compute this last sum in full, we use only the shortest 1/3 of the entire wavelength range (where absorption lines densely exist) and abandon 9/10 of the samples in this range.&lt;/p&gt;

&lt;p&gt;The new fluxmodeldata package, when made, will be compatible to the previous one (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1053&quot; title=&quot;Make a full fluxmodeldata package&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1053&quot;&gt;&lt;del&gt;PIPE2D-1053&lt;/del&gt;&lt;/a&gt;). Programs need not changing.&lt;/p&gt;

&lt;p&gt;Edit: Uploaded the new version of fluxmodeldata here: &lt;a href=&quot;https://hscdata.mtk.nao.ac.jp/hsc_bin_dist/pfs/fluxmodeldata-ambre-20220714-full.tar.xz&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://hscdata.mtk.nao.ac.jp/hsc_bin_dist/pfs/fluxmodeldata-ambre-20220714-full.tar.xz&lt;/a&gt;&lt;br/&gt;
Some quality assessments of this package are shown in the comments of this issue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="22872">PIPE2D-1060</key>
            <summary>Tune hyperparameters of fluxmodel interpolation</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</type>
                                            <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="sogo.mineo">sogo.mineo</assignee>
                                    <reporter username="sogo.mineo">sogo.mineo</reporter>
                        <labels>
                            <label>flux-calibration</label>
                    </labels>
                <created>Wed, 13 Jul 2022 00:18:50 +0000</created>
                <updated>Mon, 5 Jun 2023 00:31:20 +0000</updated>
                            <resolved>Wed, 17 Aug 2022 01:11:20 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="31134" author="sogo.mineo" created="Thu, 14 Jul 2022 02:27:07 +0000"  >&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15231/15231_max.relative.error.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;br/&gt;
 Histogram of &lt;tt&gt;e_{i} (i = 1,...,6000)&lt;/tt&gt;, where &lt;tt&gt;e_{i} = max_{&#955;} |rbf_{i}(&#955;) - f_{i}(&#955;)| / f_{i}(&#955;)&lt;/tt&gt;, &lt;tt&gt;f_{i&lt;/tt&gt;} is the AMBRE spectrum at &lt;tt&gt;i&lt;/tt&gt;, and &lt;tt&gt;rbf_{i&lt;/tt&gt;} is the RBF interpolation guessed from the other points. A small number of&#160;&lt;tt&gt;e_{i} are above 5%, but I don&apos;t think they are problematic, as I am going to explain later.&lt;/tt&gt;&lt;/p&gt;</comment>
                            <comment id="31135" author="sogo.mineo" created="Thu, 14 Jul 2022 02:57:59 +0000"  >&lt;p&gt;&lt;tt&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15232/15232_rms.relative.error.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/tt&gt;&lt;br/&gt;
Histogram of &lt;tt&gt;e&apos;&amp;#95;{i} &amp;#40;i = 1,...,6000&amp;#41;&lt;/tt&gt; where &lt;tt&gt;e&apos;&amp;#95;{i&lt;/tt&gt;} = root mean square of (rbf_{i}&amp;#40;&#955;&amp;#41; - f_{i}&amp;#40;&#955;&amp;#41;&amp;#41; / f_{i}&amp;#40;&#955;&amp;#41;. RMS error is below &amp;lt; 0.3% for all points.&lt;/p&gt;</comment>
                            <comment id="31136" author="sogo.mineo" created="Thu, 14 Jul 2022 03:53:43 +0000"  >&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15233/15233_interpolation.error.full.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;br/&gt;
Two bad examples whose interpolation errors are large. The spikes of relative errors are always at ~ 400nm. The strange error at the right edge (&amp;gt;1200nm) of the lower panel is caused by wavelength extrapolation (not related to this issue).&lt;/p&gt;</comment>
                            <comment id="31137" author="sogo.mineo" created="Thu, 14 Jul 2022 04:07:44 +0000"  >&lt;p&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15234/15234_interpolation.error.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;br/&gt;
When I look into the spikes in detail, I see that the absorption is so deep there that the denominator of the relative error (guess - truth) / truth is very small, which is why the relative error is large there. Therefore I don&apos;t think the spikes will affect the flux calibration.&lt;/p&gt;</comment>
                            <comment id="31151" author="sogo.mineo" created="Fri, 15 Jul 2022 03:42:15 +0000"  >&lt;p&gt;I confirmed that drp_stella&apos;s unit tests passes with the new fluxmodeldata package.&lt;/p&gt;</comment>
                            <comment id="31157" author="sogo.mineo" created="Fri, 15 Jul 2022 05:21:37 +0000"  >&lt;p&gt;Could you review this task? The product of this task has been uploaded to the URL shown at the bottom of the description. There are no changes to programs. Only the full fluxmodeldata package (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1053&quot; title=&quot;Make a full fluxmodeldata package&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1053&quot;&gt;&lt;del&gt;PIPE2D-1053&lt;/del&gt;&lt;/a&gt;) is superseded.&lt;/p&gt;</comment>
                            <comment id="31219" author="hassan" created="Wed, 10 Aug 2022 20:54:58 +0000"  >&lt;p&gt;I think this is fine. Would it be possible to test the situation where the absorption at ~393.5 nm is masked out during the interpolation process?&lt;/p&gt;</comment>
                            <comment id="31227" author="sogo.mineo" created="Tue, 16 Aug 2022 04:43:27 +0000"  >&lt;p&gt;I started the computation just now. It will end in a day.&lt;/p&gt;</comment>
                            <comment id="31232" author="sogo.mineo" created="Wed, 17 Aug 2022 01:05:32 +0000"  >&lt;p&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15310_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15310/15310_rms.relative.error+%28bad+zones+masked%29.png&quot; title=&quot;rms.relative.error (bad zones masked).png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15310&quot; file-preview-title=&quot;rms.relative.error (bad zones masked).png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15309/_thumb_15309.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt;  &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;15310_thumb&quot; href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/15310/15310_rms.relative.error+%28bad+zones+masked%29.png&quot; title=&quot;rms.relative.error (bad zones masked).png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;15310&quot; file-preview-title=&quot;rms.relative.error (bad zones masked).png&quot;&gt;&lt;img src=&quot;https://pfspipe.ipmu.jp/jira/secure/thumbnail/15310/_thumb_15310.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;br/&gt;
These are the error histograms with bad zones masked. Maximum errors are reduced but average errors don&apos;t decrease very much.&lt;/p&gt;

&lt;p&gt;&amp;gt; the absorption at ~393.5 nm is masked out during the interpolation process&lt;br/&gt;
Masking a wavelength zone does not affect interpolation in other zones because the interpolation at one wavelength is independent of the interpolation at another. In drawing the histograms above, I masked the bad zones not during the interpolation process but during the computation of errors.&lt;/p&gt;</comment>
                            <comment id="31233" author="sogo.mineo" created="Wed, 17 Aug 2022 01:11:20 +0000"  >&lt;p&gt;I am closing this issue. Thank you for reviewing.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="23463">PIPE2D-1231</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="15233" name="interpolation.error.full.png" size="166611" author="sogo.mineo" created="Thu, 14 Jul 2022 03:47:48 +0000"/>
                            <attachment id="15234" name="interpolation.error.png" size="175944" author="sogo.mineo" created="Thu, 14 Jul 2022 03:56:13 +0000"/>
                            <attachment id="15309" name="max.relative.error (bad zones masked).png" size="29602" author="sogo.mineo" created="Wed, 17 Aug 2022 00:53:36 +0000"/>
                            <attachment id="15231" name="max.relative.error.png" size="14353" author="sogo.mineo" created="Thu, 14 Jul 2022 01:57:46 +0000"/>
                            <attachment id="15310" name="rms.relative.error (bad zones masked).png" size="28434" author="sogo.mineo" created="Wed, 17 Aug 2022 00:53:36 +0000"/>
                            <attachment id="15232" name="rms.relative.error.png" size="14072" author="sogo.mineo" created="Thu, 14 Jul 2022 02:34:04 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|02qpjd:00r20i</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>hassan</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>