在theano中逻辑回归的负对数可能性是什么样的?

时间:2016-01-21 10:56:48

标签: python machine-learning theano logistic-regression deep-learning

我一直在阅读theano's logistic regression tutorial。我试图理解negative log likelihood是如何计算的。

function drawchart(){
  var yaxisdata = [yaxischartdata];
  var labeldata = [xaxischartdata];
  var Data1 = {
  labels : labeldata,
  datasets : [{
    fillColor             : "rgba(151,187,205,0.2)",
    strokeColor           : "rgba(151,187,205,1)",
    pointColor            : "rgba(151,187,205,1)",
    pointStrokeColor      : "#fff",
    pointHighlightFill    : "#fff",
    pointHighlightStroke  : "rgba(151,187,205,1)",
    data                  : yaxisdata
    }]
  };
  var ctx = $("#myChart").get(0).getContext("2d");
  var myLineChart = new Chart(ctx).Line(Data1);
};

在漂亮的打印打印y = ivector('y') W = dmatrix('W') b = dvector('b') input = dmatrix('inp') p_y_given_x = T.nnet.softmax(T.dot(input, W) + b) logs = T.log(self.p_y_given_x)[T.arange(y.shape[0]), y] 上,它返回了

theano.printing.pprint(logs)

有人能用一个小小的例子解释这个'AdvancedSubtensor(log(Softmax(x)), ARange(TensorConstant{0}, Constant{0}[Shape(y)], TensorConstant{1}), y)' 做了什么吗?

在此之后,他们计算了AdvanceSubtensor

任何帮助表示赞赏! :)

0 个答案:

没有答案