Message Boards Message Boards

0
|
1949 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

My Classify code crash the kernel?

Posted 2 years ago

Hi

I'm relatively new to Mathematica/Wolfram Desktop and learning the Classify function. Why would the following code cause the kernel to crash?

list0 = Table[RandomReal[{0, 1}] -> 0, 1000];
list1 = Table[RandomReal[{1, 2}] -> 1, 1000];
list2 = Table[RandomReal[{2, 3}] -> 2, 1000];
list3 = Table[RandomReal[{3, 4}] -> 3, 1000];
list4 = Table[RandomReal[{4, 5}] -> 4, 1000];
list5 = Table[RandomReal[{5, 6}] -> 5, 1000];
list6 = Table[RandomReal[{6, 7}] -> 6, 1000];
list7 = Table[RandomReal[{7, 8}] -> 7, 1000];
list8 = Table[RandomReal[{8, 9}] -> 8, 1000];
list9 = Table[RandomReal[{9, 10}] -> 9, 1000];
list = Join[list0, list1, list2, list3, list4, list5, list6, list7, 
  list8, list9]
cf = Classify[list]

My system is: MacBook Air M1 16GB. Wolfram Desktop 13.0.1

Is there a sample limit to the Classify function?

Thanks

POSTED BY: James Davidson
2 Replies
Posted 2 years ago

Thanks Eric.

I think it was my installation. The kernel exited trying the code above too. So I deleted my ~/Library/WolframDesktop contents and restarted. That seems to have resolved the issue! I even increased the list size to 200k items and it worked. :o)

POSTED BY: James Davidson
Posted 2 years ago

I'm using an 8GB MacBook Pro and it doesn't crash it.

I haven't used Classify before, but based on the documentation, this looks to me like a cleaner implementation:

data = Table[i -> RandomReal[{i, 1 + i}, 1000], {i, 0, 9}]
Classify[Association[data]]

Maybe try that form or one of the others in the documentation? But the obvious difference is that you're on M1, so maybe we can get other M1 users to test...

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract