icon.present? %>
    <div class='control-group'>
      <div class="controls">
        <%= label_tag'restore_favicon' do %>
          <%= check_box_tag'restore_favicon', nil, false %>
          <%= 'Restore default favicon?' %>
        <% end %>
      </div>
    </div>
  <% end %>
</fieldset>
<fieldset>
  <legend>Emails</legend><br />
  <p>
    Configure notifications that will be sent to users.
  </p>
  <p>
    Emails make use of variables; variables are placeholders that are automatically replaced with user- and reservation- specific information.<br />
    You can use the following variables in each email:
  </p>
  <dl>
    <dt>@user@</dt><dd>The full name of the particular user.</dd>
    <dt>@equipment_list@</dt><dd>The list of equipment that user either has reserved, missed, overdue, or checked out.</dd>
    <dt>@department_name@</dt><dd>The department name set above.</dd>
    <dt>@return_date@</dt><dd>The due date for the particular reservation.</dd>
    <dt>@late_fee@</dt><dd>The daily late fee for the equipment models in the particular reservation.</dd>
  </dl>
  <hr />
  <%= f.input :upcoming_checkin_email_active, label: 'Enable upcoming check-in notification?', 
              hint: 'When enabled, users will get an email reminding them of their upcoming reservation(s).' %>
  <%= f.input :upcoming_checkin_email_body, input_html: { class:'span6' } %>
  <hr />
  <%= f.input :overdue_checkout_email_active, label: 'Enable overdue checkout notification?', 
              hint: 'When enabled, users who have missed their reservation checkout date will get an email, typically informing them that their reserved equipment may be available to other users.' %>
  <%= f.input :overdue_checkout_email_body, input_html: { class:'span6' } %>
  <hr />
  <%= f.input :overdue_checkin_email_active, label: 'Enable overdue equipment notification?', 
              hint: 'When enabled, users who have overdue equipment will get an email, informing them about late fees and other consequences.' %>
  <%= f.input :overdue_checkin_email_body, input_html: { class:'span6' } %>
  <hr />
  <%= f.input :reservation_confirmation_email_active, label: 'Enable reservation confirmation?', 
              hint: 'When enabled, users will get an email confirmation containing the details of their reservation.' %>
</fieldset>
<fieldset>
  <legend>Terms of Service</legend>
  <%= f.input :terms_of_service, input_html: { class:'span6' } %>
  <% unless params[:controller] == "application_setup" %>
    <%= f.input :reset_tos_for_users, input_html: {type: "checkbox", value: '1'}, label: "Force all users to accept TOS again?", :hint => "i.e., if patrons need to be aware that the terms of service have changed." %>
  <% end %>
</fieldset>
<div class="form-actions">
  <%= f.button :submit, 'Update Settings' %>
</div>
Q: Hmmlearn classification usage I'm trying to learn a model with hmmlearn in order to make a classification on my dataset.
The dataset have a list of sequences having different length. Each sequence consists of event emission. For example:
ID1: ['1', '10', '8', '15']
ID2: ['1', '10', '8', '15', '156', '459', '256']

This is the code I'm using. I found a similar example here.
    sequence_map = __load_df(file)

    x = []
    lengths = []

    for values in sequence_map.values():
        x.append(values)
        lengths.append(len(values))

    x = np.concatenate(x)

    model = hmm.GaussianHMM(n_components=2, algorithm='map', n_iter=1000, covariance_type="full").fit(x, lengths=lengths)
    predictions = model.predict(x, lengths)

I'm interested in classifying the event in two categories, so I choose n_components=2. 
How I could now retrieve the class for each sequence in my dataset?

A: The function predict predicts the most likely sequence of states given the input. This is not what you want with respect to your problem that is about classifying among two classes.
What you need might be the method predict_proba (see the documentation here) which will give you a probability by state.
However, keep in mind that you cannot know for sure how the HMM learned to distinguish between the two classes. Which means that, except if you somewhat estimated/initialized the first Gaussian parameters from the training samples belonging to class 1 and the other Gaussian from the samples belonging to class 2, you cannot know whether the HMM has associated each one of its states to a class. The two classes could also have been learned in the way that it is the sequence used between the states that makes them different. Like, class 1 gives a state pattern of S1-S2-S1-S2-S1-S2... and class 2 gives a pattern of S1-S1-S2-S2-S1-S1-... Let's remember that HMMs are good for time series. Ask yourself: if a single Gaussian distribution could fully represent one class, then why using hidden Markov models?
For (binary) classification, a more reliable approach is to train two HMMs, one from samples of the first class, and the other from the samples of the second class. Once trained, each test sequence is scored with respect to both models with the method score (see the documentation here). This will return the log-likelihood of the sequence you pass as an input with respect to the model you call it on. The test sample is then classified in the class of the model returning the highest likelihood result.
What is interesting with such approach is that in the case both models give a low likelihood result, you can also tag a test sequence as being part of neither of the two classes of interest. This also generalizes well up to a few dozen classes.
<reponame>reetamb/The-Undergarden
package quek.undergarden.block;

import net.minecraft.block.BlockState;
import net.minecraft.block.WallSignBlock;
import net.minecraft.block.WoodType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import quek.undergarden.block.tileentity.UndergardenSignTE;

public class UndergardenWallSignBlock extends WallSignBlock {

    public UndergardenWallSignBlock(Properties properties, WoodType woodType) {
        super(properties, woodType);
    }

    @Override
    public TileEntity newBlockEntity(IBlockReader world) {
        return new UndergardenSignTE();
    }

    @Override
    public boolean hasTileEntity(BlockState state) {
        return true;
    }
}
< Where There’s Smoke There’s Ceasefire
Transcript
Friday, November 08, 2013
BROOKE GLADSTONE: Speaking of checkbook journalism, let’s turn back to May, when Gawker Media launched their subtly named “Crackstarter” project. Through Crackstarter, Gawker was trying to raise $200,000 to purchase, from the drug dealers who taped it, a video of Toronto Mayor Rob Ford smoking crack cocaine. A second tape, of Ford ranting, emerged this week, but that's another story.
Anyway, the deal to buy it fell through, but a Gawker editor viewed and posted about it and, in so doing, gave an opening to the Toronto Star. Having reported on Ford’s antics for the past decade, the Star had suffered legal blowback, so even though Star staffers had seen the same video as Gawker, lacking the physical evidence, it was reluctant to run with the story. Gawker’s Crackstarter stunt and post impelled the Star to go to print. Here’s Ford last May, when news of the video, but no image of the video itself, was published.
[CLIP]
MAYOR ROB FORD: …that I have been judged by the media without any evidence.
[END CLIP]
BROOKE GLADSTONE: Last week, Toronto police confirmed it had the video. And so, here’s Ford on Tuesday.
[CLIP