标签: classification

潜在语义索引(LSI)是统计分类算法吗?

潜在语义索引(LSI)是统计分类算法吗?为什么或者为什么不?

基本上,我试图弄清楚为什么统计分类的维基百科页面没有提到LSI.我刚刚开始研究这些东西,我试图看看所有不同的分类方法是如何相互关联的.

algorithm information-retrieval semantic-web classification

2
推荐指数
1
解决办法
1003
查看次数

artifactory分类器元数据快照maven 3.0

我的问题很"简单"但直到现在我才找到解决方案:

我有2个项目.

  • 项目A 一个分类(被称为开发或专业版)使用特定配置文件的帮助
  • 项目B 依赖于A(使用classifier dev或pro)

  • 用A分类器(dev)在A上执行安装目标

  • 我用另一个分类器(专业版)重新执行安装目标

然后我编译B项目(我把依赖项放到A,用分类器DEV)

它运作良好.


但是当我对artifactory(目标部署)做同样的事情时,它不起作用 (并且存储库配置为"唯一")

它不起作用,因为神器?maven依赖?正试图下载A与分类器dev 最新时间戳,buildnumber of whatever.

但是这个"逻辑"是错误的,因为最新的时间戳对A分类器pro有效!

我读了本地存储库和artifactory存储库之间的metadata.xml.有类似的(但不完全相同)

我错了什么?多谢你们!

  • Maven版本:3.03
  • Artifactory版本:2.3.4.1

classification artifactory maven maven-metadata

2
推荐指数
1
解决办法
1752
查看次数

Perl中的$ dummy和non-parameter split意味着什么?

我需要一些帮助解码这个perl脚本.$ dummy没有在脚本中的任何其他位置初始化.以下行在脚本中的含义是什么?为什么分裂函数没有任何参数时呢?

($dummy, $class) = split;
Run Code Online (Sandbox Code Playgroud)

该程序试图使用某种统计分类方法检查陈述是真实还是谎言.因此,让我们说它计算并给出"真实性"和"虚假性"的下列数字,然后它检查测谎仪是否正确.

# some code, some code...
$_ = "truth"
# more some code, some code ...

$Truthsity = 9999
$Falsity = 2134123

if ($Truthsity > $Falsity) {   
    $newClass = "truth";      
} else {
    $newClass = "lie";     
}

($dummy, $class) = split;

if ($class eq $newClass) {
    print "correct";
} elsif ($class eq "true") {
    print "false neg";
} else {
    print "false pos"
}
Run Code Online (Sandbox Code Playgroud)

perl split classification dummy-data

2
推荐指数
1
解决办法
701
查看次数

短文本分类

我即将开始一个项目,我的最终目标是将短文分类为类:"可能对访问地点X感兴趣":"不感兴趣或中立".地方由一组关键字描述(例如,膳食或里程类型,如"中国食物").理想情况下,我需要一些基于短文本分析来模拟用户愿望的方法 - 然后根据欲望分数或欲望概率进行分类 - 这个领域是否有任何最先进的技术?谢谢

nlp classification messages

2
推荐指数
1
解决办法
1779
查看次数

PyBrain - 如何根据测试数据验证我训练有素的网络?

所以我在PyBrain中有一个ClassificationDataSet,我已经用适当的数据进行了训练.即,输入如下:

trainSet.addSample([0,0,0,0],[1])
trainSet.addSample([0,0,0,1],[0])
trainSet.addSample([0,0,1,0],[0])
trainSet.addSample([0,0,1,1],[1])
trainSet.addSample([0,1,0,0],[0])
trainSet.addSample([0,1,0,1],[1])
trainSet.addSample([0,1,1,0],[1])
trainSet.addSample([0,1,1,1],[0])
trainSet.addSample([1,0,0,0],[0])
trainSet.addSample([1,0,0,1],[1])
Run Code Online (Sandbox Code Playgroud)

模式很简单.如果偶数为1,则输出应为1,否则为0.我想运行以下输入:

[1,0,0,1],[1]
[1,1,0,1],[0]
[1,0,1,1],[0]
[1,0,1,0],[1]
Run Code Online (Sandbox Code Playgroud)

并查看神经网络是否会识别该模式.如前所述,我已经训练过网络.如何根据上述输入验证它?

谢谢你的时间!

python artificial-intelligence classification machine-learning pybrain

2
推荐指数
1
解决办法
3191
查看次数

R tuneRF不稳定,如何优化?

短小

我试图用它tuneRF来寻找函数的最佳mtry值,randomForest但是我发现答案是非常不稳定的,并且会随着运行/运行种子的不同而变化。我将运行一个循环,以查看它如何在大量运行中发生变化,但是无法提取出mtry具有最低OOB错误的错误。

长龙

