Hero Agent Logo
AI Prompts to Generate ML Scripts Python


Create a Python script to preprocess and clean data for machine learning tasks

Create a step-by-step tutorial on how to write a Python script for preprocessing and cleaning data for machine learning tasks, using popular libraries such as library_1 and library_2. Explain the importance of each step, providing examples with an example dataset, dataset_name. Also, discuss handling missing data, categorical variables, and feature scaling with techniques like technique_1 and technique_2.
Prompt   

Develop a Python script to implement a linear regression model for predicting numeric values

Create a step-by-step guide for user_name to develop a Python script that implements a linear regression model for predicting numeric values using library library and incorporating the following variables: independent_variable and dependent_variable.
Prompt   

Write a Python script for building a logistic regression model for binary classification

Write a step-by-step tutorial on building a logistic regression model for binary classification in Python, using the following parameters: dataset_name, independent_variable, dependent_variable, and test_split_ratio. Include instructions for loading the dataset, feature selection, data preprocessing, model training, model evaluation, and any additional optimization techniques.
Prompt   

Design a Python script for implementing a k-means clustering algorithm to group similar data points

Write a step-by-step tutorial for designing a Python script to implement a k-means clustering algorithm for grouping similar data points, using library_1 and library_2. Ensure that the code is well organized, includes comments, and makes use of variable naming conventions. Start by discussing the importance and applications of k-means clustering in the field of application_area.
Prompt   

Build a Python script to perform sentiment analysis on text data using natural language processing

Create a step-by-step guide to build a Python script for purpose, where purpose is "sentiment analysis on text data using natural language processing". Include instructions to set up the environment, import necessary libraries, preprocess the input_data, apply NLP techniques, and interpret the results. Please incorporate suggestions for dynamic variables, such as library, algorithm, and data_format where appropriate.
Prompt   

Create a Python script for implementing a decision tree classifier to predict categorical outcomes

Create a step-by-step guide for writing a Python script to implement a classifier_type classification model, specifically a decision tree classifier, for predicting outcome_type outcomes using the following variables: input_features and target_variable.
Prompt   

Develop a Python script for building a random forest model for improved classification and regression tasks

Create a step-by-step tutorial to develop a Python script for building a random forest model, specifically designed for task_type tasks. In this tutorial, explain the importance of each step and the variables involved, such as n_estimators, max_features, and max_depth. Additionally, demonstrate the advantages and potential applications for using a random forest model in improving task_type performance.
Prompt   

Write a Python script to implement a support vector machine for classification and regression tasks

Write a Python script for task_type using a support vector machine, where the input data is input_data, the output is output_data, and the model parameters are model_parameters.
Prompt   

Design a Python script for building a recommendation system using collaborative filtering

Design a Python script for building a recommendation system using collaborative filtering, considering the following variables: input_data_format, output_preference_scores, user_similarity_metric, and item_similarity_metric.
Prompt   

Build a Python script to apply principal component analysis (PCA) for dimensionality reduction

Design a Python script featuring character_1 and character_2, where they collaboratively build a program that implements principal component analysis (PCA) for dimensionality reduction. Describe the challenges they face, how they solve the issues, and demonstrate the functionality and benefits of their final PCA script.
Prompt   

Create a Python script for implementing a neural network using TensorFlow or PyTorch

Create a step-by-step Python script implementing a neural network using library_name (either TensorFlow or PyTorch). Start by importing the necessary libraries, define the architecture_type neural network architecture (e.g. CNN, RNN, LSTM, GAN), and follow with the necessary pre-processing steps for the dataset_name dataset. Explain the process of splitting the data into training and validation sets, and set up the appropriate loss function, optimizer, and learning rate. Finally, finish the code with the training and evaluation loop, making sure to include the calculation of accuracy and loss metrics. Also, provide a short description of how the code can be adapted for different datasets or to include different network layers.
Prompt   

Develop a Python script for building a convolutional neural network (CNN) for image classification

Create a step-by-step tutorial on developing a Python script to build a Convolutional Neural Network (CNN) for image classification, incorporating the following dynamic variables: Dataset_Name, Number_of_Classes, and Model_Name. The tutorial should include importing necessary libraries, loading and preprocessing the Dataset_Name dataset, setting up the CNN architecture, compiling and training the Model_Name model, testing and validating the model's performance on the Dataset_Name dataset, and outputting the final accuracy percentage of the model for Number_of_Classes classes.
Prompt   

Write a Python script to implement a recurrent neural network (RNN) for sequence data analysis

Write a step-by-step guide for creating a Python script that implements a recurrent neural network (RNN) for analyzing sequence data, using input_data as the dataset, rnn_layer as the preferred RNN layer, and epochs as the number of training epochs. Also, consider batch_size for the minibatch size and learning_rate for the optimizer learning rate.
Prompt   

Design a Python script for building a long short-term memory (LSTM) network for time-series prediction

Create a comprehensive guide for designing a Python script to build a long short-term memory (LSTM) network for time-series prediction, incorporating library_1 and library_2 Python libraries. Ensure you cover the topics of data preprocessing, defining architecture, training the model, and making predictions with dynamic variables, such as input_length, output_length, and number_of_layers.
Prompt   

Build a Python script to perform image recognition and object detection using transfer learning

Write a comprehensive guide on how to build a Python script that performs image recognition and object detection using transfer learning, with emphasis on the following key components:

1. Selecting an appropriate pre-trained model (e.g., pre_trained_model) for transfer learning.
2. Preparing the dataset, including input images and corresponding annotations (e.g., image_format and annotation_format).
3. Defining the architecture and customizing the layers of the selected pre-trained model for the specific task, such as num_custom_layers custom layers.
4. Training the customized model using transfer learning, integrating hyperparameters like learning_rate, batch_size, and num_epochs.
5. Evaluating the performance of the trained model using metrics like evaluation_metric_1, evaluation_metric_2, and evaluation_metric_3.
6. Optimizing the model's accuracy and efficiency using techniques like optimization_technique_1 and optimization_technique_2.
7. Saving the final model and demonstrating its usage with real-world examples, highlighting the unique features of the Python script.

Please ensure that the provided guide includes step-by-step instructions, explanations of essential concepts, and relevant code snippets for each component. Additionally, please mention the dependencies and external libraries that will be required for the overall implementation.
Prompt   

Create a Python script for implementing an autoencoder for unsupervised learning and data compression

Design and explain a Python script that creates an autoencoder for unsupervised learning and data compression purposes, utilizing library for the autoencoder model and compression_rate for data compression. Make sure to describe the different components, input/output layers, and the optimization process involved in the script.
Prompt   
Dynamic AI Prompt Generators

Dynamic Prompt Playground (HeroML)

Prompt Generator

You can write prompts with variables, like variable_1, or variable_2. You don't have to use "variable", though.

You can write anything, for example:

Write a story between 2 friends, friend_1, and friend_b.

When you click "Run", you will be able to fill in the variables, and either copy your prompt, or open it directly in ChatGPT.

Try it now!
Prompt   

Create an AI Prompt Library  Create an AI Prompt Library  

Create, Collaborate & Share Lists.

Discover public lists, or build private lists with friends and family, for free!