Training OpenAI model to predict prices with simple training data


I want to test AI training with the Open AI platform. To do this, I propose to carry out the following project.

Let’s imagine that I want to determine the price of a set of children’s toys in another country.

To build up my dataset, I assume I know the multiplication factor that allows me to go from the price of the toy in the source country to the price of the toy in the destination country.

So I want to provide Open AI with a data source consisting of several source tables and several destination tables.

Once the model is trained, I want to be able to submit tables with the same products but different prices, and ask it to give me the price in the destination country. The destination country will always be the training country.

Do you think this new model will be able to find the multiplier from the training data?

While OpenAI’s API provides access to powerful language models, it’s not designed for training models on new datasets. It’s primarily for leveraging the capabilities of the existing models (like text generation, summarization, translation, etc.). For the specific task you’re describing, traditional machine learning models might be more appropriate. Linear regression models, for instance, could potentially learn the relationship between prices in two countries if provided with adequate data. These models can be trained using various machine learning libraries and frameworks available in Python, such as scikit-learn, TensorFlow, or PyTorch.

1 Like

Hello @marconi thanks a lot for your reply. Any ressources to start with fine-tuning on these models?


Courtesy from chatGPT:

1. Data Collection and Preparation:
Source Data: Gather data for the children’s toys in the source country, including names, categories, and prices.
Destination Data: Collect corresponding data for these toys in the destination country.

  • Multiplication Factor: You mentioned a known multiplication factor. This factor needs to be accurately calculated or provided for each product or category.
  • Data Cleaning and Structuring: Ensure the data is clean (no missing values, consistent formats) and structured (e.g., in CSV or Excel format) for easy processing.
  1. Training Data Setup:
  • Pairing Data: You’ll need to pair each toy in the source country with its counterpart in the destination country, along with the multiplication factor.
  • Splitting Data: Divide your dataset into training and testing sets. The training set is used to train the model, and the testing set is used to evaluate its performance.
  1. Model Selection and Training:
  • AI Platform Selection: a custom machine learning model might be more appropriate.
  • Model Type: A regression model could be suitable for predicting continuous values (like prices). Linear regression could be a starting point, but more complex models like random forest or gradient boosting might offer better accuracy.
  • Training the Model: Use the training dataset to train the model. This involves feeding the model with source prices and the multiplication factor, and teaching it to predict destination prices.
  1. Testing and Evaluation:
  • Model Testing: Use the testing dataset to evaluate the model’s performance. This involves comparing the model’s price predictions for the destination country with the actual prices.
  • Performance Metrics: Use metrics like Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), or R-squared to measure the accuracy of your model.
  1. Deployment and Usage:
  • Deployment: Once satisfied with the model’s performance, deploy it for use. This could be through a web application, an API, or a cloud-based platform.
  • Usage: You can then submit new tables with prices from the source country to get predicted prices in the destination country.
  1. Potential Challenges:
  • Overfitting and Generalization: Ensure the model doesn’t overfit to the training data and can generalize well to new, unseen data.
  • Data Variability: Prices can be influenced by factors other than a straightforward multiplication factor, like taxes, shipping costs, demand, etc. These factors should be considered.
  1. Tools:
  • Data Analysis and Modeling: Python (with libraries like pandas, NumPy, scikit-learn) is a common choice for data processing and model training.
  • Cloud Services: AWS, Google Cloud, or Azure for deploying the model.

Regarding your specific question about the model’s ability to find the multiplier from the training data: Yes, if the multiplication factor is consistent and the data is well-structured, a well-trained machine learning model should be able to identify and apply this pattern to predict prices in the destination country. However, the accuracy will depend on the quality of the data and the appropriateness of the model selected.

  • Potential Models:
    • Linear Regression: Good for simple relationships. It assumes a linear relationship between input variables and the target.
    • Polynomial Regression: Useful if the relationship between the input and output is non-linear.
    • Random Forest Regression: A type of ensemble learning. Good for handling non-linear data with high dimensionality.
    • Gradient Boosting Machines (GBM): Similar to random forests, but it builds trees one at a time, where each new tree helps to correct errors made by previously trained trees.
  • Model Complexity: More complex models (like GBM) can capture complex relationships but are also prone to overfitting. It’s a balance between model complexity and generalization.

Feature Selection:

  • Identify relevant features (like toy category, brand, etc.) that might affect the price.
  • Feature Engineering: Create new features that can help improve model performance (e.g., toy size, age group).

Training Process:

  • Data Splitting: Split your data into training and test sets. A common split is 80% training and 20% testing.
  • Cross-Validation: Implement cross-validation to ensure that your model generalizes well to new data.
  • Hyperparameter Tuning: Adjust model parameters to find the optimal configuration. Tools like GridSearchCV or RandomizedSearchCV can be used for this.
    Model Training:
  • Use the training dataset to fit the model.
  • Monitor the training process for signs of overfitting.
    Model Validation:
  • After training, validate your model on the test set to check its performance.
  • If performance is not satisfactory, consider revisiting your model choice, features, or hyperparameters.


  1. Data Analysis and Processing:
  • Python: A versatile programming language ideal for data analysis and machine learning.
  • Pandas: A Python library for data manipulation and analysis.
  • NumPy: Useful for numerical operations in Python.
  1. Machine Learning Libraries:
  • Scikit-Learn: A Python library for machine learning. Offers various tools for model building, validation, and preprocessing.
  • XGBoost or LightGBM: Libraries for gradient boosting frameworks that are efficient for large datasets.
  1. Development Environment:
  • Jupyter Notebook: Interactive coding environment that helps in documenting the data science process.
  • Integrated Development Environment (IDE): Tools like PyCharm or Visual Studio Code.
  1. Model Evaluation and Hyperparameter Tuning:
  • Scikit-Learn: Provides functionalities for cross-validation and various metrics for model evaluation.
  • GridSearchCV/RandomizedSearchCV: For systematic hyperparameter tuning.
  1. Version Control and Collaboration:
  • Git: For version control.
  • GitHub/GitLab/Bitbucket: For online code repositories and collaboration.
  1. Deployment:
  • Flask/Django: Python web frameworks for deploying machine learning models as web applications.
  • Docker: Containerization tool to package your app and its environment for easy deployment.
  • Cloud Platforms: AWS, Google Cloud, or Azure for hosting your model and application.

Visualization Tools:

  • Matplotlib/Seaborn: Python libraries for data visualization.
  • Tableau or PowerBI: For more advanced data analytics and visualization needs.

I don’t know what your chatgpt prompt was, but the process looks good and coincides with advice I received from a colleague.

Thank you very much. I’ll keep you posted on my progress.

I am playing quite while with cnadlestick charts analysis and prediction using DNN (with pytorch). Tried LSTM, tried Transformers in different flavors.
There is number of other ideas what and how could be doen in this regards. One them is to use OpenAI API to generate syntetic dataset which may help to study candlestick charts.

This may be sound funny… but there are some examples which give me some hope that it may work.
May discuss if you dont mind