Classification Problem

sasss52sasss52 Member Posts: 9 Contributor II
  I need some  help for classification. I am trying to some file in three different class by using the same setup in the  "04_TextTraining.xml" example, but when i am running this setup it is giving me this error and suggesting me to use "SVMWeighting" instate of "LibSVMLearner"
Total number of Support Vectors: 1558
Bias (offset): 0.990
Feature weight calculation only possible for two class learning problems. Please use the operator SVMWeighting instead.
number of classes: 3
number of support vectors for class graphics: 468
number of support vectors for class med: 543
number of support vectors for class space: 547

but when I am using  SVMWeighting instate of LibSVMLearner whith "ModelWriter" at the end it is giving me an error
My set for experiment is:
Root[1] (Process)
  +- TextInput[1] (TextInput)
  |  +- StringTokenizer[3266] (StringTokenizer)
  |  +- EnglishStopwordFilter[3266] (EnglishStopwordFilter)
  |  +- TokenLengthFilter[3266] (TokenLengthFilter)
  |  +- PorterStemmer[3266] (PorterStemmer)
  +- SVMWeighting[1] (SVMWeighting)
  +- ModelWriter[1] (ModelWriter)<<<error here

Error in: ModelWriter (ModelWriter) The operator needs some input of type com.rapidminer.operator.Model which is not provided. Each operator defines which input is desired for applying this operator (these input objects are shown in operator info screen (F1)). Previous operators must load or produce the desired input objects. You can check the correct experiment setup by validating the experiment (via the icon or the menu item).
After applying validation button on the menu bar:
G Apr 10, 2009 9:59:09 PM: [Error] ModelWriter: ModelWriter: ModelWriter: Missing input: Model >>>>>>(II already specify the path for the model)
G Apr 10, 2009 9:59:09 PM: [Error] There was 1 error.

can some one explain what is happening and how to solve this problem. I am stuck here....please help me out!!!!


  • Options
    haddockhaddock Member Posts: 849 Maven

    Some of the RM output can be a bit cryptic, this seems to be a curious datamining dialect known only to pointy headed Magi. Lesser mortals like ourselves have to learn it by trial and error, but as we don't write the stuff we'll never be fluent.

    Anyway, do not be alarmed, all is not as bad as it seems! The bottom line is that SVMs love to munch on two possibility or "binominal" classifications. When fed such delicacies they also produce weightings for each of the attributes. So what is happening is that the ever courteous RM operator is saying " I only produce weight tables for binominal problems, but my chum SVMWeightings could do weightings for your trinominal problem ".

    Note though that SVMWeighting does only that, it does not produce a model, hence your error message. I've appended a pretty stupid set up you can run to see the difference. If you set the number of discrete bins to 2 you will get weights as well as a model, but if you set to 3 or more you will not. As for what the difference is between the weighting schemes this is definitely one for the aforesaid pointy heads.
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExampleSetGenerator" class="ExampleSetGenerator">
            <parameter key="target_function" value="random"/>
        <operator name="AttributeSubsetPreprocessing" class="AttributeSubsetPreprocessing" expanded="yes">
            <parameter key="condition_class" value="attribute_name_filter"/>
            <parameter key="attribute_name_regex" value="label"/>
            <parameter key="process_special_attributes" value="true"/>
            <parameter key="deliver_inner_results" value="true"/>
            <operator name="BinDiscretization" class="BinDiscretization">
                <parameter key="range_name_type" value="short"/>
        <operator name="IOMultiplier" class="IOMultiplier">
            <parameter key="io_object" value="ExampleSet"/>
        <operator name="LibSVMLearner" class="LibSVMLearner">
            <parameter key="keep_example_set" value="true"/>
            <parameter key="kernel_type" value="linear"/>
            <list key="class_weights">
              <parameter key="range1" value="5.0"/>
              <parameter key="range2" value="1.0"/>
        <operator name="ModelApplier" class="ModelApplier">
            <parameter key="keep_model" value="true"/>
            <list key="application_parameters">
        <operator name="ModelWriter" class="ModelWriter">
            <parameter key="model_file" value="bla"/>
        <operator name="IOSelector" class="IOSelector">
            <parameter key="io_object" value="ExampleSet"/>
        <operator name="SVMWeighting" class="SVMWeighting">
            <parameter key="normalize_weights" value="false"/>
Sign In or Register to comment.