Hello, this is Mayuko from the IT Solutions Division.
Last week, I took advantage of my summer vacation to go to Okinawa with my friends!
After all, the sea in Okinawa was beautiful! ! It's really annoying ( ́-ω-') (There were only couples around...)
GO☆ "Mayu-chan welcome back Rinko! Did you check the blog in Okinawa as well?" Mayuko "Of course! (^^)/
GO☆「フーテンの?」 まゆこ「寅さんじゃないです」(似てますけど(`3´)) まゆこ「ブログはちゃんと沖縄でチェックしてましたよ! And I googled it and found a new example!"
↓ There are various examples written here. https://cloud.google.com/prediction/docs/developer-guide Last time, GO☆ predicted height based on weight, but the example title "Structuring the Training Data" on this page also predicts height.
However, there are multiple types of data (columns) to analyze. Come to think of it, whether it was language or height, there was only one type of data (column) to analyze. The language is only for "sentences", and the height is only for "weight".
However, this height guess analyzes four types of data (attributes) such as "gender", "father's height", "mother's height", and "nationality".
I see, height varies between men and women, it is genetic, and it also depends on nationality. In other words, there is a correlation. This is easy to predict!
The file formats to be input are as follows: [Height (answer)],[Gender],[Father's height],[Mother's height],[Nationality]
I created 20,000 using Excel. I defined the range of height by nationality and gender, and used a random function to create a slight variation. In other words, there is a correlation between the four attributes of [height (answer)] and [gender][father's height][mother's height][nationality].
Now let's make a prediction. This time it is also a Regression model, so the analysis results are roughly the same as last time. Now, let's make a prediction.
Until last time, I only put 1 attribute, but what do you do if you put 4 attributes? ↓There is a sample at the bottom of this page. If you search for "Run a prediction against your model." https://cloud.google.com/prediction/docs/reference/v1.4/reference
{
"input":{
"csvInstance":["M", 1.59, 1.51,"France"]
}
}
I see, it seems that it would be nice to arrange them separated by a comma. Try running prediction.trainedmodels.predict. The data I created was in CM notation, so I will enter it as follows.
{
"input":
{
"csvInstance":
[
"M,175,165,france"
]
}
}
"outputValue": "73.839505"
Hmm!? 73cm?? The answer is strange. With GO☆'s advice, I tried putting it vertically this time.
{
"input":
{
"csvInstance":
[
"M"
"175"
"165"
"france"
]
}
}
Then,
"outputValue": "175.622356"
175cm! This seems to have worked. Mayuko "In the end, which is the correct answer, horizontal or vertical...?" GO☆ "Hmm, let's verify it from now on!" Mayuko "Hey!"

The end ♡
*This article is produced under the supervision of "ISAO IT Solution Division Co., Ltd.".