我有一个data.frame具有八个功能的功能,但是其中两个功能是包含性的,这意味着一个功能中的所有信息都是另一个功能的子集。例如,一个特征可能是因子A〜,c("animal', "fish")而另一个特征可能是因子B〜c("dog", "cat", "salmon", "trout")。因此,所有的猫狗都是动物,所有的鲑鱼和鳟鱼都是鱼。这两个变量远比其他六个变量重要。因此,如果我运行3个林,一个使用A,一个使用B,另一个使用A和B,则最后一个似乎表现最好。我怀疑这是因为A和/或B如此重要,以至于通过将两者同时包含在内,我有两倍的机会随机选择它们作为初始特征。我进一步怀疑我不应该允许这种情况发生,我应该将A排除在外,但是我找不到任何实际的说法。

无论如何回到正轨。我有两个数据集tRFxtRFx2第一个包含7个特征,包括B但不包含A;第二个包含8个特征,同时包含A和B。我试图查看mtry这两个单独模型的最佳值彼此相对执行。tuneRF至少在这种情况下,问题似乎非常不稳定。

对于第一个数据集,(包括特征B但不包括特征A)

> set.seed(1)
> tuneRF(x = tRFx, y = tRFy, nTreeTry = 250, stepFactor = 1.5, improve = 0.01)  
mtry = 2  OOB error = 17.73% 
Searching left ...
Searching right ...
mtry = 3    OOB error = 17.28% 
0.02531646 0.01 
mtry = 4    OOB error = 18.41% 
-0.06493506 …
Run Code Online (Sandbox Code Playgroud)

r classification machine-learning random-forest

2
推荐指数
1
解决办法
3009
查看次数

在MATLAB中使用神经网络分类进行10次交叉验证的示例

我正在寻找一个在神经网络中应用10倍交叉验证的例子.我需要这个问题的链接答案:MATLAB中10倍SVM分类的例子

我想对所有3个类进行分类,而在示例中只考虑了两个类.

编辑:这是我为iris示例编写的代码

load fisheriris                              %# load iris dataset

k=10;
cvFolds = crossvalind('Kfold', species, k);   %# get indices of 10-fold CV
net = feedforwardnet(10);


for i = 1:k                                  %# for each fold
    testIdx = (cvFolds == i);                %# get indices of test instances
    trainIdx = ~testIdx;                     %# get indices training instances

    %# train 

    net = train(net,meas(trainIdx,:)',species(trainIdx)');
    %# test 
    outputs = net(meas(trainIdx,:)');
    errors = gsubtract(species(trainIdx)',outputs);
    performance = perform(net,species(trainIdx)',outputs)
    figure, plotconfusion(species(trainIdx)',outputs)
end
Run Code Online (Sandbox Code Playgroud)

matlab给出的错误:

Error using nntraining.setup>setupPerWorker (line 62)
Targets T{1,1} is …
Run Code Online (Sandbox Code Playgroud)

matlab classification machine-learning neural-network cross-validation

2
推荐指数
1
解决办法
5215
查看次数

Tensorflow Label_Image用于PNG,GIF等

我在玩Tensorflow进行图像分类。我用image_retraining / retrain.py重新训练与新的类别以来库并用它来使用label_image.py图片来自分类https://github.com/llSourcell/tensorflow_image_classifier/blob/master/src/label_image.py如下:

import tensorflow as tf
import sys

# change this as you see fit
image_path = sys.argv[1]

# Read in the image_data
image_data = tf.gfile.FastGFile(image_path, 'rb').read()

# Loads label file, strips off carriage return
label_lines = [line.rstrip() for line
    in tf.gfile.GFile("/root/tf_files/output_labels.txt")]

# Unpersists graph from file
with tf.gfile.FastGFile("/root/tf_files/output_graph.pb", 'rb') as f:
    graph_def = tf.GraphDef()
    graph_def.ParseFromString(f.read())
    _ = tf.import_graph_def(graph_def, name='')

with tf.Session() as sess:
# Feed the image_data as input to the graph and get first prediction …
Run Code Online (Sandbox Code Playgroud)

python jpeg classification image-processing tensorflow

2
推荐指数
1
解决办法
3638
查看次数

获取Keras预测函数的类标签的顺序

我在SO中有与此问题相同的问题。但是,当我尝试使用probas_to_classes()实用程序功能时,**它在当前代码中已经丢失:

"""Numpy-related utilities."""
from __future__ import absolute_import

import numpy as np


def to_categorical(y, num_classes=None):
    """Converts a class vector (integers) to binary class matrix.

    E.g. for use with categorical_crossentropy.

    # Arguments
        y: class vector to be converted into a matrix
            (integers from 0 to num_classes).
        num_classes: total number of classes.

    # Returns
        A binary matrix representation of the input.
    """
    y = np.array(y, dtype='int').ravel()
    if not num_classes:
        num_classes = np.max(y) + 1
    n = y.shape[0]
    categorical = …
Run Code Online (Sandbox Code Playgroud)

python classification deep-learning keras

2
推荐指数
1
解决办法
9732
查看次数

我的CNN分类器对随机图像给出了错误的预测

我使用3个数据类别(身份证,护照,账单)训练了CNN分类器(使用tensorflow)。
当我用属于3类之一的图像进行测试时,它给出了正确的预测。但是,当我用错误的图像(例如汽车图像)对其进行测试时,它会一直给我预测(即,它预测该汽车属于ID卡类别)。

有没有办法使它显示错误消息而不是给出错误的预测?

classification conv-neural-network tensorflow

2
推荐指数
1
解决办法
622
查看次数