当我尝试运行cts.train()
函数时,MarkLogic不断崩溃。
是我的代码还是其他什么?你能帮我弄清楚出了什么问题吗?
MarkLogic Server 8.0-6.4
var labels = []
var voi = cts.collectionQuery(["VehicleOfInterest"])
for(var v in voi)
labels.push({classes:{name:"car"}})
v = cts.search(voi)
var all = [].concat.apply([], [v.toArray()])
var classifier = cts.train( all, labels, {classifierType: "supports", kernel:"simple", epsilon: 0.01} );
示例节点
<?xml version="1.0" encoding="UTF-8"?>
<root>
<RECORD__>1</RECORD__>
<ENTRY_DATE>2/15/2017</ENTRY_DATE>
<EXPIRY_DATE>2/15/2019</EXPIRY_DATE>
<VEHICLE_MAKE>Toyota</VEHICLE_MAKE>
<VEHICLE_MODEL>Corolla</VEHICLE_MODEL>
<VEHICLE_YEAR>2013</VEHICLE_YEAR>
<REGISTRATION>A29302843</REGISTRATION>
<VIN>1234134</VIN>
<LOCATION>MN</LOCATION>
<CLAIM_NUMBER>12345678</CLAIM_NUMBER>
<BACKGROUND___COMMENT>This is a test 1.</BACKGROUND___COMMENT>
<ORIGINAL_SOURCE>INFORMANT</ORIGINAL_SOURCE>
<RISK_CATEGORY>A1</RISK_CATEGORY>
<LINKED_PHONE__>9382938402</LINKED_PHONE__>
</root>
/var/opt/MarkLogic/Logs/ErrorLog.txt
Segmentation fault in thread 0x00007f6739864700
Thread 56 (Thread 0x7f67ec83d700 (LWP 6369)):
#0 0x00007f67e895379b in do_futex_wait.constprop.1 () from /lib64/libpthread.so.0
#1 0x00007f67e895382f in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
#2 0x00007f67e89538cb in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
#3 0x0000000004322515 in svc::Semaphore::wait ()
#4 0x000000000433f151 in svc::StarterThread::run ()
#5 0x000000000434166e in svc::Thread::top ()
#6 0x00000000043428b9 in runThread ()
#7 0x00007f67e894ddc5 in start_thread () from /lib64/libpthread.so.0
#8 0x00007f67e7d3e6ed in clone () from /lib64/libc.so.6
Thread 55 (Thread 0x7f67ec79f700 (LWP 6377)):
#0 0x00007f67e7d3fb7f in accept4 () from /lib64/libc.so.6
#1 0x000000000433087a in svc::Socket::accept ()
#2 0x000000000402c8bf in xdmp::XDQPServerThread::run ()
#3 0x000000000434166e in svc::Thread::top ()
#4 0x00000000043428b9 in runThread ()
#5 0x00007f67e894ddc5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007f67e7d3e6ed in clone () from /lib64/libc.so.6
Thread 54 (Thread 0x7f67ec780700 (LWP 6378)):
#0 0x00007f67e8954bdd in nanosleep () from /lib64/libpthread.so.0
#1 0x000000000433ed12 in svc::Thread::sleep ()
#2 0x00000000024cffa2 in xdmp::ClusterManager::clusterThread ()
#3 0x000000000434166e in svc::Thread::top ()
#4 0x00000000043428b9 in runThread ()
#5 0x00007f67e894ddc5 in start_thread () from /lib64/libpthread.so.0
#6 0x00007f67e7d3e6ed in clone () from /lib64/libc.so.6
Thread 53 (Thread 0x7f673e7ff700 (LWP 6380)):
#0 0x00007f67e895379b in do_futex_wait.constprop.1 () from /lib64/libpthread.so.0
#1 0x00007f67e895382f in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
#2 0x00007f67e89538cb in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
#3 0x0000000004322515 in svc::Semaphore::wait ()
#4 0x00000000043445a6 in svc::PooledThread::run ()
#5 0x000000000434166e in svc::Thread::top ()
#6 0x00000000043428b9 in runThread ()
#7 0x00007f67e894ddc5 in start_thread () from /lib64/libpthread.so.0
#8 0x00007f67e7d3e6ed in clone () from /lib64/libc.so.6
...
答案 0 :(得分:0)
标签中的对象格式错误, 我把它改成了这样的东西,现在工作正常
labels.push({ "name": "voi doc",
"classes": [
{
"name": 'car',
"val": 1
}
]
})