-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can u add an example where we can use the data in numpy for the generated "tpot_mnist_pipeline.py" #114
Comments
Do you mean this example? Here's an example of that code transforming the data from import numpy as np
import pandas as pd
from sklearn.cross_validation import StratifiedShuffleSplit
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import load_digits
digits = load_digits()
tpot_data = pd.DataFrame(digits.data)
tpot_data['class'] = digits.target
training_indeces, testing_indeces = next(iter(StratifiedShuffleSplit(tpot_data['class'].values, n_iter=1, train_size=0.75, test_size=0.25)))
result1 = tpot_data.copy()
# Perform classification with a logistic regression classifier
lrc1 = LogisticRegression(C=2.8214285714285716)
lrc1.fit(result1.loc[training_indeces].drop('class', axis=1).values, result1.loc[training_indeces, 'class'].values)
result1['lrc1-classification'] = lrc1.predict(result1.drop('class', axis=1).values) |
Hey @rhiever , we need to change the |
Sure, submit the PR? :-) On Thursday, March 17, 2016, PRONOjit Saha notifications@github.com wrote:
Randal S. Olson, Ph.D. E-mail: rso@randalolson.com | Twitter: @randal_olson |
OK...will look into it and send across the PR. |
In the example MNIST, the generated python code is not directly usable for evaluation with the original
data.
Can you post an example were I can directly use the scikit type , or simply numpy arrays for data and labels.
The text was updated successfully, but these errors were encountered: