Skip to content

Commit

Permalink
Resolved a conflict with BMRM stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Mar 14, 2013
1 parent e8ecefe commit a03730b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Expand Up @@ -70,18 +70,18 @@ def get_so_labels(out):
sosvm.train()

res = sosvm.get_result()
Fps = np.array(res.get_hist_Fp())
Fds = np.array(res.get_hist_Fp())
wdists = np.array(res.get_hist_wdist())
Fps = np.array(res.get_hist_Fp_vector())
Fds = np.array(res.get_hist_Fp_vector())
wdists = np.array(res.get_hist_wdist_vector())

plt.figure()
plt.subplot(221)
plt.title('Fp and Fd history')
plt.plot(xrange(res.get_nIter()), Fps, hold=True)
plt.plot(xrange(res.get_nIter()), Fds, hold=True)
plt.plot(xrange(res.get_n_iters()), Fps, hold=True)
plt.plot(xrange(res.get_n_iters()), Fds, hold=True)
plt.subplot(222)
plt.title('w dist history')
plt.plot(xrange(res.get_nIter()), wdists)
plt.plot(xrange(res.get_n_iters()), wdists)

# Evaluation
out = sosvm.apply()
Expand Down
Expand Up @@ -118,18 +118,18 @@ def get_so_labels(out):
sosvm.train()

res = sosvm.get_result()
Fps = res.get_hist_Fp()
Fds = res.get_hist_Fd()
wdists = res.get_hist_wdist()
Fps = res.get_hist_Fp_vector()
Fds = res.get_hist_Fd_vector()
wdists = res.get_hist_wdist_vector()

plt.figure()
plt.subplot(221)
plt.title('Fp and Fd history')
plt.plot(xrange(res.get_nIter()), Fps, hold=True)
plt.plot(xrange(res.get_nIter()), Fds, hold=True)
plt.plot(xrange(res.get_n_iters()), Fps, hold=True)
plt.plot(xrange(res.get_n_iters()), Fds, hold=True)
plt.subplot(222)
plt.title('w dist history')
plt.plot(xrange(res.get_nIter()), wdists)
plt.plot(xrange(res.get_n_iters()), wdists)

# Evaluation
out = sosvm.apply()
Expand Down
8 changes: 4 additions & 4 deletions src/shogun/structure/bmrm_return_value.h
Expand Up @@ -46,7 +46,7 @@ struct bmrm_return_value_T
uint32_t nIter;

/** getter for nIter */
uint32_t get_nIter() const { return nIter; }
uint32_t get_n_iters() const { return nIter; }

/** number of cutting planes */
uint32_t nCP;
Expand Down Expand Up @@ -74,19 +74,19 @@ struct bmrm_return_value_T
SGVector< float64_t > hist_Fp;

/** getter for hist_Fp */
SGVector< float64_t > get_hist_Fp() const { return hist_Fp; };
SGVector< float64_t > get_hist_Fp_vector() const { return hist_Fp; };

/** Track of Fd values in individual iterations */
SGVector< float64_t > hist_Fd;

/** getter for hist_Fd */
SGVector< float64_t > get_hist_Fd() const { return hist_Fd; };
SGVector< float64_t > get_hist_Fd_vector() const { return hist_Fd; };

/** Track of w_dist values in individual iterations */
SGVector< float64_t > hist_wdist;

/** getter for hist_wdist */
SGVector< float64_t > get_hist_wdist() const { return hist_wdist; };
SGVector< float64_t > get_hist_wdist_vector() const { return hist_wdist; };
};

}
Expand Down

0 comments on commit a03730b

Please sign in to comment.