Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am studying machine learning course online and I am curious what I am going to do with the machine learning I made next. How can I save the test and predicted table and how can I use the trained machine learning model to my newest data? I'm using python.
Saving ml model using Pickle
# save the model to disk
filename = 'model.sav'
pickle.dump(model, open(filename, 'wb'))
# load the model from disk
loaded_model = pickle.load(open(filename, 'rb'))
result = loaded_model.predict(new_point)
Here new_point is 2D numpy array [[]] example 2 points with 3 features
[[x11,x12,x13],
[x21,x22,x23]]
For more information visit https://machinelearningmastery.com/save-load-machine-learning-models-python-scikit-learn/
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
Improve this question
I am facing accuracy issue with my code. I have used CNN as model and LDA for feature reduction with NSL-KDD dataset for my MPhil research but accuracy is 94% I don't know what's the matter, I want to achieve 98%.
These are the layers I have used
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I created image data set including 62992 images with 128x128px resolution that contains characters, numbers and symbols with four kinds of font styles. how do I train this dataset and create pre-trained model for my OCR, can you please help me?
If you want to train a custom OCR, I would advise studying the Tensorflow Attention OCR implementation which can be found here.
I've used this implementation in various projects and it gave satisfactory results in converting image to text.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
If i have a dataset consisting by a list of images each associated with a series of features; there is a model that, once trained, generates new images upon entering a new list of features?
I think you are looking for GAN(Generative Adversarial Networks) which is proposed in this paper.
GAN are the type of algorithm which contains two different model so that one model named Discriminator tries to learn to determine if it's input data comes from the data set or not and the other one named Generator tries to learn how to generate data so that the Discriminator wrongly recognize that it comes from the data set.
You can find more details from the following links:
generative adversarial network (GAN)
Generative Adversarial Networks (GANs): Engine and Applications
GAN by Example using Keras on Tensorflow Backend
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a python Machine Learning script which learns from Firewall log data. I am using Random Forest Classifier in it. If I run it as a service is it possible to train the model, again and again, each day whenever last day's Firewall logs are received.
These are the estimators in sklearn that support what you want to do and unfortunately for you Random Forest isn't one of them, so you will have to refit every time you add data.
If you insist on sticking with Random Forest, one option would be to reduce the number of features (based on the classifier you currently have) to increase the speed of refitting your classifier.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How do I apply scikit-learn to a numpy array with 4 columns each representing a different attribute?
Basically, I'm wanting to teach it how to recognize a healthy patient from these 4 characteristics and then see if it can identify an abnormal one.
Thanks in advance!
A pipeline usually has the following steps:
Define a classifier/ regressor
from sklearn import svm
clf = svm.SVC(gamma=0.001, C=100.)
Fit the data
clf.fit(X_train,y_train)
Here X_train will your four column features and y_train will be the labels whether the patient is healthy.
Predict on new data
y_pred = clf.prdict(X_test)
This tutorial is great starting point for you to get some basic idea about the pipeline.
Look into the pandas package which allows you to import CSV files into a dataframe. pandas is supported by scikit-learn.