Skip to content
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

remove plot_learning curve add plot_tsne #436

Merged
merged 1 commit into from
Dec 5, 2022
Merged
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
16 changes: 8 additions & 8 deletions machine/learn/skl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def generate_results(model, input_data,
model = clf.best_estimator_
else:
print("param_grid else")
plot_learning_curve(tmpdir,_id, model,features,target,cv,return_times=True)
# plot_learning_curve(tmpdir,_id, model,features,target,cv,return_times=True)
model.fit(features, target)


Expand Down Expand Up @@ -514,7 +514,7 @@ def generate_results(model, input_data,
# plot_pca_3d_iris(tmpdir,_id,features,target)

# this
# plot_tsne(tmpdir,_id,features,target)
plot_tsne(tmpdir,_id,features,target)

if type(model).__name__ == 'Pipeline':
step_names = [step[0] for step in model.steps]
Expand Down Expand Up @@ -1232,13 +1232,13 @@ def plot_pca_2d(tmpdir,_id,features,target):
# ax.w_zaxis.set_ticklabels([])

# plt.show()
plt.savefig(tmpdir + _id + '/pca_' + _id + '.png')
plt.close()
# plt.savefig(tmpdir + _id + '/pca_' + _id + '.png')
# plt.close()



path = tmpdir + _id + '/pcaJson_' + _id + '.json'
import json
# import json



Expand Down Expand Up @@ -1492,15 +1492,15 @@ def plot_tsne(tmpdir,_id,features,target):


# plt.show()
plt.savefig(tmpdir + _id + '/tsne_' + _id + '.png')
plt.close()
# plt.savefig(tmpdir + _id + '/tsne_' + _id + '.png')
# plt.close()





# path = tmpdir + _id + '/tsneJson_' + _id + '.json'
import json
# import json



Expand Down