20 using namespace shogun;
34 preproc = orig.preproc;
35 num_preproc = orig.num_preproc;
37 preprocessed=
SG_MALLOC(
bool, orig.num_preproc);
38 memcpy(preprocessed, orig.preprocessed,
sizeof(
bool)*orig.num_preproc);
47 SG_INFO(
"Feature object loaded (%p)\n",
this) ;
60 "Feature properties.");
62 "Size of cache in MB.");
65 &num_preproc,
"preproc",
66 "List of preprocessors.");
68 &num_preproc,
"preprocessed",
69 "Feature[i] is already preprocessed.");
84 SG_INFO(
"%d preprocs currently, new preproc list is\n", num_preproc);
87 bool* preprocd=
SG_MALLOC(
bool, num_preproc+1);
89 for (int32_t i=0; i<num_preproc; i++)
92 preprocd[i]=preprocessed[i];
97 preprocessed=preprocd;
98 preproc[num_preproc]=p;
99 preprocessed[num_preproc]=
false;
103 for (int32_t i=0; i<num_preproc; i++)
104 SG_INFO(
"preproc[%d]=%s %ld\n",i, preproc[i]->
get_name(), preproc[i]) ;
128 for (int32_t i=0; i<num_preproc; i++)
150 if (num_preproc>0 && num<num_preproc)
152 removed_preproc=preproc[num];
157 preprocd=
SG_MALLOC(
bool, num_preproc-1);
162 for (int32_t i=0; i<num_preproc; i++)
167 preprocd[j]=preprocessed[i];
177 preprocessed=preprocd;
181 for (int32_t i=0; i<num_preproc; i++)
186 return removed_preproc;
191 preprocessed[num]=
true;
196 return preprocessed[num];
248 SG_INFO(
"C_STREAMING_SIMPLE ");
251 SG_INFO(
"C_STREAMING_SPARSE ");
254 SG_INFO(
"C_STREAMING_STRING ");
263 SG_ERROR(
"ERROR UNKNOWN FEATURE CLASS");
308 SG_ERROR(
"ERROR UNKNOWN FEATURE TYPE\n");
339 return (properties & p) != 0;
349 properties &= (properties | p) ^ p;
377 SG_ERROR(
"copy_subset and therefore model storage of CMachine "
378 "(required for cross-validation and model-selection is ",
379 "not yet implemented for feature type %s\n",
get_name());