Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Machine Learning Functions [closed]

Is there functionality in Machine Learning (using Python) that I could use to feed it a group of inputs, tell it what the end product should be, then have the code figure out what function it should use in order to reach the end product?

Thanks.

like image 268
Bruno Avatar asked May 31 '17 17:05

Bruno


2 Answers

question is really vague one.

still as you mentioned machine learning TAG. i take it as machine learning problem. in this case there is no specific model or algorithm available to decide which algorithm/function best suits to your data !!.

it's hit & trial method to decide which model should be best for your data. so you are going to write a wrapper program which going to test your data with all possible model and based on their Accuracy Score your code will decide which model best suits. !!

like image 104
Achyuta nanda sahoo Avatar answered Oct 08 '22 02:10

Achyuta nanda sahoo


If your are new I would recommend you scikit learn and begin with a decision tree is the simplest of all but a good way to start because once you include scikit learn it's only one line to train you basic model:

so fisrt install scikit-learn and import it's called "sklearn" : from sklearn import tree

create it using :

#init
clf = tree.DecisionTreeClassifier()

Then train the model :

clf.fit(inputs,output)

and predict new/unknow values with :

clf.predict(value)

It will gives "fairly accurate" values for simple relation between inputs and outputs, but you can sometimes get better results by doing it yourself with handwritten code.

Otherwise you can use real machine learning concept with scikit learn or other like tensorflow, theano, and so on.. But you should try first what I said before because it's like an hello world programm in machine learning.

like image 3
Simon Houdayer Avatar answered Oct 08 '22 01:10

Simon Houdayer