|
25 | 25 | <link rel="index" title="Index" href="genindex.html" /> |
26 | 26 | <link rel="search" title="Search" href="search.html" /> |
27 | 27 | <link rel="next" title="veidt.descriptors module" href="veidt.descriptors.html" /> |
28 | | - <link rel="prev" title="veidt package" href="veidt.html" /> |
| 28 | + <link rel="prev" title="veidt.elsie.spectra_similarity module" href="veidt.elsie.spectra_similarity.html" /> |
29 | 29 |
|
30 | 30 | <link rel="stylesheet" href="_static/custom.css" type="text/css" /> |
31 | 31 |
|
|
62 | 62 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>obj</strong> – Object</td> |
63 | 63 | </tr> |
64 | 64 | <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Descriptor for a structure. Recommended format is a pandas |
65 | | -Series or Dataframe object for easy manipulation. For example, a |
66 | | -simple site descriptor of the fractional coordinates (this is |
67 | | -usually a bad descriptor, so it is just for illustration purposes) |
68 | | -can be generated as:<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">frac_coords</span><span class="p">,</span> <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">"a"</span><span class="p">,</span> <span class="s2">"b"</span><span class="p">,</span> <span class="s2">"c"</span><span class="p">]))</span> |
| 65 | +Dataframe object with the column names as intuitive names. |
| 66 | +For example, a simple site descriptor of the fractional coordinates |
| 67 | +(this is usually a bad descriptor, so it is just for illustration |
| 68 | +purposes) can be generated as:<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">frac_coords</span><span class="p">,</span> <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">"a"</span><span class="p">,</span> <span class="s2">"b"</span><span class="p">,</span> <span class="s2">"c"</span><span class="p">]))</span> |
69 | 69 | <span class="n">a</span> <span class="n">b</span> <span class="n">c</span> |
70 | 70 | <span class="mi">0</span> <span class="mf">0.000000</span> <span class="mf">0.000000</span> <span class="mf">0.000000</span> |
71 | 71 | <span class="mi">1</span> <span class="mf">0.750178</span> <span class="mf">0.750178</span> <span class="mf">0.750178</span> |
72 | 72 | <span class="mi">2</span> <span class="mf">0.249822</span> <span class="mf">0.249822</span> <span class="mf">0.249822</span> |
73 | 73 | </pre></div> |
74 | 74 | </div> |
75 | 75 | <p>Pandas dataframes can be dumped to a variety of formats (json, csv, |
76 | | -etc.) easily.</p> |
| 76 | +etc.) easily. Note that a dataframe should be used even if you have |
| 77 | +only one line, i.e., do not use Series objects unless you know |
| 78 | +what you are doing.</p> |
77 | 79 | </td> |
78 | 80 | </tr> |
79 | 81 | </tbody> |
|
92 | 94 | <tbody valign="top"> |
93 | 95 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>objs</strong> – List of objects</td> |
94 | 96 | </tr> |
95 | | -<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">List of descriptors</td> |
| 97 | +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Concatenated descriptions for all objects. Recommended format |
| 98 | +is a pandas DataFrame. Default implement returns a list of |
| 99 | +descriptors generated by a loop call to describe for each obj.</td> |
96 | 100 | </tr> |
97 | 101 | </tbody> |
98 | 102 | </table> |
|
109 | 113 | transparent conversion of arbitrary input and outputs.</p> |
110 | 114 | <dl class="method"> |
111 | 115 | <dt id="veidt.abstract.Model.fit"> |
112 | | -<code class="descname">fit</code><span class="sig-paren">(</span><em>inputs</em>, <em>outputs</em><span class="sig-paren">)</span><a class="headerlink" href="#veidt.abstract.Model.fit" title="Permalink to this definition">¶</a></dt> |
113 | | -<dd><p>Fit the model.</p> |
| 116 | +<code class="descname">fit</code><span class="sig-paren">(</span><em>features</em>, <em>targets</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#veidt.abstract.Model.fit" title="Permalink to this definition">¶</a></dt> |
| 117 | +<dd><table class="docutils field-list" frame="void" rules="none"> |
| 118 | +<col class="field-name" /> |
| 119 | +<col class="field-body" /> |
| 120 | +<tbody valign="top"> |
| 121 | +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| 122 | +<li><strong>features</strong> – Numerical input feature list or numpy array with dim (m, n) |
| 123 | +where m is the number of data and n is the feature dimension</li> |
| 124 | +<li><strong>targets</strong> – Numerical output target list, or numpy array with dim (m, )</li> |
| 125 | +</ul> |
| 126 | +</td> |
| 127 | +</tr> |
| 128 | +</tbody> |
| 129 | +</table> |
| 130 | +</dd></dl> |
| 131 | + |
| 132 | +<dl class="method"> |
| 133 | +<dt id="veidt.abstract.Model.fit_object"> |
| 134 | +<code class="descname">fit_object</code><span class="sig-paren">(</span><em>inputs</em>, <em>outputs</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#veidt.abstract.Model.fit_object" title="Permalink to this definition">¶</a></dt> |
| 135 | +<dd><p>Fit the model with objects as inputs and outputs</p> |
114 | 136 | <table class="docutils field-list" frame="void" rules="none"> |
115 | 137 | <col class="field-name" /> |
116 | 138 | <col class="field-body" /> |
117 | 139 | <tbody valign="top"> |
118 | 140 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
119 | 141 | <li><strong>inputs</strong> – List of input objects</li> |
120 | | -<li><strong>outputs</strong> – List of output objects</li> |
| 142 | +<li><strong>outputs</strong> – List of output objects or target outputs</li> |
121 | 143 | </ul> |
122 | 144 | </td> |
123 | 145 | </tr> |
@@ -180,7 +202,7 @@ <h3>Related Topics</h3> |
180 | 202 | <ul> |
181 | 203 | <li><a href="index.html">Documentation overview</a><ul> |
182 | 204 | <li><a href="veidt.html">veidt package</a><ul> |
183 | | - <li>Previous: <a href="veidt.html" title="previous chapter">veidt package</a></li> |
| 205 | + <li>Previous: <a href="veidt.elsie.spectra_similarity.html" title="previous chapter">veidt.elsie.spectra_similarity module</a></li> |
184 | 206 | <li>Next: <a href="veidt.descriptors.html" title="next chapter">veidt.descriptors module</a></li> |
185 | 207 | </ul></li> |
186 | 208 | </ul></li> |
|
0 commit comments