[ml] Wednesday, 10/27/2010 @ 7:30pm: Linear Classifier Workshop w/ scikits.learn

John Rayfield john.rayfield at me.com
Thu Oct 28 19:54:20 UTC 2010


I have managed to get it all up and running on SnowLeopard after many false starts.

Basically all of the 'binary packages' do install and work if you download and install the binary installer of Python 2.6 from python.org. The other installers will not work with the original mac Python or the current release of Python 2.7.

http://www.python.org/download/releases/2.6.6/

-- the Mac installer image.

Then make sure you go to Applications and update your path (in your .profile file) with the little
script they have:

/Applications/Python 2.6/Update Shell Profile.command

Then go get and install Numpy and Scipy binary installers.

numpy-1.5.1rc1-py2.6-python.org-macosx10.3.dmg

scipy-0.8.0-py2.6-python.org.dmg

and from http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/

matplotlib-1.0.0-python.org-py2.6-macosx10.4.dmg


It works!


On Oct 28, 2010, at 12:23 PM, Adam Skory wrote:

> On Thu, Oct 28, 2010 at 1:46 PM, Ethan Herdrick <info at reatlas.com> wrote:
>> But if numpy, scipy and matplotlib aren't already installed then that
>> magical import still won't work.  That's the step that most people
>> were and are having trouble with, I think.
>> 
>> Or does iPython come with it's own build of those things?
> 
> iPython from Debian-ish distros certainly comes with, or, at least I
> never had to install any of those other packages after installing
> iPython. YMMV.
> 
>> On Thu, Oct 28, 2010 at 9:19 AM, Adam Skory <askory at gmail.com> wrote:
>>> Sage looks pretty promising, but another way to get numpy and
>>> matplotlib up and running is to use iPython; starting ipython with the
>>> -pylab argument magically imports the good bits of numpy, scipy, and
>>> matplotlib.
>>> 
>>> (really, iPython is so awesome I use it as my default shell...)
>>> 
>>> -Skory
>>> 
>>> On Thu, Oct 28, 2010 at 4:40 AM, David Faden <dfaden at gmail.com> wrote:
>>>> Here's a hacky way that worked for me to get started with scikits.learning
>>>> under Mac OS X:
>>>> 1. Install Sage <http://www.sagemath.org/>. (I dropped it in /Applications
>>>> as suggested in the docs.) This brings with it its own custom Python system
>>>> with all of the dependencies present already -- numpy, scipy, matplotlib and
>>>> associated libraries.
>>>> 2. Download the source for scikits.learn
>>>> <http://sourceforge.net/projects/scikit-learn/files/> and unpack them:
>>>> $ tar zxvf scikits.learn-0.5.tar.gz
>>>> 3. Set PYTHONPATH to point to Sage's local directory: (I think this may not
>>>> be necessary.)
>>>> $ export PYTHONPATH=/Applications/sage/local/lib/python/site-packages/
>>>> 4. Change into scikits.learn source directory and build, using the sage
>>>> frontend (which I guess is just a souped up Python interpreter):
>>>> $ cd scikits.learn-0.5
>>>> $ /Applications/sage/sage setup.py install
>>>> 5. Try it out
>>>> $ /Applications/sage/sage
>>>> Despite having the "sage:" prompt, you still have a Python interpreter there
>>>> to play with. The logistic regression example here
>>>> <http://scikit-learn.sourceforge.net/auto_examples/logistic_l1_l2_coef.html>
>>>> worked for me with no modification. (I haven't gotten a chance to go through
>>>> the actual examples for our class, but I'm hopeful that if this works so
>>>> will probably most other stuff.)
>>>> On Wed, Oct 27, 2010 at 6:12 PM, Mike Schachter <mike at mindmech.com> wrote:
>>>>> 
>>>>> I posted the code to ml-noisebridge's sourceforge git repository. It
>>>>> probably needs some more work, but you can find it in the scikits.linear
>>>>> subdirectory of this repo:
>>>>> 
>>>>> git clone
>>>>> git://ml-noisebridge.git.sourceforge.net/gitroot/ml-noisebridge/ml-noisebridge
>>>>> 
>>>>> 
>>>>> 
>>>>> On Wed, Oct 27, 2010 at 5:06 PM, Mike Schachter <mike at mindmech.com> wrote:
>>>>>> 
>>>>>> Two more things:
>>>>>> 
>>>>>> Don't forget to install scipy:
>>>>>> 
>>>>>> http://www.scipy.org/
>>>>>> 
>>>>>> And by "linear classification" i actually meant "comparing
>>>>>> support vector machines and k-nearest neighbors"
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Wed, Oct 27, 2010 at 12:14 PM, Mike Schachter <mike at mindmech.com>
>>>>>> wrote:
>>>>>>> 
>>>>>>> There are some prerequisites:
>>>>>>> 
>>>>>>> Python 2.5+
>>>>>>> 
>>>>>>> Numpy: http://numpy.scipy.org/
>>>>>>> 
>>>>>>> Matplotlib: http://matplotlib.sourceforge.net/
>>>>>>> 
>>>>>>> scikits.learn: http://scikit-learn.sourceforge.net/
>>>>>>> 
>>>>>>> Try to have these installed before we get started.
>>>>>>> 
>>>>>>>    mike
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On Tue, Oct 26, 2010 at 2:08 PM, Mike Schachter <mike at mindmech.com>
>>>>>>> wrote:
>>>>>>>> 
>>>>>>>> Hey everyone,
>>>>>>>> 
>>>>>>>> Tomorrow I'll be guiding an impromptu workshop with
>>>>>>>> scikits.learn. We'll use a sample dataset and try our
>>>>>>>> hands at classifying it with linear classifiers and perhaps
>>>>>>>> even support vector machines. See you there!
>>>>>>>> 
>>>>>>>> http://scikit-learn.sourceforge.net/
>>>>>>>> 
>>>>>>>>   mike
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> ml mailing list
>>>>> ml at lists.noisebridge.net
>>>>> https://www.noisebridge.net/mailman/listinfo/ml
>>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> ml mailing list
>>>> ml at lists.noisebridge.net
>>>> https://www.noisebridge.net/mailman/listinfo/ml
>>>> 
>>>> 
>>> _______________________________________________
>>> ml mailing list
>>> ml at lists.noisebridge.net
>>> https://www.noisebridge.net/mailman/listinfo/ml
>>> 
>> 
> _______________________________________________
> ml mailing list
> ml at lists.noisebridge.net
> https://www.noisebridge.net/mailman/listinfo/ml




More information about the ml mailing list