Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs_sources/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ tpot.export('tpot_boston_pipeline.py')

<table width="100%">
<tr>
<td width="25%"><a href="#tpotregressor-fit">fit</a>(features, classes[, sample_weight, groups])</td>
<td width="25%"><a href="#tpotregressor-fit">fit</a>(features, target[, sample_weight, groups])</td>
<td>Run the TPOT optimization process on the given training data.</td>
</tr>

Expand All @@ -657,7 +657,7 @@ tpot.export('tpot_boston_pipeline.py')
</tr>

<tr>
<td><a href="#tpotregressor-score">score</a>(testing_features, testing_classes)</td>
<td><a href="#tpotregressor-score">score</a>(testing_features, testing_target)</td>
<td>Returns the optimized pipeline's score on the given testing data using the user-specified scoring function.</td>
</tr>

Expand All @@ -670,13 +670,13 @@ tpot.export('tpot_boston_pipeline.py')

<a name="tpotregressor-fit"></a>
```Python
fit(features, classes, sample_weight=None, groups=None)
fit(features, target, sample_weight=None, groups=None)
```

<div style="padding-left:5%" width="100%">
Run the TPOT optimization process on the given training data.
<br /><br />
Uses genetic programming to optimize a machine learning pipeline that maximizes the score on the provided features and classes. Performs internal k-fold cross-validaton to avoid overfitting on the provided data.
Uses genetic programming to optimize a machine learning pipeline that maximizes the score on the provided features and target. Performs internal k-fold cross-validaton to avoid overfitting on the provided data.
<br /><br />
<table width="100%">
<tr>
Expand All @@ -693,7 +693,7 @@ using <a href="http://scikit-learn.org/stable/modules/generated/sklearn.preproce
If you wish to use a different imputation strategy than median imputation, please make sure to apply imputation to your feature set prior to passing it to TPOT.
</blockquote>

<strong>classes</strong>: array-like {n_samples}
<strong>target</strong>: array-like {n_samples}
<blockquote>
List of target labels for prediction
</blockquote>
Expand Down Expand Up @@ -757,7 +757,7 @@ Predicted target values for the samples in the feature matrix

<a name="tpotregressor-score"></a>
```Python
score(testing_features, testing_classes)
score(testing_features, testing_target)
```

<div style="padding-left:5%" width="100%">
Expand All @@ -774,7 +774,7 @@ The default scoring function for TPOTClassifier is 'mean_squared_error'.
Feature matrix of the testing set
</blockquote>

<strong>testing_classes</strong>: array-like {n_samples}
<strong>testing_target</strong>: array-like {n_samples}
<blockquote>
List of target labels for prediction in the testing set
</blockquote>
Expand Down
12 changes: 6 additions & 6 deletions docs_sources/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ from sklearn.preprocessing import Normalizer
tpot_data = np.recfromcsv('PATH/TO/DATA/FILE', delimiter='COLUMN_SEPARATOR', dtype=np.float64)
features = np.delete(tpot_data.view(np.float64).reshape(tpot_data.size, -1),
tpot_data.dtype.names.index('class'), axis=1)
training_features, testing_features, training_classes, testing_classes = \
training_features, testing_features, training_target, testing_target = \
train_test_split(features, tpot_data['class'], random_state=42)

exported_pipeline = make_pipeline(
Normalizer(),
GaussianNB()
)

exported_pipeline.fit(training_features, training_classes)
exported_pipeline.fit(training_features, training_target)
results = exported_pipeline.predict(testing_features)
```

Expand Down Expand Up @@ -81,12 +81,12 @@ from sklearn.neighbors import KNeighborsClassifier
tpot_data = np.recfromcsv('PATH/TO/DATA/FILE', delimiter='COLUMN_SEPARATOR', dtype=np.float64)
features = np.delete(tpot_data.view(np.float64).reshape(tpot_data.size, -1),
tpot_data.dtype.names.index('class'), axis=1)
training_features, testing_features, training_classes, testing_classes = \
training_features, testing_features, training_target, testing_target = \
train_test_split(features, tpot_data['class'], random_state=42)

exported_pipeline = KNeighborsClassifier(n_neighbors=6, weights="distance")

exported_pipeline.fit(training_features, training_classes)
exported_pipeline.fit(training_features, training_target)
results = exported_pipeline.predict(testing_features)
```

Expand Down Expand Up @@ -125,14 +125,14 @@ from sklearn.model_selection import train_test_split
tpot_data = np.recfromcsv('PATH/TO/DATA/FILE', delimiter='COLUMN_SEPARATOR', dtype=np.float64)
features = np.delete(tpot_data.view(np.float64).reshape(tpot_data.size, -1),
tpot_data.dtype.names.index('class'), axis=1)
training_features, testing_features, training_classes, testing_classes = \
training_features, testing_features, training_target, testing_target = \
train_test_split(features, tpot_data['class'], random_state=42)

exported_pipeline = GradientBoostingRegressor(alpha=0.85, learning_rate=0.1, loss="ls",
max_features=0.9, min_samples_leaf=5,
min_samples_split=6)

exported_pipeline.fit(training_features, training_classes)
exported_pipeline.fit(training_features, training_target)
results = exported_pipeline.predict(testing_features)
```

Expand Down
Loading