2 ms·
The code you posted does not work. Try it out. One of these two lines is incorrect: predictionsaccuracy = accuracy_score(y_test, predictions) print("Accura
by eesmith 3y ago
The code you posted does not work. Try it out. One of these two lines is incorrect:
predictionsaccuracy = accuracy_score(y_test, predictions)
print("Accuracy: %.2f%%" % (accuracy * 100.0))
Either the first line should be:
accuracy = accuracy_score(y_test, predictions)
or the second line should be:
print("Accuracy: %.2f%%" % (predictionsaccuracy * 100.0))
I tried the corrected code against the CSV data file you pointed to, and got:
ValueError: could not convert string 'Pregnancies' to float64 at row 0, column 1.
You linked to a course that costs US$37. I don't see the code, though one of the images shows it uses that data set. Still, 1) tells me there's a copy&paste error, and 2) tells me that the dataset was somehow massaged.
> Is it no longer AI? If so why?
Okay, so I misunderstood your point. I thought your 'I promise you that anyone voting in this poll couldn't differentiate between what does and does not use "AI."' was in regards to the modern wave of using AI (typically LLM models) as a code assistant. Could someone tell if the code you posted was generated by an AI?
I could tell that the code you posted was not working code, so if the choices were "working code written by human" and "output from an AI model", it clearly belongs to the latter.
That is not your point, and I was wrong.
However, the point of the article is not "what is AI?" but more like "how much should you trust the results of everything described as AI"?
XGBoost was not generating false court citations. XGBoost was not generating images where the only scientists were white men. XGBoost was not submitting Stackoverflow answers. XGBoost was not classifying black men as gorillas. XGBoost is not the sort of AI that most people are thinking of when you say "AI".
FWIW, I'm of the classical school, and I consider alpha–beta pruning to be part of AI.