この古いバージョンの AutoML Natural Language は非推奨となり、レガシー プラットフォームで新しいモデルのトレーニングやデプロイができなくなります。 デプロイ済みのモデルは、2024 年 5 月 30 日に動作を停止します。以前の AutoML Natural Language のすべての機能と新機能は、Vertex AI プラットフォームで使用可能です。リソースを移行する方法については、Vertex AI に移行するをご覧ください。
カスタムモデルをトレーニングするには、分析するドキュメントの種類の代表的なサンプルを指定し、AutoML Natural Language への類似ドキュメントのラベリング指示と同じようにラベル付けします。トレーニング データの品質は作成するモデルの有効性を大きく左右し、ひいてはそのモデルから返される予測の品質にも大きく影響します。
人間が読んで容易に分類可能なドキュメントを使用します。一般的に、AutoML Natural Language モデルは、人間が割り当てることができないラベルを予測することはできません。そのため、ドキュメントを読んでラベルを割り当てるように人間をトレーニングすることができなければ、モデルもそのようにトレーニングすることはできません。
マルチラベル分類を使用する場合は、関連するすべてのラベルを各ドキュメントに適用します。たとえば、医薬品の詳細を提供するドキュメントにラベルを付ける場合、Dosage と Side Effects のラベルが必要です。ドキュメントに両方の種類の情報が含まれている場合は、必ず両方のラベルを適用してください。
請求書や契約書などの構造または半構造化された文書の種類にアノテーションを付ける場合、AutoML Natural Language はアノテーションのページ上の位置を適切なラベルの要素の 1 つとみなすことができます。たとえば、不動産契約には同意日と履行日の両方がありますが、AutoML Natural Language はアノテーションの空間的位置に基づいてエンティティを区別できます。
{
"annotations": [
{
"text_extraction": {
"text_segment": {
"end_offset": 67,
"start_offset": 62
}
},
"display_name": "Modifier"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 158,
"start_offset": 141
}
},
"display_name": "SpecificDisease"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 330,
"start_offset": 290
}
},
"display_name": "SpecificDisease"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 337,
"start_offset": 332
}
},
"display_name": "SpecificDisease"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 627,
"start_offset": 610
}
},
"display_name": "Modifier"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 754,
"start_offset": 749
}
},
"display_name": "Modifier"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 875,
"start_offset": 865
}
},
"display_name": "Modifier"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 968,
"start_offset": 951
}
},
"display_name": "Modifier"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 1553,
"start_offset": 1548
}
},
"display_name": "Modifier"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 1652,
"start_offset": 1606
}
},
"display_name": "CompositeMention"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 1833,
"start_offset": 1826
}
},
"display_name": "DiseaseClass"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 1860,
"start_offset": 1843
}
},
"display_name": "SpecificDisease"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 1930,
"start_offset": 1913
}
},
"display_name": "SpecificDisease"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 2129,
"start_offset": 2111
}
},
"display_name": "SpecificDisease"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 2188,
"start_offset": 2160
}
},
"display_name": "SpecificDisease"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 2260,
"start_offset": 2243
}
},
"display_name": "Modifier"
},
{
"text_extraction": {
"text_segment": {
"end_offset": 2356,
"start_offset": 2339
}
},
"display_name": "Modifier"
}
],
"text_snippet": {
"content": "10051005\tA common MSH2 mutation in English and North American HNPCC families:
origin, phenotypic expression, and sex specific differences in colorectal cancer .\tThe
frequency , origin , and phenotypic expression of a germline MSH2 gene mutation previously
identified in seven kindreds with hereditary non-polyposis cancer syndrome (HNPCC) was
investigated . The mutation ( A-- > T at nt943 + 3 ) disrupts the 3 splice site of exon 5
leading to the deletion of this exon from MSH2 mRNA and represents the only frequent MSH2
mutation so far reported . Although this mutation was initially detected in four of 33
colorectal cancer families analysed from eastern England , more extensive analysis has
reduced the frequency to four of 52 ( 8 % ) English HNPCC kindreds analysed . In contrast ,
the MSH2 mutation was identified in 10 of 20 ( 50 % ) separately identified colorectal
families from Newfoundland . To investigate the origin of this mutation in colorectal cancer
families from England ( n = 4 ) , Newfoundland ( n = 10 ) , and the United States ( n = 3 ) ,
haplotype analysis using microsatellite markers linked to MSH2 was performed . Within the
English and US families there was little evidence for a recent common origin of the MSH2
splice site mutation in most families . In contrast , a common haplotype was identified
at the two flanking markers ( CA5 and D2S288 ) in eight of the Newfoundland families .
These findings suggested a founder effect within Newfoundland similar to that reported by
others for two MLH1 mutations in Finnish HNPCC families . We calculated age related risks
of all , colorectal , endometrial , and ovarian cancers in nt943 + 3 A-- > T MSH2 mutation
carriers ( n = 76 ) for all patients and for men and women separately . For both sexes combined ,
the penetrances at age 60 years for all cancers and for colorectal cancer were 0 . 86 and 0 . 57 ,
respectively . The risk of colorectal cancer was significantly higher ( p < 0.01 ) in males
than females ( 0 . 63 v 0 . 30 and 0 . 84 v 0 . 44 at ages 50 and 60 years , respectively ) .
For females there was a high risk of endometrial cancer ( 0 . 5 at age 60 years ) and premenopausal
ovarian cancer ( 0 . 2 at 50 years ) . These intersex differences in colorectal cancer risks
have implications for screening programmes and for attempts to identify colorectal cancer
susceptibility modifiers .\n "
}
}
ドキュメントのリスト(必要に応じてカテゴリラベルまたは感情値)を含む CSV ファイルを使用してトレーニング データを AutoML Natural Language にインポートします。AutoML Natural Language は、リストされたドキュメントからデータセットを作成します。
トレーニング データと評価データ
AutoML Natural Language は、トレーニング ドキュメントをトレーニング セット、検証セット、テストセットの 3 つに分けて、モデルをトレーニングします。
AutoML Natural Language は、トレーニング セットを使用してモデルを構築します。モデルは、複数のアルゴリズムとパラメータを試行してトレーニング データのパターンを検索します。パターンを識別すると、検証セットを使用してアルゴリズムとパターンをテストします。AutoML Natural Language は、トレーニング ステージで特定されたものから、最適なアルゴリズムとパターンを選択します。
最適なアルゴリズムとパターンを識別すると、AutoML Natural Language はそれらをテストセットに適用して、エラー率、品質、精度をテストします。
デフォルトでは、AutoML Natural Language はトレーニング データを 3 つのセットにランダムに分割します。
TRAIN, gs://my-project-lcm/training-data/file1.txt,Sports,Basketball
VALIDATION, gs://my-project-lcm/training-data/ubuntu.zip,Computers,Software,Operating_Systems,Linux,Ubuntu
TRAIN, gs://news/documents/file2.txt,Sports,Baseball
TEST, "Miles Davis was an American jazz trumpeter, bandleader, and composer.",Arts_Entertainment,Music,Jazz
TRAIN,gs://my-project-lcm/training-data/astros.txt,Sports,Baseball
VALIDATION,gs://my-project-lcm/training-data/mariners.txt,Sports,Baseball
TEST,gs://my-project-lcm/training-data/cubs.txt,Sports,Baseball