亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? index.html

?? This document contains a general overview in the first few sections as well as a more detailed refer
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
<html>  <head>    <title>SVM-python</title>    <link href="style.css" rel="stylesheet" type="text/css">  </head>  <body><h1>SVM<sup><i>python</i></sup></h1><ul><li>High Level View<ul><li><a href="#overview">Introduction</a></li><li><a href="#building">Building</a></li><li><a href="#using">Using</a></li><li><a href="#learning">Overview of <code>svm_python_learn</code><li><a href="#classification">Overview of <code>svm_python_classify</code></a></ul><li>Low Level Reference<ul><li><a href="#objects">Objects</a></li><li><a href="#details">Details of User Functions</a></li><li><a href="#svmlight"><code>svmlight</code> Extension Module</a><li><a href="#parameters">Special Parameters</a><li><a href="#example">Example Module <code>multiclass</code></a></ul></ul><a class="bookmark" name="overview"><h2>Introduction</h2></a><p>Put simply, SVM<sup><i>python</i></sup> is <a href="http://svmlight.joachims.org/svm_struct.html">SVM<sup><i>struct</i></sup></a>, except that all of the C API functions that the user normally has to implement (except those dealing with C specific problems, most notably memory management) instead call a function of the same name in a <a href="http://www.python.org/">Python</a> module.  You can write an SVM<sup><i>struct</i></sup> instance in Python without having to author any C code.  SVM<sup><i>python</i></sup> tries to stay close to SVM<sup><i>struct</i></sup> in naming conventions and other behavior, but knowledge of SVM<sup><i>struct</i></sup>'s original C implementation is not required.</p><p>This document contains a general overview in the first few sections as well as a more detailed reference in later sections for SVM<sup><i>python</i></sup>.  If you're already familiar with SVM<sup><i>struct</i></sup> and Python, it's possible to get a pretty good idea of how to use the package merely by browsing through <code>svmstruct.py</code> and <code>multiclass.py</code>.  This document provides a more in depth view of how to use the package.</p><p>Note that this is not a conversion of SVM<sup><i>struct</i></sup> to Python.  It is merely an <a href="http://docs.python.org/ext/embedding.html">embedding of Python</a> in existing C code.  All code other than the user implemented API functions is still in C, including optimization.</p><p>SVM<sup><i>light</i></sup> is the basic underlying SVM learner, SVM<sup><i>struct</i></sup> a general framework to learn complex output spaces built upon SVM<sup><i>light</i></sup> for which one would write instantiations to learn in a particular setting, and SVM<sup><i>python</i></sup> extends SVM<sup><i>struct</i></sup> to allow such instantiations to be written in Python instead of in C.  In SVM<sup><i>struct</i></sup>, the user implement various functions in the <code>svm_struct_api.c</code> file, which the underlying SVM<sup><i>struct</i></sup> code calls in order to learn a task.  The intention of SVM<sup><i>struct</i></sup> is that the underlying code is constant, and all that a user needs to change is within <code>svm_struct_api.c</code> and <code>svm_struct_api_type.h</code>.  SVM<sup><i>python</i></sup> works the same way, except all the functions that are to be implemented are instead implemented in a Python module (a <code>.py</code> file), and all these functions in <code>svm_struct_api.c</code> are instead glue code to call their embedded Python equivalents from the module, and all the types in <code>svm_struct_api_type.h</code> contain Python objects.  The intention of SVM<sup><i>python</i></sup> is that is that the C code stays constant and the user writes new and modifies Python modules to implement specific tasks.<p>The primary advantages are that Python tends to be easier and faster to code than C, less resistant to change and code reorganization, tends to be <em>many</em> times more compact, there's no explicit memory management, and Python's object oriented-ness means that some tedious tasks in SVM<sup><i>struct</i></sup> can be easily replaced with default built in behavior.</p><p>My favorite example of this last point is that, since Python objects can be assigned any attribute, and since many Python objects are easily serializable with the <a href="http://docs.python.org/lib/module-pickle.html"><code>pickle</code></a> module, adding a field to the struct-model in Python code consists of a simple assignment like <code>sm.foo = 5</code> at some point, and that's it.  If one were to use C code in SVM<sup><i>struct</i></sup>, one would add a field to the relevant struct, add an assignment, add code to write it to a model file, add code to parse it from a model file, and then test it to make sure all these little changes work well with each other.</p><p>The primary disadvantage to using SVM<sup><i>python</i></sup> is that it is slower than equivalent C code.  For example, considering the time outside of SVM optimization, the Python implementation of multiclass classification takes 9 times the time as <a href="http://svmlight.joachims.org/svm_multiclass.html">SVM<sup><i>multiclass</i></sup></a>.  However, on this task SVM optimization takes about 99.5% of the time anyway, so the increase is often negligible.</p><a class="bookmark" name="building"><h2>Building</h2></a>To build this, a simple <code>make</code> should do it, <em>unless</em> the Python library you want to use is not the library corresponding to the Python interpreter you get when you just type <code>python</code>.<p>You might want to modify the <code>Makefile</code> to modify the <code>PYTHON</code> variable to the path of the desired interpreter.  When you install Python, you install a library and an interpreter.  This interpreter is able to output where its corresponding library is stored.  The <code>Makefile</code> calls the Python interpreter to get this information, as well as other important information relevant to building a C application with embedded Python.  You can specify the path of your desired interpreter by setting <code>PYTHON</code> to something other than <code>python</code>.</p><p>When you build, the program will produce two executables, <code>svm_python_learn</code> for learning a model and <code>svm_python_classify</code> for classification with a learned model.</p><p>I have tried building SVM<sup><i>python</i></sup> with both Python 2.3 and 2.4 on OS X and Linux.  Obviously, if the Python module you want to use usess features specific to Python 2.4 (like generator expressions or the long overdue <code>sorted</code>) you wouldn't be able to use the module with an SVM<sup><i>python</i></sup> built against the Python 2.3 library.<a class="bookmark" name="using"><h2>Using</h2></a><p>One annoying detail of embedded Python is that your <code>PYTHONPATH</code> environment variable has to contain "<code>.</code>" so the executable knows where to look for the module to load.</p><p>The file <code>svmstruct.py</code> is a Python module, and also contains documentation on all the functions which the C code may attempt to call.  This is a good place to start reading if you are already familiar with SVM<sup><i>struct</i></sup> and want to get familiar with how to build a SVM<sup><i>python</i></sup> Python module.  This describes what each function should do and, for non-required functions, describes the default behavior that happens if you <em>don't</em> implement them. The <code>multiclass.py</code> file is an example implementation of multiclass classification in Python.</p><p>Once you've written a Python module in the file <code>foo.py</code> based on <code>svmstruct.py</code> and you want to use SVM<sup><i>python</i></sup> with this module, you would use the following command line commands to learn a model and classify with a model respectively.</p><blockquote><code>./svm_python_learn    --m foo [options] &lt;train&gt; &lt;model&gt;<br>./svm_python_classify --m foo [options] &lt;test&gt;  &lt;model&gt; &lt;output&gt;</code></blockquote><p>Note that SVM<sup><i>python</i></sup> accepts the same arguments as SVM<sup><i>struct</i></sup> plus this extra <code>--m</code> option.  If the <code>--m</code> option is omitted it is equivalent to including the command line arguments <code>--m svmstruct</code>.  Note that though we put this command line option first, the <code>--m</code> option may occur anywhere in the option list.<a class="bookmark" name="learning"><h2>Overview of <code>svm_python_learn</code></h2></a><map name="learningmap"><area shape="rect" coords="39,116,175,161" href="#detail-print_struct_help"><area shape="rect" coords="13,330,200,374" href="#detail-find_most_violated_constraint"><area shape="rect" coords="14,397,201,439" href="#detail-psi"><area shape="rect" coords="30,462,187,505" href="#detail-loss"><area shape="rect" coords="276,58,449,100" href="#detail-parse_struct_parameters"><area shape="rect" coords="289,175,437,219" href="#detail-read_struct_examples"><area shape="rect" coords="307,242,419,286" href="#detail-init_struct_model"><area shape="rect" coords="292,308,433,350" href="#detail-init_struct_constraints"><area shape="rect" coords="280,491,446,536" href="#detail-print_struct_learning_stats"><area shape="rect" coords="301,558,425,600" href="#detail-write_struct_model"></map><img src="learning-tree.gif" alt="Flow Chart of the Learning Program" width="454" height="643" align="right" usemap="#learningmap"><p>Pictured is a diagram illustrating the flow of execution within <code>svm_python_learn</code>.  This diagram also describes the SVM<sup><i>struct</i></sup> learning program pretty well, excepting the stuff particular to loading the Python module, and how structure parameters are <i>always</i> parsed to enable the program to load the Python module, and how everything is in C and all functions are required.</p><p>The <font color="red">red boxes</font> indicate things that are done wihin the underlying C code.  The other boxes indicate functions to be implemented in the Python module.  The <font color="blue">blue boxes</font> indicate functions that absolutely must be implemented or the program won't be able to execute.  The <font color="green">green boxes</font> indicate functions that are not required, strictly speaking, because they have some default behavior.  The <font color="#999900">yellow boxes</font> indicate functions that in the vast majority of cases are probably unnecessary to implement since the default behavior is probably acceptable.</p><p>The <code>svm_python_learn</code> program first checks whether the command line arguments are structured completely correctly.  Whether they are or are not, it checks if a <code>--m</code> module is loaded and loads the Python module.  If the arguments were not structured correctly, the Python module's help function is called to print out information to standard output, at which point the program exits.  If, on the other hand, the arguments check out, the pattern-label example pairs are read from the indicated example file, some parameters for the learning model are set, some preliminary constraints are initialized, the learning model's structures are defined, and then the learning process begins.</p><p>This learning process repeatedly iterates over all training examples.  For each example, the label associated with the most violated constraint for the pattern is found, the feature vector &Psi; describing the relationship between the pattern and the label is computed, and the loss &Delta; is computed.  From the &Psi; and &Delta;, the program determines if the most violated constraint is violated <em>enough</em> to justify adding it to the model.  If it is, then the constraint is added, and the program moves on to the next example.  In the event that no constraints were added in an iteration, the algorithm either lowers its tolerance or, if minimum tolerance has been reached, ends the learning process.</p><p>Once learning has finished, statistics related to learning may be printed out, the model is written to a file, and the program exits.</p><a class="bookmark" name="classification"><h2>Overview of <code>svm_python_classify</code></h2></a><map name="classificationmap"><area shape="rect" coords="33,136,183,179" href="#detail-classify_struct_example"><area shape="rect" coords="49,201,169,246" href="#detail-write_label"><area shape="rect" coords="31,267,188,312" href="#detail-loss">

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美va天堂va视频va在线| 欧美视频精品在线| 国产一区二区主播在线| 蜜臀va亚洲va欧美va天堂 | 国产精品白丝av| 精品一二三四区| 韩国欧美国产1区| 国产黄色成人av| 不卡视频在线看| 91久久精品网| 91.麻豆视频| 欧美成va人片在线观看| 久久久精品tv| 亚洲乱码中文字幕综合| 午夜精品久久久久久不卡8050| 亚洲一二三四在线| 免费在线观看视频一区| 老司机精品视频导航| 成人美女在线观看| 欧美日韩一级黄| 精品国产91乱码一区二区三区 | 亚洲午夜久久久久| 久久国产欧美日韩精品| 成人丝袜高跟foot| 欧美人体做爰大胆视频| 国产亚洲一二三区| 亚洲精品成人在线| 久久精品二区亚洲w码| 国产麻豆精品95视频| 99精品视频一区二区三区| 欧美三级视频在线观看| 久久欧美一区二区| 一区二区三区欧美视频| 日本中文字幕一区二区有限公司| 国产在线精品一区二区不卡了| av在线免费不卡| 91麻豆精品国产91久久久久| 中文字幕在线免费不卡| 日韩av电影天堂| 91免费在线看| 精品粉嫩aⅴ一区二区三区四区| 国产精品麻豆视频| 麻豆精品一区二区综合av| k8久久久一区二区三区| 欧美成人精品1314www| 亚洲欧美日韩国产一区二区三区| 久久97超碰国产精品超碰| 日本丶国产丶欧美色综合| 久久只精品国产| 日韩成人免费电影| 欧美三级乱人伦电影| 欧美激情综合五月色丁香小说| 视频一区在线播放| 欧美一区二区三区免费视频| 国产精品乱码一区二三区小蝌蚪| 麻豆视频一区二区| 911精品国产一区二区在线| 一区二区三区四区五区视频在线观看| 国产成人在线看| 2023国产精品| 久久99久久99小草精品免视看| 欧美日本韩国一区| 日韩精品乱码av一区二区| 在线观看视频一区二区| 1024国产精品| 99re在线精品| 亚洲情趣在线观看| 日本电影亚洲天堂一区| 一区二区三区蜜桃网| 日本高清不卡视频| 一区二区三区不卡视频| 在线精品观看国产| 亚洲一二三区不卡| 欧美欧美午夜aⅴ在线观看| 午夜亚洲国产au精品一区二区| 欧美亚洲国产一区二区三区va | 欧美亚洲综合网| 亚洲一级二级三级| 91精品国产免费久久综合| 亚洲不卡一区二区三区| 欧美区在线观看| 精品制服美女丁香| 国产日产欧美精品一区二区三区| 国产宾馆实践打屁股91| 中文字幕日韩一区| 在线观看日韩精品| 全国精品久久少妇| 久久久午夜电影| 91视视频在线直接观看在线看网页在线看| 国产精品免费aⅴ片在线观看| av不卡一区二区三区| 亚洲综合在线五月| 日韩一区二区三区免费看| 国模冰冰炮一区二区| 国产精品无遮挡| 欧美伊人精品成人久久综合97 | 日韩午夜av电影| 国产精品一区二区三区99| 亚洲欧美影音先锋| 日韩一区二区影院| 成人午夜视频网站| 天堂蜜桃91精品| 日本一区二区在线不卡| 欧美日韩一区二区在线观看视频| 日本不卡一二三区黄网| 国产精品久久久一本精品 | 亚洲成人免费视频| 日韩欧美国产高清| 99在线视频精品| 久久草av在线| 亚洲高清不卡在线观看| 久久精品免费在线观看| 一本一本久久a久久精品综合麻豆| 肉丝袜脚交视频一区二区| 国产欧美日本一区视频| 欧美日韩日本视频| 成人综合日日夜夜| 日韩成人免费电影| 一区二区久久久久| 中文欧美字幕免费| 日韩欧美自拍偷拍| 91国在线观看| 99国产一区二区三精品乱码| 久久精品国产成人一区二区三区 | 三级久久三级久久| 一区二区三区在线免费观看| 精品久久久久久久久久久久久久久久久| 色先锋资源久久综合| 国产激情一区二区三区桃花岛亚洲| 一区二区三区蜜桃网| 国产精品乱码一区二三区小蝌蚪| 精品欧美乱码久久久久久| 7777精品久久久大香线蕉| 91亚洲大成网污www| 风间由美性色一区二区三区| 韩国在线一区二区| 久久精品国产精品青草| 秋霞午夜av一区二区三区| 亚洲一二三四久久| 一区二区三区欧美| 亚洲永久精品国产| 亚洲丝袜精品丝袜在线| 国产精品传媒视频| 国产精品无码永久免费888| 精品动漫一区二区三区在线观看| 欧美一区二区三区婷婷月色| 欧美四级电影网| 欧美私人免费视频| 欧美日韩免费在线视频| 欧美日韩国产小视频| 欧美日韩不卡一区二区| 欧美日韩1234| 日韩欧美在线网站| 欧美成人a视频| 久久久久88色偷偷免费 | 色综合久久综合| 99麻豆久久久国产精品免费| 波多野结衣中文字幕一区| 成人丝袜高跟foot| 色狠狠桃花综合| 色婷婷综合在线| 欧美精品丝袜中出| 欧美成人官网二区| 中文字幕不卡一区| 亚洲综合色网站| 免费在线观看不卡| 国产精品一品视频| 一本色道久久综合亚洲91| 在线这里只有精品| 91精品福利在线一区二区三区 | 99免费精品在线| 欧美影片第一页| 日韩精品专区在线影院重磅| 精品日本一线二线三线不卡| 国产精品国产馆在线真实露脸 | 欧美一区二区三区小说| 国产亚洲人成网站| 亚洲精品亚洲人成人网在线播放| 午夜精品视频一区| 国产91精品一区二区麻豆网站| 99国产精品一区| 欧美一区二区免费视频| 日本一区二区免费在线观看视频 | 成人美女视频在线观看18| 在线国产亚洲欧美| 精品剧情v国产在线观看在线| 中文av字幕一区| 性做久久久久久久免费看| 成人一区在线观看| 51精品国自产在线| 国产精品人人做人人爽人人添| 亚洲成人黄色小说| 成人国产电影网| 日韩三级视频在线看| **网站欧美大片在线观看| 日韩福利视频导航| 99精品久久只有精品| 久久久久久久一区| 奇米一区二区三区| 在线日韩av片|