Ad
  • Custom User Avatar

    Oops your totally right. Yes q2 is supposed to be our accept state. The example is also mistaken because it went through the steps for input ["1", "0", "0", "1"] instead of ["1", "0", "0", "1", "0"]. Have updated the description.

  • Custom User Avatar

    Loved this Kata!

  • Custom User Avatar

    It would be great if this Kata supplied a sample test fixture. It's just something easy to do as polish.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    My opinion about this type of cheating is that it will be addressed by the site eventually. People's solutions are out there for everybody to see, and I expect there to be some sort of mechanisms to deal with this. Either by letting users flag/expose a cheating solution, and/or by static analysis of the solutions.

    Which makes me not want to worry about it, since it is extra effort for little value...

  • Custom User Avatar

    Comments that I've made are hidden from me if they are flagged as spoilers and I have not completed the Kata yet. I should always be able to see my own comments.

  • Custom User Avatar

    Clicking on the stats (but not solutions) tab of a Kata that was un-published and is back to being a draft causes Chrome to go in a redirect loop.

    Repro (author pulled this Kata back into draft):
    1.) Go to draft Kata's discussion http://www.codewars.com/dojo/katas/526987270d3f01c3de000dca/discuss

    2.) Click on stats tab.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    On the other hand, I like that it is thorough.

  • Custom User Avatar

    Thanks, I've updated the description with your input and walked through an example. I'm keeping (1/2m) * on the left because that is how it is represented in all the formulas for linear regression that I have seen. I'm trying to set up these Kata to bring code warriors to the next challenges in machine learning, and want to keep this as close to the material as I can. Appreciate your input though :).

    Also, x,y are not coordinate pairs. X is a feature that we are tracking (can be one of many) and Y is our target. Using this cost function repeatedly in machine learning, we try to come to theta values that minimize our cost, giving us a line that fits the targets as close as we can make it.

  • Custom User Avatar

    Haha, glad you had fun with it. I've updated the test cases with your suggestion.

  • Custom User Avatar

    Thanks for pointing that out. I've updated the test cases with your suggestion.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    You're correct that the test is wrong. Also thanks for letting me know about standard JS naming. I come from C++ and C# (and in peace.)

    Just updated.

  • Custom User Avatar

    From the test cases:
    Expeted a empty string to return false
    should be
    Expected an empty string to return false.

    Should removes spaces.
    should be
    Should remove spaces.

    Expected an empty string to return false
    should be
    Expected an empty string to return false.