RapidMiner

RapidMiner now offering a 30 day free trial of RapidMiner Studio Large! Learn more

Anomaly Detection Extension Generate ROC Operator

Highlighted
Learner I beyza_kizilkaya
Learner I

Anomaly Detection Extension Generate ROC Operator

Hi all;

I'm newbie at Rapidminer. I'm using anomaly detection extension. But I cannot use generate ROC operator. I don't know what is wrong with me? I couldn't find any document or video. Is there anyone who can help me about this operator?

Thanks.

5 REPLIES

Re: Anomaly Detection Extension Generate ROC Operator

Hi @beyza_kizilkaya,

 

Here an example of process (to adapt to your own project) using the Generate ROC operator of the Anomaly Detection extension.

<?xml version="1.0" encoding="UTF-8"?><process version="8.1.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="8.1.001" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="8.1.001" expanded="true" height="68" name="Retrieve Titanic Training" width="90" x="45" y="85">
        <parameter key="repository_entry" value="//Samples/data/Titanic Training"/>
      </operator>
      <operator activated="true" class="concurrency:cross_validation" compatibility="8.1.001" expanded="true" height="145" name="Cross Validation" width="90" x="380" y="85">
        <process expanded="true">
          <operator activated="true" class="k_nn" compatibility="8.1.001" expanded="true" height="82" name="k-NN" width="90" x="179" y="34"/>
          <connect from_port="training set" to_op="k-NN" to_port="training set"/>
          <connect from_op="k-NN" from_port="model" to_port="model"/>
          <portSpacing port="source_training set" spacing="0"/>
          <portSpacing port="sink_model" spacing="0"/>
          <portSpacing port="sink_through 1" spacing="0"/>
        </process>
        <process expanded="true">
          <operator activated="true" class="apply_model" compatibility="8.1.001" expanded="true" height="82" name="Apply Model" width="90" x="45" y="34">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="performance_classification" compatibility="8.1.001" expanded="true" height="82" name="Performance" width="90" x="313" y="34">
            <list key="class_weights"/>
          </operator>
          <connect from_port="model" to_op="Apply Model" to_port="model"/>
          <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
          <connect from_op="Performance" from_port="performance" to_port="performance 1"/>
          <portSpacing port="source_model" spacing="0"/>
          <portSpacing port="source_test set" spacing="0"/>
          <portSpacing port="source_through 1" spacing="0"/>
          <portSpacing port="sink_test set results" spacing="0"/>
          <portSpacing port="sink_performance 1" spacing="0"/>
          <portSpacing port="sink_performance 2" spacing="0"/>
        </process>
      </operator>
      <operator activated="true" class="anomalydetection:Generate ROC" compatibility="2.4.001" expanded="true" height="145" name="Generate ROC" width="90" x="648" y="85">
        <parameter key="label value for outliers" value="Yes"/>
      </operator>
      <connect from_op="Retrieve Titanic Training" from_port="output" to_op="Cross Validation" to_port="example set"/>
      <connect from_op="Cross Validation" from_port="example set" to_op="Generate ROC" to_port="example set"/>
      <connect from_op="Cross Validation" from_port="performance 1" to_op="Generate ROC" to_port="performance"/>
      <connect from_op="Generate ROC" from_port="example set" to_port="result 2"/>
      <connect from_op="Generate ROC" from_port="roc set" to_port="result 1"/>
      <connect from_op="Generate ROC" from_port="auc" to_port="result 3"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
      <portSpacing port="sink_result 3" spacing="0"/>
      <portSpacing port="sink_result 4" spacing="0"/>
    </process>
  </operator>
</process>

I hope it helps,

 

Regards,

 

 

Lionel

Learner I beyza_kizilkaya
Learner I

Re: Anomaly Detection Extension Generate ROC Operator

Hi @lionelderkrikor

 

Thanks for your response but I think I couldn't tell my problem. Actually my steps are like this:

1. I'm importing data as csv or excel

2. With the help of anomaly detection extension I'm running any algoritm.

3. And then I'm getting results. 

After these steps I want to create ROC curve with using generate Roc operator which is in anomaly extension too. For this I'm dragging and dropping data file to design page then I'm choosin this operator. I'm doing everything like in help description. But I cannot see anything. Hope it's clear.

Thanks again. 

RM Staff
RM Staff

Re: Anomaly Detection Extension Generate ROC Operator

Hi @beyza_kizilkaya

 

Could you please share the process XML here? So that that we can see where you are going wrong.

 

Cheers,

Pavithra Rao
Learner I beyza_kizilkaya
Learner I

Re: Anomaly Detection Extension Generate ROC Operator

Hi @Pavithra_Rao

You can find attached .xml file. 

Thanks for your help. 

Re: Anomaly Detection Extension Generate ROC Operator

Hi @beyza_kizilkaya,

 

In your process, you don't feed the input port per (performance) of the Generate ROC operator , that's why RapidMiner raise an error.

A ROC is associated to a classification model :  So you have to train a model with your dataset and calculate the performance of this model first. To do that, take a look at the template of process I provided in my previous post. Then you can adapt it to your data.

 

If you begin with RapidMiner, I encourage you to see the video series about the basics of RapidMiner (how to train a model, how to validate a model etc.) by following this link : 

https://rapidminer.com/training/videos/

 

 I hope it helps,

 

Regards,

 

Lionel

 

ezCater's RapidMiner Journey