multiclass classification with double values and scikit
<p>I would like to train a programm to give dicts various tags depending on the numeric values they contain - with scikit.
My problem is, that I only seem to understand how to classify text (sentences) or just number variables (and not variables that contain mulitple numbers).</p>

<p>Here is what I am trying to do:</p>

<pre><code># available classes:
# hot, cold, wet, sticky

first_sample = {}
first_sample["temp"] = 30
first_sample["airpressure"] = 104
first_sample["airmoisture"] = 70

second_sample = {}
second_sample["temp"] = 2
second_sample["airpressure"] = 100
second_sample["airmoisture"] = 40

# do this manually X times
train(first_sample, ['sticky', 'hot'])
train(second_sample, ['wet', 'cold'])
train(...)

# then do it on a bunch of data by programme
classify(bunch_of_data)
</code></pre>

<p>You need to train two classifiers and fit them to your data twice. Suppose your data is (you can convert your dicts to a dataframe using <code>Pandas</code>):</p>

<pre><code>| "temp" | "airpressure" | "airmoisture"| "target1" | "target2" | 
|:------:|:-------------:|:------------:|:---------:|:---------:|
|   30   |      104      |      70      |  'sticky' |   'hot'   |
|   2    |      100      |      40      |    'wet'  |   'cold'  |
|   .    |       .       |       .      |      .    |     .     |
|   .    |       .       |       .      |      .    |     .     |
|   .    |       .       |       .      |      .    |     .     |
</code></pre>

<p>First, you fit the first classifier (clf1) to all your samples (lets call them X) and first column of your targets <code>target1</code> (lets call it y1)</p>

<pre><code>clf1.fit(X,y1)
</code></pre>

<p>and then the second classifier (clf2) on X and second column of your target <code>target2</code> (or y2).</p>

<pre><code>clf2.fit(X,y2)
</code></pre>

python scikit-learn classification