originrose / cortex

Machine learning in Clojure
Eclipse Public License 1.0
1.27k stars 111 forks source link

Added interactive version of the mnist example #245

Closed mogenslund closed 7 years ago

mogenslund commented 7 years ago

Start a Liquid Text Editor with the mnist example code (with some adjustments). The editor with the interactive document is started using

lein liq

All needed code will be loaded into the editor. You can now navigate through the document and evaluate the code in the example.

harold commented 7 years ago

Thanks for this!

To me, it sort of feels like a plug for your text editor (congratulations on one year working on that, btw). :smile:

I have some questions.

Do you have a lot of users? Is data science and machine learning a focus of what you're doing? Are there other examples of projects accepting this kind of work? Would it make more sense for you to maintain these kinds of explorations in your own repository where you're in control? I'd be happy to help promote cortex to your users if you were creating compelling introductory (or advanced!) content.

mogenslund commented 7 years ago

Hi. It is both. I am exploring Cortex because I have a growing interest in Machine Learning. The example I provided, is the approach I used, to understand the example. Being able to evaluate parts of the example and understand each part by its own. I really love Clojure and I really want to learn Machine Learning. It is a huge win for me, if Cortex is going be a tools of choice for people, so I have an urge to contribute in some way. I use my own editor for everything I do, because its made in pure Clojure as well. Everything I explore is through that editor.

It will be ok with me, if you do not think my example fits into the Cortex project. I will keep exploring, and maybe some day be able to do a contribution to the code base instead.

Clojure is my favorite language. Machine Learning is my favorite topic and Liquid is my favorite editor. Therefore I try to combine those to push everything in a direction where they will come out on top.

cnuernber commented 7 years ago

I can see both points of view. I am also no sure this belongs in the codebase but it has some very strong qualities.

Jupyter notebooks and such are great tools and this editor could be a great way to bring that sort of coding to clojure; the existing clojure solutions do not appear to be as well done or thorough as jupyter.

The hesitations for adding this to the codebase are twofold:

  1. Duplication of code meaning we have to maintain multiple versions of the same thing.
  2. Unsure this is the best project in this space to 'bless' by making a cortex example.

I really do think liq has promise and this type of coding is extremely important in this space. I would feel a lot more comfortable if for one thing the literate form of coding had a standard syntax so various literate editors (I think geom is built using emacs' org-mode) could interoperate. I am not saying such a standard doesn't exist or that liq doesn't follow this standard but just unsure at the moment.

mogenslund commented 7 years ago

Hi both

Thank you for your feedback :-) I understand that pushing a new "unproven" dependency, might be too entangled a direction to start out with, as a contribution. I think you are right, that it might make better sense, to create a detached project for publishing my experiences and examples and to try out the format, before commiting to a larger project with higher risks involved.

I will close the pull request and not waste more of your time. You actually did help me clarify which direction to go, so thank you for that. I will start working on examples and experiences in my own space and hope it will be another way of contributing for now.

Just a side note: The "form of code" I am trying to use, is a mix of Markdown and Clojure code, which I think makes sense, since the material is a mix of text and code. And to support that I have made a syntax highlighter that supports this mix. (Almost all my private notes are a mix of markdown and interactive code snippets.)

Best regards, Mogens

harold commented 7 years ago

@mogenslund - no worries, this was not a waste of time.

Documentation, examples, and hand-holding in general is a known weakness of Cortex at the moment and I appreciate your efforts. Glad we could be of service too.

Post to the mailing list (https://groups.google.com/forum/#!forum/clojure-cortex) when your example is ready for consumption. It will be of interest to people. And let us know if there's more we can do to promote your work.