<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <h1>SKLearn predictor - Regressor</h1>
<hr style="border
Step1:  <span>
Build a processor.
</span>
<br>
<span>
This is required by the regressor in order to parse the input raw data.<br>
A ATTPlainHitProcessor is needed here.
</span>
Step2:  <span>
We build the regressor now, injecting the processor
</span>
Step3:  <span>
We define the training data source file
</span>
Step4:  <span>
And load the dataset
</span>
Step5:  <span>
Now, train
</span>
Step6:  <span>
And finally test
</span>
<ASSISTANT_TASK:>
Python Code:
import sys
#sys.path.insert(0, 'I:/git/att/src/python/')
sys.path.insert(0, 'i:/dev/workspaces/python/att-workspace/att/src/python/')
Explanation: <h1>SKLearn predictor - Regressor</h1>
<hr style="border: 1px solid #000;">
<span>
<h2>ATT hit predictor.</h2>
</span>
<br>
<span>
This notebook shows how the hit predictor works.<br>
The Hit predictor aim is to guess (x,y) coords from serial port readings.
There are two steps: Train and Predict.
</span>
<span>
Set modules path first:
</span>
End of explanation
from hit.process.processor import ATTPlainHitProcessor
plainProcessor = ATTPlainHitProcessor()
Explanation: <span>
Build a processor.
</span>
<br>
<span>
This is required by the regressor in order to parse the input raw data.<br>
A ATTPlainHitProcessor is needed here.
</span>
End of explanation
from hit.train.regressor import ATTSkLearnHitRegressor
regressor = ATTSkLearnHitRegressor(plainProcessor)
Explanation: <span>
We build the regressor now, injecting the processor
</span>
End of explanation
TRAIN_VALUES_FILE_LEFT = "train_data/train_points_20160129_left.txt"
Explanation: <span>
We define the training data source file
</span>
End of explanation
import numpy as np
(training_values, Y) = regressor.collect_train_hits_from_file(TRAIN_VALUES_FILE_LEFT)
print "Train Values: ", np.shape(training_values), np.shape(Y)
Explanation: <span>
And load the dataset
</span>
End of explanation
regressor.train(training_values, Y)
Explanation: <span>
Now, train
</span>
End of explanation
hit = "hit: {1568:6 1416:5 3230:6 787:8 2757:4 0:13 980:4 3116:4 l}"
print '(6,30)'
print regressor.predict(hit)
Explanation: <span>
And finally test
</span>
End of explanation
<END_TASK>