Q:

Improving Accuracy for a Binary Classification Model

So, I am working on a basic machine learning algorithm as part of a larger project. For this sections, I'm trying to teach the machine to use two sets of data, one smaller set with only one feature, and a larger set using six features. Both of these can be seen below.

The 'flags' are what I'm trying to predict. A flag of 0 refers to real/normal data, whereas a flag of one refers to 'abnormal' data. My goal, then, is to allow is to predict 'abnormal' data inputs. As seen by the photos, 'abnormal' data for these purposes is something that is a substantial change from the previous data point. The issues are one, that the computer is only predicting about 80 of the 450 or so "fake" data that I've inserted into the data. The second issue is that the computer is mis-classifying some data, calling some of the true data fake instead. 
I've been doing most of my testing on the small dataset right now just to get everything working. I'm using an XGBoost algorithm, with n_estimators equal to 1000 and a learning rate of 0.05. The code is pretty simple. 
data = pd.read_csv('final_angles.csv')
data.dropna(axis=0, subset=['steering_angle'], inplace=True)
y = data.flag
X = data.drop(['flag', 'frame_id'], axis=1)
train_X, test_X, train_y, test_y = train_test_split(X.as_matrix(), y.as_matrix(), test_size=0.25, shuffle=False)

my_model = XGBRegressor(n_estimators=1000, learning_rate=0.05) 
my_model.fit(train_X, train_y, early_stopping_rounds=5, 
             eval_set=[(test_X, test_y)], verbose=False)

predictions = my_model.predict(test_X)

Anything is considered 'fake' or 'abnormal' if the prediction value is over 0.5. 
For example, this is what I produce: 
There were 457 sections of 'fake' data in the file. We guessed on that 108 data points were fake. Only 69 of these were actually fake. We got 69 right out of 457(0.15098468271334792).
Is there anything I can do to improve the results? I've thought about changing algorithms maybe, although I don't know how much it would help. Would it help to use a Random Forest or something else, or maybe tune the parameters some more? I'm open to any ideas.

A:

I wouldn't say changing algorithm / searching hyperparams would significantly improve classification performance.
In my opinion, you should work on your data.
In your data, what machine sees is a row-data, but you said what decides the value of flag is a substantial change from the previous data point. 
So you should consider to:

Try using algorithms adapted to timeseries data
Or try doing some feature engineering so that at each row/line the machine is capable to see if the change is substantial or not compared to previous row/line

Here are some useful links where to start from:
How to classify movement data (time series) in real time
Using time series data from a sensor for ML
How to train model to predict events 30 minutes prior, from multi-dimensionnal timeseries

