"Non-linear regression"

StraussStrauss MemberPosts:10Contributor II
edited May 2019 inHelp
Is there an operator for non-linear regression, e.g. polynomic? I didn't found something in this way.
Tagged:

Answers

  • haddockhaddock MemberPosts:849Maven
    There is a polynomial kernel available in LibSVMLearner.
  • StraussStrauss MemberPosts:10Contributor II
    Thank you very much. Is there somewhere a code example how to use it and what parameters have to be choosed?
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM创始人
    Hi,

    you can find many examples in the "sample" directory of RapidMiner. There should also be one for a general regression setting. For the polynomial LibSVM, you have to set the type to one of the both "SVR" types, select the kernel type "polynomial" and define an appropriate degree and values for C. Which parameter values are appropriate can be evaluated by using one of the parameter optimization operators (please also refer to the sample dir). Here is a simple setup (model is applied on the training data - never do this in real life ;-):



    <关键参数="number_of_attributes" value="1"/>
    <关键参数="target_function" value="one variable non linear"/>


    <列出关键=“噪音”>



    <关键参数="C" value="10000.0"/>


    <关键参数="degree" value="2"/>
    <关键参数="keep_example_set" value="true"/>
    <关键参数="kernel_type" value="poly"/>
    <关键参数="svm_type" value="epsilon-SVR"/>






    However, I would usually prefer an RBF kernel or an (additional) feature construction (for example with YAGGA2) instead but if polynomial works for your data this is of course fine.

    Cheers,
    Ingo
  • StraussStrauss MemberPosts:10Contributor II
    I got really problems in using this regression type. My approach is to load an example set from a database and produce a prediction model. But I think it tooks too much time (e.g. more than 2 minutes) and the results are not satisfiying.

    My operator tree is the following:



    <关键参数="database_system" value="HSQLDB"/>
    <关键参数="database_url" value="jdbc:hsqldb:file:SnapshotDB"/>
    <关键参数="label_attribute" value="SNAPSHOT"/>
    <关键参数="query" value="SELECT SID, SNAPSHOT FROM snapshots"/>
    <关键参数="username" value="sa"/>


    <关键参数="C" value="10000.0"/>


    <关键参数="kernel_type" value="poly"/>
    <关键参数="svm_type" value="epsilon-SVR"/>


    <关键参数="model_file" value="prediction.mod"/>


    I hope someone can help me to solve these problems or can explain how to calculate these model...
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM创始人
    Hi,

    if the runtime is too high you could try to reduce the value of "C". If the results are not satisfying, I always would try the RBF kernel with an optimized value for gamma / sigma. This often leads to much better fits. Instead of introducing the non-linearity in the learner, you could also construction additional (polynomial) features before learning and simply apply a linear regression scheme afterwards. This is often faster and leads to understandable models.

    Cheers,
    Ingo
  • StraussStrauss MemberPosts:10Contributor II

    ... I always would try the RBF kernel with an optimized value for gamma / sigma.
    It would be great if you could explain me how to do this... Which Operator I have to choose for this?
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM创始人
    Hi,

    here are the basic settings for a RBF SVM:



    <关键参数="attributes_lower_bound" value="-20.0"/>
    <关键参数="attributes_upper_bound" value="15.0"/>
    <关键参数="number_examples" value="300"/>
    <关键参数="number_of_attributes" value="1"/>
    <关键参数="target_function" value="one variable non linear"/>


    <关键参数="C" value="2000.0"/>


    <关键参数="gamma" value="1.0"/>
    <关键参数="keep_example_set" value="true"/>
    <关键参数="svm_type" value="epsilon-SVR"/>







    For the parameter optimization, you could have a look into the sample directory (..._Meta.../...ParameterOptimization.xml).

    Cheers,
    Ingo
  • StraussStrauss MemberPosts:10Contributor II
    Okay, thank you very much. I think I got it now.

    But could it be possible that setting the degree of the function doesn't have influence to the result?
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM创始人
    Hi,

    the kernel parameter "degree" is only used for a poynomial kernel, the parameters "sigma" / "gamma" are only used for RBF kernels.

    Cheers,
    Ingo
Sign InorRegisterto comment.