在sklearn中有make_scorer函数,它允许您定义要插入GridsearchCV的自定义评分函数。我怎么能在Spark ML中做同样的事情呢?例如,在spark中的MultiClassClassificationEvaluator中,没有提供传递自定义评分函数的规定。
理想情况下,我想要以下界面。有人曾经这样做过吗?
<% 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 %>