ChatGPT teaches you how to write an AI package, and write a recognition model for 7 dialogues, with an accuracy of up to 99.7%
Bai Jiao is from Ao Fei Temple
Qubit | Official account QbitAI
Now, AI novices don’t even need to read tutorials and can create models using ChatGPT alone.
It not only helps you find data sets, train models and write code, but it can also evaluate accuracy and create programs in one step.
There is such a 25-year-old guy who asked ChatGPT to help him create a geographical location recognition program, with a final accuracy of up to 99.7%.
And all the details and steps are there, teaching you to learn while working.
This time, I was moved by ChatGPT.
What's more considerate is that after every question and answer, ChatGPT will say: If you have any questions, please tell me.
Implementation
At the beginning of the project, this guy made it clear: I don’t want to work hard anymore, can you help me create an AI program?
Take two coordinates as input and predict which country they are in.
ChatGPT "gladly" accepted the challenge and reminded the guy that it needed a corresponding data set, otherwise the model could not be trained. Also it would be better if there is more information.
First, you need to find a suitable data set.
The little brother asked ChatGPT again, and it turned out that it threw out three options for him to choose from without saying anything, including introduction links.
From the three data sets, the natural earth data set is obviously better, and it also has "border", coastline and other information. This means that the concept of "border" must be explained to the model and the separation labels must be explained. But as a newcomer, the first data set has more data related to the task and the model is easier to implement. The author finally chose the first data set.
After telling ChatGPT this decision, it will teach you how to create a DataFrame (data frame) and give sample code.
After successful execution, we come to the second stage: model training . ChatGPT also gave a code without saying a word, and even attached a detailed explanation.
This code will use k-NN algorithm to predict the country based on the given coordinates. The KNN algorithm is a simple algorithm that classifies an input based on the majority class of its k nearest neighbors.
In this example, the data is split into training and test sets with a ratio of 80-20. Then the training set is used to train the KNN classifier, and the test set is used to test the accuracy of the model.
Keep in mind that this is a simple example and the accuracy of the model may not be high. You can try experimenting with different algorithms and different values of k to see if you can improve the accuracy of your model.
After discarding some blank data (countries without coordinates) , the first execution of k-NN training was successful with 99.7% accuracy.
However, this result is not so satisfactory. The author attributes these reasons: uneven distribution of data between different countries; there are some data errors; bias and other issues.
This brings us to the third step: reassessment .
In this code, I use the OpenCage Geocoding API to get country information from coordinates. You need to replace YORBAPI_KEY with your API key to gain access to the API. You can register a free API key on the OpenCage website.
According to the instructions, the author modified the code, and the results showed that there were many NA errors, which was equivalent to only 30% of the data remaining. But the earth is indeed mostly water. (Nothing wrong, Doge)
The accuracy of the final model dropped a bit, reaching 98.6%, but the author was very satisfied with this result. After all, it took only 7 dialogue rounds to help create an AI model.
Also tried other algorithms
But this is not my first attempt. During the first conversation, he used a smaller dataset from the same source that required more dataset correction, and the first model training code provided by ChatGPT was a logistic regression with only 51% accuracy.
It then tried different "solvers" (accuracy was about 65%), as well as other algorithms, including random forest and k-NN, with accuracy of 93% and 92% respectively.
The 25-year-old works as a senior security researcher at SentinelOne, where he researches and develops malware detection logic.
Because he was very interested in machine learning, he started self-study and had a certain foundation. In this conversation, he actually talked to ChatGPT as a newbie, and was surprised by the powerful effect.
Finally, he also said that he was really considering calling ChatGPT as "they" instead of "it".
So AI newbies, start using ChatGPT quickly. (Doge)
Full conversation:
https://sharegpt.com/c/7zLivmp
Reference link:
https://xrl1.sh/posts/coordinates-model-with-ChatGPT/
-over-
"Artificial Intelligence" and "Smart Car" WeChat communities invite you to join!
Friends who are interested in artificial intelligence and smart cars are welcome to join the exchange group to communicate and discuss with AI practitioners, and not miss the latest industry development & technological progress.
PS. When adding friends, please be sure to note your name-company-position~
click here