{ "info": { "author": "Tobias Domhan", "author_email": "tdomhan@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "pyautoweka\n==========\n\nDescription\n-----------\n\npyautoweka is a python wrapper for [Auto-WEKA](http://www.cs.ubc.ca/labs/beta/Projects/autoweka/), a Java application for algorithm selection and hyperparameter optimizations, that is build on [WEKA](http://www.cs.waikato.ac.nz/ml/weka/). \n\n\nInstallation\n------------\n\nDownload, go to the project sources and install:\n```\ngit clone git@github.com:tdomhan/pyautoweka.git\ncd pyautoweka\npython setup.py install\n```\n\nRunning an experiment\n--------------------\n\nAutoWeka for python.\n\n```python\nimport pyautoweka\n\n#Create an experiment\nexperiment = pyautoweka.Experiment(tuner_timeout=9000)\n```\n`tuner_timeout` is the time the optimization will run in seconds. So e.g. 9000 seconds = 2.5 hours. The longer you run the optimization, the better of course. (Note that the `experiment` object has an interface similar to sklearn classifiers.) \n\nFirst we need to load some data. Let's for example the the famous [Iris dataset](http://archive.ics.uci.edu/ml/datasets/Iris). Download it using [this link](http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data).\n\nLet's load it into python:\n\n```python\n#load the data:\nimport numpy as np\nimport random\n\nX = np.loadtxt(\"iris.data\", delimiter=\",\", usecols=range(4))\ny = np.loadtxt(\"iris.data\", delimiter=\",\", usecols=[4], dtype=\"object\")\n\n#shuffle the data:\nindices = range(len(X))\nrandom.shuffle(indices)\nX = X[indices]\ny = y[indices]\n\n#split into train and test set:\nX_train = X[0:100]\ny_train = y[0:100]\n\nX_test = X[100:]\ny_test = y[100:]\n\n#now we can fit a model:\nexperiment.fit(X_train, y_train)\n\n#and predict the labels of the held out data:\ny_predict = experiment.predict(X_test)\n\n#Let's check what accuracy we get:\nnum_correct = sum([1 for predicted, correct in zip(y_predict, y_test) if predicted == correct])\nprint \"Accuracy: %f\" % float(num_correct) / len(y_test)\n```\n\nThis should give you an accuracy in the high 90%s.\n\n\nAdvanced: Selecting specific classifiers\n----------------------------------------\n\nWhen you don't set a specific classifier all available classifiers will be tried. You have the option to limit the search to certain classifiers as follows:\n\nFirst of all let's see what classifiers are available:\n\n```python\nimport pyautoweka\nprint pyautoweka.AVAILABLE_CLASSIFIERS\n```\n\nNow let's say we want to just use the Simple Logistic classifier:\n```python\nexperiment.add_classfier(\"weka.classifiers.functions.SimpleLogistic\")\n```\n\n\nAdvanced: files created\n-----------------------\n\nWhen you create a new experiment theres a bunch of files that will be generated before and during the run of AutoWeka. For each experiment there will be a new folder within in the `experiments` folder. The folder will have the name of the experiment, if it was specified in the constructor. Each time you fit data a tempraroy arff file will be created that holds all the data in it. This file will be delete after the `fit` call.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.cs.ubc.ca/labs/beta/Projects/autoweka/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pyautoweka", "package_url": "https://pypi.org/project/pyautoweka/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyautoweka/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.cs.ubc.ca/labs/beta/Projects/autoweka/" }, "release_url": "https://pypi.org/project/pyautoweka/.2/", "requires_dist": null, "requires_python": null, "summary": "AutoWeka for python", "version": ".2" }, "last_serial": 1649634, "releases": { ".2": [ { "comment_text": "", "digests": { "md5": "a360e497be87ef70996e3096e9f6595e", "sha256": "5c3fb80b06336782ee3ad6ff0735d063150bbcb02345db4cd0287b298aa88c8a" }, "downloads": -1, "filename": "pyautoweka-.2.tar.gz", "has_sig": false, "md5_digest": "a360e497be87ef70996e3096e9f6595e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18272212, "upload_time": "2014-07-09T19:27:23", "url": "https://files.pythonhosted.org/packages/90/66/2509faa3421ce4f1d3161f3bf012dfdcdc6bd5ff952853ceda466f35d90d/pyautoweka-.2.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "dc59919f01c9676e27cfaaaa56d47444", "sha256": "1b2f95cc6d3be4a70204fae20520ec5b82e9468ea2981a676c9ed9fd113f729f" }, "downloads": -1, "filename": "pyautoweka-1.0.tar.gz", "has_sig": false, "md5_digest": "dc59919f01c9676e27cfaaaa56d47444", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18272290, "upload_time": "2014-07-09T19:30:09", "url": "https://files.pythonhosted.org/packages/83/fe/16162614ca1b51f89b3383c05cf56a61be9993f13ceadbf81d90f9cc1515/pyautoweka-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "c724fd0b9b1fc2963cc4dbbd005c03c3", "sha256": "c4c60a3eeb8e8d19be0a670c43b85a2119343b92ee7163f7881edd9d2dcf92b1" }, "downloads": -1, "filename": "pyautoweka-1.1.tar.gz", "has_sig": false, "md5_digest": "c724fd0b9b1fc2963cc4dbbd005c03c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18272597, "upload_time": "2014-07-09T19:36:04", "url": "https://files.pythonhosted.org/packages/44/88/256fd511d937ce10b243da3367357e32a76e35a6f16516173194cb507e6f/pyautoweka-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a360e497be87ef70996e3096e9f6595e", "sha256": "5c3fb80b06336782ee3ad6ff0735d063150bbcb02345db4cd0287b298aa88c8a" }, "downloads": -1, "filename": "pyautoweka-.2.tar.gz", "has_sig": false, "md5_digest": "a360e497be87ef70996e3096e9f6595e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18272212, "upload_time": "2014-07-09T19:27:23", "url": "https://files.pythonhosted.org/packages/90/66/2509faa3421ce4f1d3161f3bf012dfdcdc6bd5ff952853ceda466f35d90d/pyautoweka-.2.tar.gz" } ] }