Spark机器学习中的自定义评分功能

时间:2017-10-06 13:52:18

标签: apache-spark machine-learning pyspark grid-search

在sklearn中有make_scorer函数,它允许您定义要插入GridsearchCV的自定义评分函数。我怎么能在Spark ML中做同样的事情呢?例如,在spark中的MultiClassClassificationEvaluator中,没有提供传递自定义评分函数的规定。

https://spark.apache.org/docs/1.6.2/api/java/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluator.html

理想情况下,我想要以下界面。有人曾经这样做过吗?

<% if current_user.id != @user.id %>
    <% if !current_user.following?(@user) %>
        <%= form_for(current_user.active_relationships.build) do |f| %>
            <div><%= hidden_field_tag :followed_id, @user.id %></div>
            <%= f.submit "Connect", class: "btn btn-dark" %>
        <% end %>
    <% else %>
        <%= form_for(current_user.active_relationships.find_by(followed_id: @user.id), html: { method: :delete}) do |f| %>
            <%= f.submit "Disconnect", class: "btn btn-light" %>
        <% end %>
    <% end %>
<% end %>

0 个答案:

没有答案