## Support Vector Regression with R

In this article I will show how to use R to perform a Support Vector Regression.
We will first do a simple linear regression, then move to the Support Vector Regression so that you can see how the two behave with the same data.

## A simple data set

To begin with we will use this simple data set: I just put some data in excel. I prefer that over using an existing well-known data-set because the purpose of the article is not about the data, but more about the models we will use.

As you can see there seems to be some kind of relation between our two variables X and Y, and it look like we could fit a line which would pass near each point.

Let's do that in R !
{"ft_lang_label":"__label__en","ft_lang_prob":0.9462265,"math_prob":0.88460565,"size":816,"snap":"2023-40-2023-50","text_gpt3_token_len":174,"char_repetition_ratio":0.11083744,"word_repetition_ratio":0.0,"special_character_ratio":0.2120098,"punctuation_ratio":0.069767445,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9921933,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-06T02:02:36Z\",\"WARC-Record-ID\":\"<urn:uuid:5be5465f-681e-49ed-9ae1-e12809614ec6>\",\"Content-Length\":\"54638\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c2725f4d-2b68-4e5a-8e27-ee61e476f68c>\",\"WARC-Concurrent-To\":\"<urn:uuid:8e483cec-3283-466b-ba36-6ce65734102e>\",\"WARC-IP-Address\":\"162.243.132.138\",\"WARC-Target-URI\":\"https://www.svm-tutorial.com/tag/support-vector-regression/\",\"WARC-Payload-Digest\":\"sha1:ROWHJLTKWO243VI7Q3YMY7PV3BL2YIYO\",\"WARC-Block-Digest\":\"sha1:K5XXQPW7M5XSJUNH4OEE4RGL7DJXAOS4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100575.30_warc_CC-MAIN-20231206000253-20231206030253-00115.warc.gz\"}"}