Model optimization

更新时间:
复制 MD 格式

Follow these suggestions to optimize your model:

  1. If your dataset is small, such as one with only a few hundred entries, increase the number of epochs. For example, you can set the number of epochs to 10 or 20 to train the model more thoroughly.

  2. Try a different model. Different model architectures can perform differently on different tasks. If the Long Short-Term Memory+Conditional Random Field (LSTM+CRF) model does not perform well, try the StructBERT model.

  3. Adjust the parameters for a model. Different parameter settings can produce different results, even with the same model. Models have various hyperparameters. To simplify the process, we only expose the number of epochs and the learning rate. You can configure these parameters in Advanced Settings during model creation. Do not change the number of epochs unless you want to complete training quickly. The learning rate can significantly impact model performance. Adjusting the learning rate requires specialized knowledge. You can adjust the original learning rate by a factor of up to 10.

  4. If the model performs poorly and the entities to be extracted have a relatively fixed context or pattern, use the rules and dictionaries in the rules engine to aid the extraction.

  5. Sometimes, model adjustments may not significantly improve performance. In such cases, consider optimizing the data. Entity extraction projects are best suited for extracting short fields, such as names, locations, organizations, times, and numerical values. Common scenarios include the following: - Extracting invoice titles, dates, amounts, and tax IDs. - Extracting names, phone numbers, email addresses, schools, and work information from resumes. - Extracting project names, personnel, addresses, invoice numbers, and amounts from contracts or bids. - Extracting the names of diseases, symptoms, drugs, and treatment methods in the healthcare industry. - Extracting case party information, judgment details, and basic case information in the legal industry. - Extracting product brands, suppliers, and prices in the e-commerce industry. - Extracting creditors, debtors, total profit, and asset-liability ratios in the finance industry.

  6. If the field you need to extract is long, such as several sentences or a full paragraph, an entity extraction model is not suitable. Check the platform for other industry solutions that may be more suitable.

  7. Analyze cases where the model performs poorly and add more data as needed. For example, if the model frequently misclassifies a specific category, this is likely because there is not enough data for that category. In this situation, add more annotated data for that category.